From fcbf59f6f4e30fd0acf97087ff5e62b11af41c2d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 20 Aug 2012 22:39:24 +0000 Subject: new latex package chkfloat (20aug12) git-svn-id: svn://tug.org/texlive/trunk@27473 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/chkfloat/README | 44 ++++++++++++++++++++++ Master/texmf-dist/doc/latex/chkfloat/chkfloat.pdf | Bin 0 -> 51550 bytes Master/texmf-dist/doc/latex/chkfloat/chkfloat.tex | 39 +++++++++++++++++++ Master/texmf-dist/tex/latex/chkfloat/chkfloat.sty | 38 +++++++++++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/chkfloat.tlpsrc | 0 Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 + 7 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/chkfloat/README create mode 100644 Master/texmf-dist/doc/latex/chkfloat/chkfloat.pdf create mode 100644 Master/texmf-dist/doc/latex/chkfloat/chkfloat.tex create mode 100644 Master/texmf-dist/tex/latex/chkfloat/chkfloat.sty create mode 100644 Master/tlpkg/tlpsrc/chkfloat.tlpsrc (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/chkfloat/README b/Master/texmf-dist/doc/latex/chkfloat/README new file mode 100644 index 00000000000..e272582e8ae --- /dev/null +++ b/Master/texmf-dist/doc/latex/chkfloat/README @@ -0,0 +1,44 @@ + The chkfloat package + Checking floats that get too far from their origin + + +File: README +Author: Tomas Hejda +E-mail: tohecz@gmail.com + + +DESCRIPTION +=========== + +This package provides one single feature. It shows a warning whenever +a float is placed more than a pre-defined pages from its orinigal +page. + +Copyright: (C) 2012 Tomas Hejda +Licence: The LaTeX Project Public License version 1.3 or higher + http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html + +FILES IN DISTRIBUTION +===================== + + README This file. + chkfloat.sty Class file. + chkfloat.pdf Documentation file. + chkfloat.tex Documentation source file. + +BASIC INSTALLATION +==================== + + The minimum requirement to use the package is the to have + chkfloat.sty in a directory where TeX can find it. + + For a basic installation on a TDS compliant system, move the + following files to the following directories: + + /tex/latex/chkfloat/ + chkfloat.sty + + /doc/latex/chkfloat/ + README + chkfloat.pdf + diff --git a/Master/texmf-dist/doc/latex/chkfloat/chkfloat.pdf b/Master/texmf-dist/doc/latex/chkfloat/chkfloat.pdf new file mode 100644 index 00000000000..c7e9e84b23b Binary files /dev/null and b/Master/texmf-dist/doc/latex/chkfloat/chkfloat.pdf differ diff --git a/Master/texmf-dist/doc/latex/chkfloat/chkfloat.tex b/Master/texmf-dist/doc/latex/chkfloat/chkfloat.tex new file mode 100644 index 00000000000..008bd8c669b --- /dev/null +++ b/Master/texmf-dist/doc/latex/chkfloat/chkfloat.tex @@ -0,0 +1,39 @@ +\documentclass{article} + +\usepackage{hyperref,url,a4wide} + +\title{The {\sffamily chkfloat} package ver.\@ 0.1} +\author{Tom\'a\v s Hejda \\ \href{mailto:tohecz@gmail.com}{tohecz@gmail.com}} +\date{19 August 2012} + +\begin{document} + +\maketitle + +\paragraph{Overview.} +The package {\sffamily chkfloat} provides one single feature. +It shows a warning whenever a float is placed more than \verb:tolerance: pages from its orinigal page. + +\paragraph{Interference.} +The package should interfere well with other float-related packages like {\sffamily float} or {\sffamily floatrow}. +If any problem is spotted, feel free to contact the package author. + +\paragraph{Package options.} +The package has a single option \verb:tolerance: which is preset to \verb:1:. +To change the value, use e.g. \verb:\usepackage[tolerance=0]{chkfloat}:. + +\paragraph{Implementation.} +The package code is documented. +The implementation is based on the macros that create `List of Figures' and similar lists. +A new fake list is created with file extension \verb:.fof: and we store the information + about each float's ``original'' page and ``final'' page. +On the next run, these lines are loaded and processed. + +\paragraph{Version history.} +Version 0.1 is the first version. + +\paragraph{Licence.} +This material is subject to the \LaTeX{} Project Public Licence. +See \url{http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html} for the details of that licence. + +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/chkfloat/chkfloat.sty b/Master/texmf-dist/tex/latex/chkfloat/chkfloat.sty new file mode 100644 index 00000000000..63f28da894f --- /dev/null +++ b/Master/texmf-dist/tex/latex/chkfloat/chkfloat.sty @@ -0,0 +1,38 @@ +%% +%% This is file `chkfloat.sty'. +%% +%% Author: Tomas "tohecz" Hejda +%% +%% Licenced under LaTeX-Project Public License version 1.3 or newer. +%% +\NeedsTeXFormat{LaTeX2e}[1995/06/01] +\ProvidesPackage{chkfloat}[2012/08/19 v0.1 chkfloat: check for moved floats] + +% tolerances +\PassOptionsToPackage{patch}{kvoptions} +\RequirePackage{kvoptions} +\DeclareStringOption{tolerance} +\def\chkfloat@tolerance{1} +\ProcessKeyvalOptions* + +% store original macros \@float and \@caption +\let\chkfloat@float\@float +\let\chkfloat@caption\@caption +% make \@float remember the page where the float should be +\def\@float{\edef\chkfloat@page{\thepage}\chkfloat@float} +% make \@caption write to a file .fof the information about final page, original page and float caption +\def\@caption#1[#2]#3{\chkfloat@caption{#1}[#2]{#3}% + \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat@page}{\csname fnum@#1\endcsname: #2}}% +} +% checking macro +\def\chkfloat@#1#2#3{\ifnum#1>\numexpr#2+\chkfloat@tolerance\relax + \begingroup\let\on@line\@gobble\def\nobreakspace{ }\GenericWarning{}{Float misplaced on pages #2->#1, #3}\endgroup +\fi +} +% process the file .fof +\@starttoc{fof} + +\endinput +%% +%% End of file `chkfloat.sty'. +%% \ No newline at end of file diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 64b54e9c055..32d1ff25a84 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -90,7 +90,7 @@ my @TLP_working = qw( chemarrow chembst chemcompounds chemcono chemexec chemfig chemmacros chemnum chemstyle cherokee chess chess-problem-diagrams chessboard chessfss chet chextras - chicago chicago-annote chickenize chletter chngcntr chronology + chicago chicago-annote chickenize chkfloat chletter chngcntr chronology chronosys chscite circ circuitikz cite cjhebrew cjk cjkpunct classicthesis diff --git a/Master/tlpkg/tlpsrc/chkfloat.tlpsrc b/Master/tlpkg/tlpsrc/chkfloat.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index c3e6f74a1fc..830a8a0e288 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -105,6 +105,7 @@ depend chappg depend chapterfolder depend chet depend chextras +depend chkfloat depend chletter depend chngcntr depend chronology -- cgit v1.2.3