summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/endfloat
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-12-24 23:50:55 +0000
committerKarl Berry <karl@freefriends.org>2011-12-24 23:50:55 +0000
commit0c4528cceb79f3a737dfba22f77cfe787889f057 (patch)
tree53d7e09e714eb40b5ed7e8f4ab1a54f072537a6d /Master/texmf-dist/tex/latex/endfloat
parent46bc38f53cf814e65a94754cc5a65aa3d7d3e62d (diff)
endfloat 2.5c (24dec11)
git-svn-id: svn://tug.org/texlive/trunk@24934 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/endfloat')
-rw-r--r--Master/texmf-dist/tex/latex/endfloat/efxmpl.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/endfloat/endfloat.sty145
2 files changed, 94 insertions, 55 deletions
diff --git a/Master/texmf-dist/tex/latex/endfloat/efxmpl.cfg b/Master/texmf-dist/tex/latex/endfloat/efxmpl.cfg
index 124b1e48446..9e595f90c14 100644
--- a/Master/texmf-dist/tex/latex/endfloat/efxmpl.cfg
+++ b/Master/texmf-dist/tex/latex/endfloat/efxmpl.cfg
@@ -19,8 +19,8 @@
%% the blame; if you pass it on, pass on all present condiditions;
%%
\def\filename{endfloat}
-\def\fileversion{v2.5b}
-\def\filedate{2011/12/05}
+\def\fileversion{v2.5c}
+\def\filedate{2011/12/23}
\def\docdate{2011/12/05}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
diff --git a/Master/texmf-dist/tex/latex/endfloat/endfloat.sty b/Master/texmf-dist/tex/latex/endfloat/endfloat.sty
index 171a8a99ccf..78e8612712d 100644
--- a/Master/texmf-dist/tex/latex/endfloat/endfloat.sty
+++ b/Master/texmf-dist/tex/latex/endfloat/endfloat.sty
@@ -19,8 +19,8 @@
%% the blame; if you pass it on, pass on all present condiditions;
%%
\def\filename{endfloat}
-\def\fileversion{v2.5b}
-\def\filedate{2011/12/05}
+\def\fileversion{v2.5c}
+\def\filedate{2011/12/23}
\def\docdate{2011/12/05}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -48,22 +48,31 @@
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{endfloat}[\filedate\space\fileversion\space
LaTeX2e package puts figures and tables at end (jdm)]
-\newcommand{\ef@OldCmd}[2]{\PackageWarning{endfloat}%
- {The command \protect#1 is obsolete and will be\MessageBreak
- omitted from future releases of the endfloat package.\MessageBreak
- Use the package option `#2' instead.}}
\newif\if@domarkers
+\newif\if@tablist % bj
\newif\if@figlist % bj
+\newif\if@tabhead
\newif\if@fighead
\newif\if@tablesfirst
\newif\ifefloat@figures % as
\newif\ifefloat@tables % as
+\newif\ifefloat@list % as
+\newif\ifefloat@head % as
+\newcommand*\efloat@syncobsoleteflags{%
+ \efloat@ifflag{tablelist}{\@tablisttrue}{\@tablistfalse}%
+ \efloat@ifflag{figurelist}{\@figlisttrue}{\@figlistfalse}%
+ \efloat@ifflag{tablehead}{\@tabheadtrue}{\@tabheadfalse}%
+ \efloat@ifflag{figurehead}{\@figheadtrue}{\@figheadfalse}}
\@domarkerstrue
-\@figlisttrue % bj
+\@tablisttrue
+\@figlisttrue
+\@tabheadfalse
\@figheadfalse
\@tablesfirstfalse
\efloat@figurestrue % as
\efloat@tablestrue % as
+\efloat@listtrue % as
+\efloat@headfalse % as
\RequirePackage{keyval}
\newcommand*\SetupDelayedFloat[2]{%
\def\efloat@type{#1}%
@@ -79,7 +88,8 @@
{\PackageError{endfloat}%
{Unknown environment `#1'}%
{Only environments known to the `endfloat' package are allowed here.}}%
- {\efloat@setflag{#1#2}{#3}}}
+ {\efloat@setflag{#1#2}{#3}%
+ \efloat@syncobsoleteflags}}
\newcommand*\efloat@ifflag[1]{%
\@nameuse{ef@if@#1}}
\newcommand*\efloat@setflag[2]{%
@@ -93,10 +103,20 @@
\newcommand*\efloat@openpost[1]{%
\expandafter\immediate\expandafter\openout
\csname efloat@post#1\endcsname =\jobname.#1\relax
- \efloat@setflag{#1open}{true}%
+ \ef@setct{#1}{1}%
\message{(\jobname.#1)}}
+\newcommand*\ef@newct[1]{%
+ \expandafter \newcount \csname @ef@#1open\endcsname}
+\newcommand*\ef@setct[2]{%
+ \expandafter\global\csname @ef@#1open\endcsname=#2\relax}
+\newcommand*\ef@ifct[1]{%
+ \expandafter\ifnum \csname @ef@#1open\endcsname>0 \relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
\newcommand*\efloat@condopen[1]{%
- \efloat@ifflag{#1open}{}{\efloat@openpost{#1}}}
+ \ef@ifct{#1}{}{\efloat@openpost{#1}}}
\newcommand\efloat@iwrite[1]{%
\expandafter\immediate\expandafter\write\csname efloat@post#1\endcsname}
\newcommand{\efloatseparator}{\clearpage}
@@ -114,8 +134,6 @@
\@testopt{\efloat@@declare{#1}{#2}}{ef#2}}
\@onlypreamble\efloat@declare
\def\efloat@@declare#1#2[#3]#4{%
- \efloat@setflag{#2list}{@figlist}%
- \efloat@setflag{#2head}{@fighead}%
\newcounter{post#2}%
\edef\@tempa{#3}%
\edef\@tempb{\@nameuse{ext@#2}}%
@@ -127,26 +145,31 @@
\expandafter\let\csname ef@ext@#2\endcsname\@tempa
\fi
\efloat@newwrite{#3}%
- \efloat@setflag{#3open}{false}%
+ \ef@newct{#3}%
\@ifundefined{#2name}{\@namedef{#2name}{\@nameuse{fname@#2}}}{}%
- \@namedef{#2place}{\floatplace{#2}}%
+ \efloat@namedef{#2place}{\floatplace{#2}}%
\DeclareDelayedFloatFlavor#1{#2}{#2}%
\expandafter\providecommand\csname #2section\endcsname{#4}%
- \@namedef{efloat@#2@hook}{}%
+ \efloat@namedef{process#2s@hook}{}%
\edef\@tempb{\def\noexpand\@tempa{\@car#2\@nil}}%
\uppercase\expandafter{\@tempb}%
\edef\@tempb{%
\noexpand\g@addto@macro\noexpand\@tempa{\@cdr#2\@nil}}%
\@tempb
- \@namedef{AtBegin\@tempa s}{%
- \expandafter\g@addto@macro\csname efloat@#2@hook\endcsname}%
- \@namedef{AtBegin\@tempa es}{%
- \expandafter\g@addto@macro\csname efloat@#2@hook\endcsname}%
- \@namedef{process#2s}{\efloat@process{#3}{#2}}%
- \@namedef{process#2es}{\@nameuse{process#2s}}%
+ \efloat@namedef{AtBegin\@tempa s}{%
+ \expandafter\g@addto@macro\csname process#2s@hook\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter
+ \csname AtBegin\@tempa es\expandafter\endcsname
+ \csname AtBegin\@tempa s\endcsname
+ \efloat@namedef{process#2s}{\efloat@process{#3}{#2}}%
+ \efloat@namedef{process#2es}{\@nameuse{process#2s}}%
+ \efloat@@setkey{#2}{list}{efloat@list}%
+ \efloat@@setkey{#2}{head}{efloat@head}%
\@cons\efloat@list{{#2}}}
\@onlypreamble\efloat@@declare
\newcommand*\efloat@list{}
+\newcommand*\efloat@namedef[1]{%
+ \expandafter\newcommand\csname #1\endcsname}
\newcommand*\DeclareDelayedFloatFlavor{%
\@ifstar{\efloat@declareflavor\@gobble}%
{\efloat@declareflavor\@iden}}
@@ -158,7 +181,7 @@
{\PackageError{endfloat}%
{Unknown environment `#3'}%
{Only environments known to the `endfloat' package are allowed here.}}%
- {\AtBeginDocument{%
+ {\efloat@AtBeginDocument{%
\efloat@@declareflavor{#2}{#3}%
#1{\efloat@@declareflavor{#2*}{#3}}}}}
\@onlypreamble\efloat@declareflavor
@@ -179,6 +202,15 @@
{You can't use \noexpand\DeclareDelayedFloatFlavor twice for a given environment.}%
\fi}}
\@onlypreamble\efloat@@declareflavor
+\@ifundefined{apa@startsection}{% defined by apa.cls
+ \@ifundefined{@noendfloatfig}{% defined by (old) apa6.cls
+ \newcommand*\efloat@AtBeginDocument{\AtBeginDocument}
+ }{%
+ \newcommand*\efloat@AtBeginDocument{\@iden}
+ }%
+}{%
+ \newcommand*\efloat@AtBeginDocument{\@iden}
+}
\newcommand*\efloat@restorefloats{}
\newcommand*\efloat@SetOption[1]{%
\def\@elt##1{\efloat@Setup{##1}{#1}}%
@@ -192,33 +224,27 @@
\let\efloat@ProcessOptions\@undefined}
\DeclareOption{nomarkers}{\@domarkersfalse}
\DeclareOption{markers}{\@domarkerstrue}
-\newcommand{\markersintext}{\@domarkerstrue
- \ef@OldCmd{\markersintext}{markers}}
-\newcommand{\nomarkersintext}{\@domarkersfalse
- \ef@OldCmd{\nomarkersintext}{nomarkers}}
+\newcommand{\markersintext}{\@domarkerstrue}
+\newcommand{\nomarkersintext}{\@domarkersfalse}
\newcommand{\dotablist}{%
- \SetupDelayedFloat{table}{list=true}%
- \ef@OldCmd{\dotablist}{tablist}}
+ \SetupDelayedFloat{table}{list=true}}
\newcommand{\notablist}{%
- \SetupDelayedFloat{table}{list=false,head=true}%
- \ef@OldCmd{\notablist}{notablist}}
+ \SetupDelayedFloat{table}{list=false,head=true}}
\newcommand{\dofiglist}{%
- \SetupDelayedFloat{figure}{list=true}%
- \ef@OldCmd{\dofiglist}{figlist}}
+ \SetupDelayedFloat{figure}{list=true}}
\newcommand{\nofiglist}{%
- \SetupDelayedFloat{figure}{list=false,head=true}%
- \ef@OldCmd{\nofiglist}{nofiglist}}
-\DeclareOption{nolists}{\@figlistfalse \efloat@SetOption{list=false}}
-\DeclareOption{lists}{\@figlisttrue \efloat@SetOption{list=true}}
+ \SetupDelayedFloat{figure}{list=false,head=true}}
+\DeclareOption{nolists}{\efloat@listfalse \efloat@SetOption{list=false}}
+\DeclareOption{lists}{\efloat@listtrue \efloat@SetOption{list=true}}
\DeclareOption{notablist}{\efloat@Setup{table}{list=false}}
\DeclareOption{nofiglist}{\efloat@Setup{figure}{list=false}}
\DeclareOption{tablist}{\efloat@Setup{table}{list=true}}
\DeclareOption{figlist}{\efloat@Setup{figure}{list=true}}
-\DeclareOption{heads}{\@figheadtrue \efloat@SetOption{head=true}}
-\DeclareOption{noheads}{\@figheadfalse \efloat@SetOption{head=false}}
+\DeclareOption{heads}{\efloat@headtrue \efloat@SetOption{head=true}}
+\DeclareOption{noheads}{\efloat@headfalse \efloat@SetOption{head=false}}
\DeclareOption{fighead}{\efloat@Setup{figure}{head=true}}
-\DeclareOption{tabhead}{\efloat@Setup{table}{head=false}}
-\DeclareOption{nofighead}{\efloat@Setup{figure}{head=true}}
+\DeclareOption{tabhead}{\efloat@Setup{table}{head=true}}
+\DeclareOption{nofighead}{\efloat@Setup{figure}{head=false}}
\DeclareOption{notabhead}{\efloat@Setup{table}{head=false}}
\DeclareOption{tablesfirst}{\@tablesfirsttrue}
\DeclareOption{figuresfirst}{\@tablesfirstfalse}
@@ -261,36 +287,49 @@
\let\do\ef@makeinnocent \dospecials
\ef@makeinnocent\^^L% and whatever other special cases
\endlinechar`\^^M \catcode`\^^M=12 %
- \efloat@patch\ef@endfiguretest{#3}% as
- \def\next{\ef@xfigure{#1}}%
+ \efloat@patch\efloat@endtest{#3}% as
+ \efloat@patch\efloat@enddbltest{#3}% as
+ \def\next{\efloat@xfloat{#1}}%
\next\string\begin{#3}}%
\newcommand*\efloat@foundend[2]{%
- \efloat@iwrite{#1}{\string\end{#2}}%
+ \edef\efloat@enddbltest{\string\end{#2}}%
\efloat@found@end{#1}}
\newcommand*\efloat@found@end[1]{%
+ \efloat@iwrite{#1}{\efloat@enddbltest}%
\def\next{\endgroup\end{efloat@float}%
\efloat@iwrite{#1}{\string\efloatseparator}%
\efloat@iwrite{#1}{ }}}%
{\catcode`\^^M=12 \endlinechar=-1 %
- \long\gdef\ef@xfigure#1#2^^M{\def\test{#2}%
- \efloat@iwrite{#1}{#2}%
- \ifx\test\ef@endfiguretest
+ \long\gdef\efloat@xfloat#1#2^^M{\def\test{#2}%
+ \ifx\test\efloat@endtest
\efloat@found@end{#1}%
- \fi \next}}
+ \else\ifx\test\efloat@enddbltest
+ \efloat@found@end{#1}%
+ \else
+ \efloat@iwrite{#1}{#2}%
+ \fi \fi \next}}
{\escapechar=-1%
- \xdef\ef@endfiguretest{\string\\end\string\{X\string\}}
+ \xdef\efloat@endtest{\string\\end\string\{X\string\}}
+ \xdef\efloat@enddbltest{\string\\end\string\{X\string\}}
}
\newcommand*\efloat@patch[2]{%
\def\x##1X##2\@nil{\def#1{##1#2##2}}%
\expandafter\x#1\@nil}
-\newcommand{\processdelayedfloats@hook}{}
+\newcommand*\ef@xfigure{\ef@xfloat{fff}{figure}}
+\newcommand*\ef@xtable{\ef@xfloat{ttt}{table}}
+\newcommand*\ef@xfloat[2]{%
+ \efloat@patch\efloat@endtest{#2}%
+ \efloat@patch\efloat@enddbltest{#2*}%
+ \def\next{\efloat@xfloat{#1}}%
+ \next}
+\newcommand*\processdelayedfloats@hook{}
\def\AtBeginDelayedFloats{%
\g@addto@macro\processdelayedfloats@hook}
-\newcommand{\processotherdelayedfloats}{}
+\newcommand*\processotherdelayedfloats{}
\newcommand*\efloat@process[2]{%
- \efloat@ifflag{#1open}{%
+ \ef@ifct{#1}{%
\expandafter\immediate\expandafter\closeout\csname efloat@post#1\endcsname
- \efloat@setflag{#1open}{false}%
+ \ef@setct{#1}{0}%
\clearpage % bj
\efloat@ifflag{#2list}{% % bj
{\normalsize\efloat@listof{#2}}% % bj
@@ -303,7 +342,7 @@
\markboth % bj
{\expandafter\uppercase\expandafter{\csname #2section\endcsname}}% bj
{\expandafter\uppercase\expandafter{\csname #2section\endcsname}}% bj
- \@nameuse{efloat@#2@hook}%
+ \@nameuse{process#2s@hook}%
\@input{\jobname.#1}%
}{}}
\newcommand*\efloat@listof[1]{%