diff options
author | Karl Berry <karl@freefriends.org> | 2011-12-15 02:00:00 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-12-15 02:00:00 +0000 |
commit | 6743abd22bb9e36d2b76aced64c2e45d9fea450f (patch) | |
tree | 36710dabff9211ef4fd9cd25c200c41b418b0126 /Master/texmf-dist/tex/latex | |
parent | ca928612bb4637c1baa6889bf742d6708c216d3e (diff) |
endfloat (13dec11)
git-svn-id: svn://tug.org/texlive/trunk@24843 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/endfloat/efxmpl.cfg | 64 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/endfloat/endfloat.sty | 429 |
2 files changed, 271 insertions, 222 deletions
diff --git a/Master/texmf-dist/tex/latex/endfloat/efxmpl.cfg b/Master/texmf-dist/tex/latex/endfloat/efxmpl.cfg index 73516617815..124b1e48446 100644 --- a/Master/texmf-dist/tex/latex/endfloat/efxmpl.cfg +++ b/Master/texmf-dist/tex/latex/endfloat/efxmpl.cfg @@ -8,7 +8,7 @@ %% %% IMPORTANT NOTICE: %% This is part of a set of tools (or better yet, experiments) written -%% by Jeff Goldberg (j.goldberg@Cranfield.ac.uk), who is writting this +%% by Jeff Goldberg (jeffrey@goldmark.org), who is writting this %% not only for it utility value, but as part of the process of learning %% LaTeX. These tools are far from perfect, and comments are welcome. %% @@ -19,9 +19,9 @@ %% the blame; if you pass it on, pass on all present condiditions; %% \def\filename{endfloat} -\def\fileversion{v2.4i} -\def\filedate{1995/10/11} -\def\docdate {1995/10/11} +\def\fileversion{v2.5b} +\def\filedate{2011/12/05} +\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 %% Lower-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 @@ -41,57 +41,13 @@ %% Description: LaTeX style to put figures and tables at end of article %% Keywords: LaTeX, style-option, float, figure, table %% Authors: James Darrell McCauley <jdm5548@diamond.tamu.edu>, -%% Jeff Goldberg <j.goldberg@cranfield.ac.uk> -%% Maintainer: Jeff Goldberg <J.Goldberg@Cranfield.ac.uk> -%% Latest Version: Version 2.4i <October 1995> +%% Jeff Goldberg <jeffrey@goldmark.org>, +%% Axel Sommerfeldt <axel.sommerfeldt@f-m.fm> +%% Maintainer: Jeff Goldberg <jeffrey@goldmark.org> +%% Latest Version: Version 2.5 <November 2011> \RequirePackage{rotating} -\let\efsaved@sidewaysfigure\sidewaysfigure -\let\efsaved@sidewaystable\sidewaystable -\AtBeginTables{\let\sidewaystable=\efsaved@sidewaystable\relax} -\AtBeginFigures{\let\sidewaysfigure=\efsaved@sidewaysfigure\relax} -\def\sidewaystable{\efloat@condopen{ttt} - \efloat@iwrite{ttt}{\string\begin{sidewaystable}}% - \if@domarkers - \addtocounter{posttbl}{1} - \tableplace - \fi - \def\@currenvir{efloat@float}% - \begingroup - \let\do\ef@makeinnocent \dospecials - \ef@makeinnocent\^^L% and whatever other special cases - \endlinechar`\^^M \catcode`\^^M=12 \ef@xsidetable} -{\catcode`\^^M=12 \endlinechar=-1 % - \gdef\ef@xsidetable#1^^M{\def\test{#1} - \ifx\test\ef@endsidetabletest - \efloat@foundend{ttt}{sidewaystable} - \else - \efloat@iwrite{ttt}{#1}% - \let\next\ef@xsidetable - \fi \next} -} -\def\sidewaysfigure{\efloat@condopen{fff} - \efloat@iwrite{fff}{\string\begin{sidewaysfigure}}% - \if@domarkers - \addtocounter{postfig}{1} - \figureplace - \fi - \def\@currenvir{efloat@float}% - \begingroup - \let\do\ef@makeinnocent \dospecials - \ef@makeinnocent\^^L% and whatever other special cases - \endlinechar`\^^M \catcode`\^^M=12 \ef@xsidefigure} -{\catcode`\^^M=12 \endlinechar=-1 % - \gdef\ef@xsidefigure#1^^M{\def\test{#1} - \ifx\test\ef@endsidefiguretest - \efloat@foundend{fff}{sidewaysfigure} - \else - \efloat@iwrite{fff}{#1}% - \let\next\ef@xsidefigure - \fi \next} -} -{\escapechar=-1% - \xdef\ef@endsidefiguretest{\string\\end\string\{sidewaysfigure\string\}}% - \xdef\ef@endsidetabletest{\string\\end\string\{sidewaystable\string\}}}% +\DeclareDelayedFloatFlavor{sidewaysfigure}{figure} +\DeclareDelayedFloatFlavor{sidewaystable}{table} \endinput %% %% End of file `efxmpl.cfg'. diff --git a/Master/texmf-dist/tex/latex/endfloat/endfloat.sty b/Master/texmf-dist/tex/latex/endfloat/endfloat.sty index 4d93295204c..171a8a99ccf 100644 --- a/Master/texmf-dist/tex/latex/endfloat/endfloat.sty +++ b/Master/texmf-dist/tex/latex/endfloat/endfloat.sty @@ -8,7 +8,7 @@ %% %% IMPORTANT NOTICE: %% This is part of a set of tools (or better yet, experiments) written -%% by Jeff Goldberg (j.goldberg@Cranfield.ac.uk), who is writting this +%% by Jeff Goldberg (jeffrey@goldmark.org), who is writting this %% not only for it utility value, but as part of the process of learning %% LaTeX. These tools are far from perfect, and comments are welcome. %% @@ -19,9 +19,9 @@ %% the blame; if you pass it on, pass on all present condiditions; %% \def\filename{endfloat} -\def\fileversion{v2.4i} -\def\filedate{1995/10/11} -\def\docdate {1995/10/11} +\def\fileversion{v2.5b} +\def\filedate{2011/12/05} +\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 %% Lower-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 @@ -41,203 +41,296 @@ %% Description: LaTeX style to put figures and tables at end of article %% Keywords: LaTeX, style-option, float, figure, table %% Authors: James Darrell McCauley <jdm5548@diamond.tamu.edu>, -%% Jeff Goldberg <j.goldberg@cranfield.ac.uk> -%% Maintainer: Jeff Goldberg <J.Goldberg@Cranfield.ac.uk> -%% Latest Version: Version 2.4i <October 1995> +%% Jeff Goldberg <jeffrey@goldmark.org>, +%% Axel Sommerfeldt <axel.sommerfeldt@f-m.fm> +%% Maintainer: Jeff Goldberg <jeffrey@goldmark.org> +%% Latest Version: Version 2.5 <November 2011> \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} +\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 \@domarkerstrue -\@tablisttrue -\@figlisttrue -\@tabheadfalse +\@figlisttrue % bj \@figheadfalse \@tablesfirstfalse -\DeclareOption{nomarkers}{\@domarkersfalse } -\DeclareOption{markers}{\@domarkerstrue } -\newcommand{\markersintext}{\@domarkerstrue - \ef@OldCmd{\markersintext}{markers}} -\newcommand{\nomarkersintext}{\@domarkersfalse - \ef@OldCmd{\nomarkersintext}{nomarkers}} -\newcommand{\dotablist}{\@tablisttrue \ef@OldCmd{\dotablist}{tablist}} -\newcommand{\notablist}{\@tablistfalse \@tabheadtrue - \ef@OldCmd{\notablist}{notablist}} -\newcommand{\dofiglist}{\@figlisttrue \ef@OldCmd{\dofiglist}{figlist}} -\newcommand{\nofiglist}{\@figlistfalse \@figheadtrue - \ef@OldCmd{\nofiglist}{nofiglist}} -\DeclareOption{nolists}{\@tablistfalse \@figlistfalse } -\DeclareOption{lists}{\@tablisttrue \@figlisttrue } -\DeclareOption{notablist}{\@tablistfalse } -\DeclareOption{nofiglist}{\@figlistfalse } -\DeclareOption{tablist}{\@tablisttrue } -\DeclareOption{figlist}{\@figlisttrue } -\DeclareOption{heads}{\@figheadtrue \@tabheadtrue } -\DeclareOption{noheads}{\@figheadfalse \@tabheadfalse } -\DeclareOption{fighead}{\@figheadtrue } -\DeclareOption{tabhead}{\@tabheadtrue } -\DeclareOption{nofighead}{\@figheadfalse } -\DeclareOption{notabhead}{\@tabheadfalse } -\DeclareOption{tablesfirst}{\@tablesfirsttrue } -\DeclareOption{figuresfirst}{\@tablesfirstfalse } -\DeclareOption*{% - \PackageWarning{endfloat}{Unknown option `\CurrentOption'}} -\ProcessOptions -\def\efloat@newwrite#1{% +\efloat@figurestrue % as +\efloat@tablestrue % as +\RequirePackage{keyval} +\newcommand*\SetupDelayedFloat[2]{% + \def\efloat@type{#1}% + \setkeys{endfloat}{#2}} +\define@key{endfloat}{list}[true]{\efloat@setkey{list}{#1}} +\define@key{endfloat}{nolist}[]{\efloat@setkey{list}{false}} +\define@key{endfloat}{head}[true]{\efloat@setkey{head}{#1}} +\define@key{endfloat}{nohead}[]{\efloat@setkey{head}{false}} +\newcommand*\efloat@setkey{% + \@expandtwoargs\efloat@@setkey\efloat@type} +\newcommand*\efloat@@setkey[3]{% + \@ifundefined{ef@ext@#1}% + {\PackageError{endfloat}% + {Unknown environment `#1'}% + {Only environments known to the `endfloat' package are allowed here.}}% + {\efloat@setflag{#1#2}{#3}}} +\newcommand*\efloat@ifflag[1]{% + \@nameuse{ef@if@#1}} +\newcommand*\efloat@setflag[2]{% + \@nameuse{if#2}% + \global\expandafter\let\csname ef@if@#1\endcsname\@firstoftwo + \else + \global\expandafter\let\csname ef@if@#1\endcsname\@secondoftwo + \fi}% +\newcommand*\efloat@newwrite[1]{% \expandafter\newwrite\csname efloat@post#1\endcsname} -\def\efloat@openpost#1{\expandafter\immediate\expandafter\openout +\newcommand*\efloat@openpost[1]{% + \expandafter\immediate\expandafter\openout \csname efloat@post#1\endcsname =\jobname.#1\relax - \ef@setct{#1}{1} + \efloat@setflag{#1open}{true}% \message{(\jobname.#1)}} -\def\ef@newct#1{% - \expandafter \newcount \csname @ef@#1open\endcsname} -\def\ef@setct#1#2{\expandafter\global\csname @ef@#1open\endcsname=#2\relax} -\def\efloat@condopen#1{% - \expandafter\ifnum \csname @ef@#1open\endcsname>0 \relax \else - \efloat@openpost{#1}\fi} -\def\efloat@iwrite#1#2{% - \expandafter\immediate\expandafter\write\csname efloat@post#1\endcsname - {#2}} +\newcommand*\efloat@condopen[1]{% + \efloat@ifflag{#1open}{}{\efloat@openpost{#1}}} +\newcommand\efloat@iwrite[1]{% + \expandafter\immediate\expandafter\write\csname efloat@post#1\endcsname} \newcommand{\efloatseparator}{\clearpage} -\newcounter{postfig} -\efloat@newwrite{fff} -\ef@newct{fff} -\newcounter{posttbl} -\efloat@newwrite{ttt} -\ef@newct{ttt} \newcommand*{\ef@makeinnocent}[1]{\catcode`#1=12 } \providecommand{\figurename}{Figure} \providecommand{\tablename}{Table} -\newcommand{\figureplace}{% +\newcommand{\floatplace}[1]{% \begin{center} - [\figurename~\thepostfig\ about here.] + [\csname #1name\endcsname~\csname thepost#1\endcsname\ about here.] \end{center}} -\newcommand{\tableplace}{% - \begin{center} - [\tablename~\theposttbl\ about here.] - \end{center}} -\let\@bfig\figure % bj -\let\@btab\table % bj +\newcommand*\DeclareDelayedFloat{% + \@ifstar{\efloat@declare{*}}{\efloat@declare{}}} +\@onlypreamble\DeclareDelayedFloat +\newcommand*\efloat@declare[2]{% + \@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}}% + \ifx\@tempa\@tempb + \PackageError{endfloat}% + {File extension `\@tempa' is already used by the List}% + {Try using a different file extension here, e.g. `ef\expandafter\@gobbletwo\@tempa'.}% + \else + \expandafter\let\csname ef@ext@#2\endcsname\@tempa + \fi + \efloat@newwrite{#3}% + \efloat@setflag{#3open}{false}% + \@ifundefined{#2name}{\@namedef{#2name}{\@nameuse{fname@#2}}}{}% + \@namedef{#2place}{\floatplace{#2}}% + \DeclareDelayedFloatFlavor#1{#2}{#2}% + \expandafter\providecommand\csname #2section\endcsname{#4}% + \@namedef{efloat@#2@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}}% + \@cons\efloat@list{{#2}}} +\@onlypreamble\efloat@@declare +\newcommand*\efloat@list{} +\newcommand*\DeclareDelayedFloatFlavor{% + \@ifstar{\efloat@declareflavor\@gobble}% + {\efloat@declareflavor\@iden}} +\@onlypreamble\DeclareDelayedFloatFlavor +\let\DeclareDelayedFloatFlavour\DeclareDelayedFloatFlavor +\@onlypreamble\DeclareDelayedFloatFlavour +\newcommand*\efloat@declareflavor[3]{% + \@ifundefined{ef@ext@#3}% + {\PackageError{endfloat}% + {Unknown environment `#3'}% + {Only environments known to the `endfloat' package are allowed here.}}% + {\AtBeginDocument{% + \efloat@@declareflavor{#2}{#3}% + #1{\efloat@@declareflavor{#2*}{#3}}}}} +\@onlypreamble\efloat@declareflavor +\newcommand*\efloat@@declareflavor[2]{% + \def\@tempa{\@efloat{#2}{#1}}% + \@ifundefined{efloat@#1@ORI}% + {\expandafter\expandafter\expandafter\let\expandafter + \csname efloat@#1@ORI\expandafter\endcsname + \csname #1\endcsname + \expandafter\g@addto@macro\expandafter\efloat@restorefloats\expandafter{% + \expandafter\let + \csname #1\expandafter\endcsname + \csname efloat@#1@ORI\endcsname}% + \expandafter\let\csname#1\endcsname\@tempa}% + {\expandafter\ifx\csname#1\endcsname\@tempa \else + \PackageError{endfloat}% + {The environment `#1' was already redefined}% + {You can't use \noexpand\DeclareDelayedFloatFlavor twice for a given environment.}% + \fi}} +\@onlypreamble\efloat@@declareflavor +\newcommand*\efloat@restorefloats{} +\newcommand*\efloat@SetOption[1]{% + \def\@elt##1{\efloat@Setup{##1}{#1}}% + \efloat@list + \let\@elt\relax} +\newcommand\efloat@Setup[2]{% + \g@addto@macro\efloat@ProcessOptions{\SetupDelayedFloat{#1}{#2}}} +\newcommand\efloat@ProcessOptions{% + \let\efloat@SetOption\@undefined + \let\efloat@Setup\@undefined + \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{\dotablist}{% + \SetupDelayedFloat{table}{list=true}% + \ef@OldCmd{\dotablist}{tablist}} +\newcommand{\notablist}{% + \SetupDelayedFloat{table}{list=false,head=true}% + \ef@OldCmd{\notablist}{notablist}} +\newcommand{\dofiglist}{% + \SetupDelayedFloat{figure}{list=true}% + \ef@OldCmd{\dofiglist}{figlist}} +\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}} +\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{fighead}{\efloat@Setup{figure}{head=true}} +\DeclareOption{tabhead}{\efloat@Setup{table}{head=false}} +\DeclareOption{nofighead}{\efloat@Setup{figure}{head=true}} +\DeclareOption{notabhead}{\efloat@Setup{table}{head=false}} +\DeclareOption{tablesfirst}{\@tablesfirsttrue} +\DeclareOption{figuresfirst}{\@tablesfirstfalse} +\DeclareOption{tablesonly}{\efloat@figuresfalse \efloat@tablestrue} +\DeclareOption{figuresonly}{\efloat@figurestrue \efloat@tablesfalse} +\DeclareOption*{% + \PackageWarning{endfloat}{Unknown option `\CurrentOption'}} +\ProcessOptions* +\if@tablesfirst + \ifefloat@tables + \DeclareDelayedFloat{table}[ttt]{Tables} + \fi + \ifefloat@figures + \DeclareDelayedFloat{figure}[fff]{Figures} + \fi +\else + \ifefloat@figures + \DeclareDelayedFloat{figure}[fff]{Figures} + \fi + \ifefloat@tables + \DeclareDelayedFloat{table}[ttt]{Tables} + \fi +\fi +\efloat@ProcessOptions +\let\c@postfig\c@postfigure +\let\c@posttbl\c@posttable +\newcommand\thepostfig{\thepostfigure} +\newcommand\theposttbl{\theposttable} \let\efloat@float\relax -\def\figure{% - \efloat@condopen{fff} - \efloat@iwrite{fff}{\string\begin{figure*}}% - \if@domarkers% - \addtocounter{postfig}{1}% % bj - \figureplace% % bj - \fi% - \def\@currenvir{efloat@float}% - \begingroup% - \let\do\ef@makeinnocent \dospecials% - \ef@makeinnocent\^^L% and whatever other special cases - \endlinechar`\^^M \catcode`\^^M=12 \ef@xfigure}% -\def\efloat@foundend#1#2{\def\next{\endgroup\end{efloat@float}% - \efloat@iwrite{#1}{\string\end{#2}}% - \efloat@iwrite{#1}{\string\efloatseparator}% - \efloat@iwrite{#1}{ }}}% +\newcommand*\@efloat[1]{% + \expandafter\@@efloat\expandafter{\csname ef@ext@#1\endcsname}{#1}} +\newcommand*\@@efloat[3]{% + \efloat@condopen{#1}% + \if@domarkers + \stepcounter{post#2}% % bj + \@nameuse{#2place}% % bj + \fi + \def\@currenvir{efloat@float}% + \begingroup + \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}}% + \next\string\begin{#3}}% +\newcommand*\efloat@foundend[2]{% + \efloat@iwrite{#1}{\string\end{#2}}% + \efloat@found@end{#1}} +\newcommand*\efloat@found@end[1]{% + \def\next{\endgroup\end{efloat@float}% + \efloat@iwrite{#1}{\string\efloatseparator}% + \efloat@iwrite{#1}{ }}}% {\catcode`\^^M=12 \endlinechar=-1 % - \gdef\ef@xfigure#1^^M{\def\test{#1}% - \ifx\test\ef@endfiguretest - \efloat@foundend{fff}{figure*} - \else\ifx\test\ef@enddblfiguretest - \efloat@foundend{fff}{figure*} - \else% - \efloat@iwrite{fff}{#1}% - \let\next\ef@xfigure% - \fi \fi \next}% -}% + \long\gdef\ef@xfigure#1#2^^M{\def\test{#2}% + \efloat@iwrite{#1}{#2}% + \ifx\test\ef@endfiguretest + \efloat@found@end{#1}% + \fi \next}} {\escapechar=-1% - \xdef\ef@endfiguretest{\string\\end\string\{figure\string\}}% - \xdef\ef@enddblfiguretest{\string\\end\string\{figure*\string\}}% -}% -\def\table{\efloat@condopen{ttt} - \efloat@iwrite{ttt}{\string\begin{table*}}% - \if@domarkers - \addtocounter{posttbl}{1} % bj - \tableplace % bj - \fi - \def\@currenvir{efloat@float}% - \begingroup - \let\do\ef@makeinnocent \dospecials - \ef@makeinnocent\^^L% and whatever other special cases - \endlinechar`\^^M \catcode`\^^M=12 \ef@xtable} -{\catcode`\^^M=12 \endlinechar=-1 % - \gdef\ef@xtable#1^^M{\def\test{#1} - \ifx\test\ef@enddbltabletest - \efloat@foundend{ttt}{table*} - \else\ifx\test\ef@endtabletest - \efloat@foundend{ttt}{table*} - \else - \efloat@iwrite{ttt}{#1}% - \let\next\ef@xtable - \fi \fi \next} -} -{\escapechar=-1 - \xdef\ef@enddbltabletest{\string\\end\string\{table*\string\}} - \xdef\ef@endtabletest{\string\\end\string\{table\string\}} + \xdef\ef@endfiguretest{\string\\end\string\{X\string\}} } -\@namedef{figure*}{\figure} -\@namedef{table*}{\table} -\providecommand{\figuresection}{Figures} -\providecommand{\tablesection}{Tables} -\newcommand{\processfigures@hook}{\@empty} -\def\AtBeginFigures{\g@addto@macro\processfigures@hook} -\newcommand{\processtables@hook}{\@empty} -\def\AtBeginTables{\g@addto@macro\processtables@hook} -\newcommand{\processdelayedfloats@hook}{\@empty} +\newcommand*\efloat@patch[2]{% + \def\x##1X##2\@nil{\def#1{##1#2##2}}% + \expandafter\x#1\@nil} +\newcommand{\processdelayedfloats@hook}{} \def\AtBeginDelayedFloats{% \g@addto@macro\processdelayedfloats@hook} -\newcommand{\processotherdelayedfloats}{\@empty} -\def\processfigures{% - \expandafter\ifnum \csname @ef@fffopen\endcsname>0 - \immediate\closeout\efloat@postfff \ef@setct{fff}{0} - \clearpage % bj - \if@figlist % bj - {\normalsize\listoffigures} % bj - \clearpage % bj - \fi - \if@fighead - \section*{\figuresection} % bj - \suppressfloats[t] % jpg - \fi - \markboth{\uppercase{\figuresection}}{\uppercase{\figuresection}}% bj - \processfigures@hook \@input{\jobname.fff} - \fi} -\def\processtables{% - \expandafter\ifnum \csname @ef@tttopen\endcsname>0 - \immediate\closeout\efloat@postttt \ef@setct{ttt}{0} - \clearpage % bj - \if@tablist % bj - {\normalsize\listoftables} % bj - \clearpage % bj - \fi - \if@tabhead - \section*{\tablesection} % bj - \suppressfloats[t] % jpg - \fi - \markboth{\uppercase{\tablesection}}{\uppercase{\tablesection}}% bj - \processtables@hook \@input{\jobname.ttt} - \fi} +\newcommand{\processotherdelayedfloats}{} +\newcommand*\efloat@process[2]{% + \efloat@ifflag{#1open}{% + \expandafter\immediate\expandafter\closeout\csname efloat@post#1\endcsname + \efloat@setflag{#1open}{false}% + \clearpage % bj + \efloat@ifflag{#2list}{% % bj + {\normalsize\efloat@listof{#2}}% % bj + \clearpage % bj + }{}% + \efloat@ifflag{#2head}{% + \section*{\@nameuse{#2section}}% % bj + \suppressfloats[t]% % jpg + }{}% + \markboth % bj + {\expandafter\uppercase\expandafter{\csname #2section\endcsname}}% bj + {\expandafter\uppercase\expandafter{\csname #2section\endcsname}}% bj + \@nameuse{efloat@#2@hook}% + \@input{\jobname.#1}% + }{}} +\newcommand*\efloat@listof[1]{% + \expandafter\providecommand\csname list#1name\endcsname + {List of \@nameuse{#1section}}% + \@ifundefined{listof#1s}% + {\@ifundefined{listof}% + {\PackageError{endfloat}% + {Don't know how to make List of `#1'}% + {You could try defining \protect\listof#1s on your own}}% + {\listof{#1}{\@nameuse{list#1name}}}}% + {\@nameuse{listof#1s}}} \renewcommand{\bottomfraction}{1.0} \renewcommand{\topfraction}{1.0} \renewcommand{\textfraction}{0.0} \newcommand{\processdelayedfloats}{{% \def\baselinestretch{1}\normalsize - \let\figure\@bfig - \let\table\@btab - \processdelayedfloats@hook - \if@tablesfirst \processtables\processfigures - \else \processfigures\processtables \fi - \processotherdelayedfloats}} + \efloat@restorefloats + \processdelayedfloats@hook + \efloat@processfloats + \processotherdelayedfloats}} +\newcommand*\efloat@processfloats{% + \let\@tempa\@empty + \def\@elt##1{\g@addto@macro\@tempa{\@nameuse{process##1es}}}% + \efloat@list + \let\@elt\relax + \@tempa} \AtEndDocument{% % jpg \message{AED endfloat: Processing end Figures and Tables}% % jpg \onecolumn |