Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/tex/latex/endfloat/endfloat.sty

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


%% 
%% 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'.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.