summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/endfloat/endfloat.sty
blob: 4d93295204cfbf7ad68b196f52e981c656186c8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
%%
%% This is file `endfloat.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% endfloat.dtx  (with options: `package')
%% 
%% 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
%% 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.
%% 
%% The usual disclaimers apply:  If it doesn't work right that's your
%% problem (but do let me know).
%% 
%% The usual GNU-style conditions apply: If you change it, you take
%% 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}
%% \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
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
%% 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>
\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
\@domarkerstrue
\@tablisttrue
\@figlisttrue
\@tabheadfalse
\@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{%
   \expandafter\newwrite\csname efloat@post#1\endcsname}
\def\efloat@openpost#1{\expandafter\immediate\expandafter\openout
      \csname efloat@post#1\endcsname =\jobname.#1\relax
   \ef@setct{#1}{1}
   \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{\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}{%
   \begin{center}
     [\figurename~\thepostfig\ about here.]
   \end{center}}
\newcommand{\tableplace}{%
   \begin{center}
      [\tablename~\theposttbl\ about here.]
   \end{center}}
\let\@bfig\figure             % bj
\let\@btab\table              % bj
\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}{ }}}%
{\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}%
}%
{\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\}}
}
\@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}
\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}
\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}}
\AtEndDocument{%                                      % jpg
   \message{AED endfloat: Processing end Figures and Tables}% % jpg
   \onecolumn
   \processdelayedfloats }
\InputIfFileExists{endfloat.cfg}{%
   \typeout{*** Using endfloat.cfg ***}}{}
\endinput
%%
%% End of file `endfloat.sty'.