1 % \iffalse meta-comment
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
33 \ProvidesFile{latexrelease.dtx}
35 %<driver>\ProvidesFile{latexrelease.drv}
36 %<fixltx2e>\ProvidesPackage{fixltx2e}
37 %<fixltx2e> [2016/12/29 v2.1a fixes to LaTeX (obsolete)]
38 %<latexrelease>\ProvidesPackage{latexrelease}
41 % \ProvidesFile{latexrelease.dtx}
42 [2016/12/29 v1.0h LaTeX release emulation and tests]
46 \documentclass{ltxdoc}
47 \newcommand\Lopt[1]{\textsf{#1}}
49 \providecommand{\file}[1]{\texttt{#1}}
50 \providecommand{\MF}{\textsf{Metafont}}
51 \providecommand{\danger}{\marginpar[\hfill\protect\Huge!!]{\protect\Huge!!\hfill}}
53 \DocInput{latexrelease.dtx}
63 % \GetFileInfo{latexrelease.dtx}
65 % \title{The \Lpack{latexrelease} package\thanks{This file
66 % has version number \fileversion, last
67 % revised \filedate.}}
68 % \author{The \LaTeX3 Project}
70 % \MaintainedByLaTeXTeam{latex}
73 % \section{Introduction}
74 % Prior to the 2015 release of \LaTeX{}, essentially no changes had been
75 % made to the \LaTeX\ format code for some years, with all
76 % improvements being instead added to the package \Lpack{fixltx2e}.
78 % While this worked at a technical level it meant that you had to
79 % explicitly opt-in to bug fixes and improvements, and the vast
80 % majority of documents did not benefit.
82 % As described in \LaTeX\ News 22, a new policy is being implemented
83 % in which improvements will now be added to the format by default,
84 % and this \Lpack{latexrelease} package may be used to ensure
85 % stability where needed, either by making a new format use an older
86 % definition of some commands, or conversely may be used to supply the
87 % new definitions for use with an old format.
91 % \RequirePackage[2015/01/01]{latexrelease}
92 % \documentclass{article}
96 % After such a declaration the document will use definitions current
97 % in the January 2015 \LaTeX{}, whether the actual format being used is
98 % older, or newer than that date. In the former case a copy of
99 % |latexrelease.sty| would need to be made available for use with the
100 % older format. This may be used, for example, to share a document
101 % between co-workers using different \LaTeX\ releases, or to protect a
102 % document from being affected by system updates. As well as the
103 % definitions within the format itself, individual packages may use
104 % the commands defined here to adjust their definitions to the
105 % specified date as described below.
108 % The bulk of this package, after some initial setup and option
109 % handling consists of a series of |\IncludeInRelease| commands
110 % which have been extracted from the main source files of the \LaTeX\
111 % format. These contain the old and new versions of any commands with
112 % modified definitions.
114 % \section{Package Options}
116 % \item \emph{yyyy/mm/dd}
117 % The package accepts any \LaTeX\ format date as argument,%
118 % although dates in the future for which the current release of this
119 % package has no information will generate a warning.
122 % |current| This is the default behaviour, it does not change the
123 % effective date of the format but does ensure that the
124 % |\IncludeInRelease| command is defined.
127 % |latest| sets the effective date of the format to the release date
128 % of this file, so in an older format applies all patches currently
133 % \section{Release Specific Code}
135 % The |\IncludeInRelease| mechanism allows the kernel developer to
136 % associate code with a specific date to choose different versions of
137 % definitions depending on the date specified as an option to the
138 % \Lpack{latexrelease} package. Is also available for use by package
139 % authors (or even in a document if necessary).
143 % \noindent\DescribeMacro{\IncludeInRelease}
144 % \marg{code-date}^^A
145 % \oarg{format-date}%^^A
149 % |\EndIncludeInRelease|
151 % \begin{description}
153 % \item[\marg{code-date}] This date is associated with the \marg{code}
154 % argument and will be compared to the requested date in the option to
155 % the \Lpack{latexrelease}.
157 % \item[\oarg{format-date}] This optional argument can be used to
158 % specify a format date with the code in addition to the mandatory
159 % \marg{code-date} argument. This can be useful for package developers
160 % as described below.
162 % \item[\marg{label}] The \marg{label} argument is an identifier
163 % (string) that within a given package must be a unique label for each
164 % related set of optional definitions. Per package at most one code
165 % block from all the |\IncludeInRelease| declarations with the same
166 % label will be executed.
168 % \item[\marg{message}]
169 % The \marg{message} is an informative string that is used in
170 % messages. It has no other function.
173 % Any \TeX\ code after the |\IncludeInRelease| arguments
174 % up until the and the following |\EndIncludeInRelease|
176 % conditionally included depending on the date of the format as
181 % The |\IncludeInRelease| declarations with a given label should be in
182 % reverse chronological order in the file. The one chosen will depend
183 % on this order, the effective format version and the date options, as
186 % If your package \Lpack{mypackage} defines a |\widget| command but
187 % has one definition using the features available in the 2015 \LaTeX\
188 % release, and a different definition is required for older formats
191 % \IncludeInRelease{2015/01/01}{\widget}{Widget Definition}
192 % \def\widget{new version}%
193 % \EndIncludeInRelease
195 % \IncludeInRelease{0000/00/00}{\widget}{Widget Definition}
196 % \def\widget{old version}%
197 % \EndIncludeInRelease
200 % If a document using this package is used with a format with
201 % effective release date of 2015/01/01 or later the new code will be
202 % used, otherwise the old code will be used. Note the \emph{effective
203 % release date} might be the original \LaTeX\ release date as shown at
204 % the start of every \LaTeX\ job, or it may be set by the
205 % \Lpack{latexrelease} package, so for example a document author who
206 % wants to ensure the new version is used could use
208 % \RequirePackage[2015/01/01]{latexrelease}
209 % \documentclass{article}
210 % \usepackage{mypackage}
213 % If the document is used with a \LaTeX\ format from 2014 or before,
214 % then \Lpack{latexrelease} will not have been part of the original
215 % distribution, but it may be obtained from a later \LaTeX\ release or
216 % from CTAN and distributed with the document, it will make an older
217 % \LaTeX\ release act essentially like the 2015 release.
219 % \subsection{Intermediate Package Releases}
221 % The above example works well for testing against the latex format
222 % but is not always ideal for controlling code by the release date of
223 % the \emph{package}. Suppose \LaTeX\ is not updated but in March you
224 % update the \Lpack{mypackage} package and modify the definition of
225 % |\widget|. You could code the package as:
227 % \IncludeInRelease{2015/03/01}{\widget}{Widget Definition}
228 % \def\widget{even newer improved March version}%
229 % \EndIncludeInRelease
231 % \IncludeInRelease{2015/01/01}{\widget}{Widget Definition}
232 % \def\widget{new version}%
233 % \EndIncludeInRelease
235 % \IncludeInRelease{0000/00/00}{\widget}{Widget Definition}
236 % \def\widget{old version}%
237 % \EndIncludeInRelease
240 % This would work and allow a document author to choose a date such as
242 % \RequirePackage[2015/03/01]{latexrelease}
243 % \documentclass{article}
244 % \usepackage{mypackage}
247 % To use the latest version, however it would have disadvantage that
248 % until the next release of \LaTeX, by default, if the document does
249 % not use \Lpack{latexrelease} to specify a date, the new improved
250 % code will not be selected as the effective date will be 2015/01/01
251 % and so the first code block will be skipped.
253 % For this reason |\IncludeInRelease| has an optional argument that
254 % specifies an alternative date to use if a date option has not been
255 % specified to \Lpack{latexrelease}.
257 % \IncludeInRelease{2015/03/01}[2015/01/01]{\widget}{Widget Definition}
258 % \def\widget{even newer improved March version}%
259 % \EndIncludeInRelease
261 % \IncludeInRelease{2015/01/01}{\widget}{Widget Definition}
262 % \def\widget{new version}%
263 % \EndIncludeInRelease
265 % \IncludeInRelease{0000/00/00}{\widget}{Widget Definition}
266 % \def\widget{old version}%
267 % \EndIncludeInRelease
270 % Now, by default on a 2015/01/01 \LaTeX\ format, the first code block
271 % will compare the format date to the optional argument 2015/01/01
272 % and so will execute the \emph{even newer improved} version. The
273 % remaining blocks using the |\widget| label argument will all then be
276 % If on the other hand the document requests an explicit release date
277 % using \Lpack{latexrelease} then this date will be used to decide what
278 % code block to include.
280 % \subsection{Using \cs{IncludeInRelease} in Packages}
282 % If |\IncludeInRelease| is used within a package then all such
283 % conditional code needs to be within such declarations, e.g., it is
284 % not possible in the above example to have the ``current'' definition
285 % of |\widget| somewhere in the main code and only the two older
286 % definitions inside |\IncludeInRelease| declarations. If you would do
287 % this then one of those |\IncludeInRelease| declarations would be
288 % included overwriting the even newer code in the main part of the
289 % package. As a result your package may get fragmented over time with
290 % various |\IncludeInRelease| declarations sprinkled throughout your
291 % code or you have to interrupt the reading flow by putting those
292 % declarations together but not necessarily in the place where they
295 % To avoid this issue you can use the following coding
296 % strategy: place the current |\widget| definition in the main code
297 % where it correctly belongs.
300 % \def\widget {even newer improved March version}
301 % \def\@widget{newly added helper command no defined in older releases}
304 % Then, near the end of your package place
307 % \IncludeInRelease{2015/03/01}[2015/01/01]{\widget}{Widget Definition}
308 % \EndIncludeInRelease
310 % \IncludeInRelease{2015/01/01}{\widget}{Widget Definition}
311 % \def\widget{new version}%
312 % \let\@widget\@undefined % this doesn't exist in earlier releases
313 % \EndIncludeInRelease
315 % \IncludeInRelease{0000/00/00}{\widget}{Widget Definition}
316 % \def\widget{old version}%
317 % \EndIncludeInRelease
319 % This way the empty code block hides the other |\IncludeInRelease|
320 % declarations unless there is an explicit request with a date
321 % 2015/01/01 or earlier.
323 % Now if you make a further change to |\widget| in the future you
324 % simply copy the current definition into the empty block and add a new
325 % empty declaration with todays date and the current format date. This
326 % way your main code stays readable and the old versions accumulate at
327 % the end of the package.\footnote{Of course there may be some cases
328 % in which the old code has to be in a specific place within the
329 % package as other code depends on it (e.g., if you
330 % \texttt{\string\let} something to it). In that case you have to
331 % place the code variations in the right place in your package rather
332 % than accumulating them at the very end.}
334 % The only other ``extra effort'' necessary when using this approach
335 % is that it may be advisable to undo new definitions in the code
336 % block for the previous release, e.g., in the above example we
337 % undefined |\@widget| as that isn't available in the 2015/01/01
338 % release but was defined in the main code. If all your conditional
339 % code is within |\IncludeInRelease| declarations that wouldn't been
340 % necessary as the new code only gets defined if that release is
345 % As noted above, prior to the 2015 \LaTeX\ release updates to the
346 % \LaTeX\ kernel were not made in the format source files but were
347 % made available in the \Lpack{fixltx2e} package. That package is no
348 % longer needed but we generate a small package from this source
349 % that just makes a warning message but otherwise does nothing.
357 % \section{Implementation}
359 % We require at least a somewhat sane version of \LaTeXe{}. Earlier
360 % ones where really quite different from one another.
363 \NeedsTeXFormat{LaTeX2e}[1996/06/01]
368 % \begin{macro}{\IncludeInRelease}
369 % \begin{macro}{\EndIncludeInRelease}
375 % \changes{v1.0c}{2015/02/19}{Swap argument order}
378 \def\@IncludeInRelease#1[#2]{\@IncludeInRele@se{#1}}%
379 \let\requestedpatchdate\CurrentOption}
380 \DeclareOption{latest}{%
381 \let\requestedpatchdate\latexreleaseversion}
382 \DeclareOption{current}{%
383 \let\requestedpatchdate\fmtversion}
387 \ExecuteOptions{current}
388 \ProcessOptions\relax
391 % Sanity check options, it allows some non-legal dates but always
392 % ensures |requestedLaTeXdate| gets set to a number. Generate an
393 % error if there are any non digit tokens remaining after removing the
397 \edef\requestedLaTeXdate{\the\count@}%
399 \def\reserved@b#1\\{%
401 \ifx\reserved@b\@empty\else
402 \PackageError{latexrelease}%
403 {Unexpected option \requestedpatchdate}%
404 {The option must be of the form yyyy/mm/dd}%
406 \afterassignment\reserved@a
408 \@parse@version\expandafter0\requestedpatchdate//00\@nil\\
411 % less precautions needed for |\fmtversion|
413 \edef\currentLaTeXdate{%
414 \expandafter\@parse@version\fmtversion//00\@nil}
418 \ifnum\requestedLaTeXdate=\currentLaTeXdate
419 \PackageWarningNoLine{latexrelease}{%
420 Current format date selected, no patches applied.}
421 \expandafter\endinput
425 % A newer version of latexrelease should have been distributed with
428 \ifnum\currentLaTeXdate
429 >\expandafter\@parse@version\latexreleaseversion//00\@nil
430 \PackageWarningNoLine{latexrelease}{%
431 The current package is for an older LaTeX format:\MessageBreak
432 LaTeX \latexreleaseversion\space\MessageBreak
433 Obtain a newer version of this package!}
434 \expandafter\endinput
437 % can't patch into the future, could make this an error
438 % but it has some uses to control package updates
441 \ifnum\requestedLaTeXdate
442 >\expandafter\@parse@version\latexreleaseversion//00\@nil
443 \PackageWarningNoLine{latexrelease}{%
444 The current package is for LaTeX \latexreleaseversion:\MessageBreak
445 It has no patches beyond that date\MessageBreak
446 There may be an updated version\MessageBreak
447 of this package available from CTAN}
448 \expandafter\endinput
452 % Update the format version to the requested date.
454 \let\fmtversion\requestedpatchdate
455 \let\currentLaTeXdate\requestedLaTeXdate
459 % \section{Individual Changes}
461 % The code for each change will be inserted at this point, extracted
462 % from the kernel source files.
470 % Generate a stub \Lpack{fixltx2e} package:
473 \IncludeInRelease{2015/01/01}{\fixltxe}{Old fixltx2e package}
474 \NeedsTeXFormat{LaTeX2e}
475 \PackageWarningNoLine{fixltx2e}{%
476 fixltx2e is not required with releases after 2015\MessageBreak
477 All fixes are now in the LaTeX kernel.\MessageBreak
478 See the latexrelease package for details}
480 \IncludeInRelease{0000/00/00}{\fixltxe}{Old fixltx2e package}
483 \global\@firstcolumnfalse
484 \global\setbox\@leftcolumn\copy\@outputbox
485 \splitmaxdepth\maxdimen
487 \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
488 \setbox\@outputbox\vsplit\@outputbox to\maxdimen
489 \toks@\expandafter{\topmark}%
490 \xdef\@firstcoltopmark{\the\toks@}%
491 \toks@\expandafter{\splitfirstmark}%
492 \xdef\@firstcolfirstmark{\the\toks@}%
493 \ifx\@firstcolfirstmark\@empty
494 \global\let\@setmarks\relax
497 \let\firstmark\@firstcolfirstmark
498 \let\topmark\@firstcoltopmark}%
501 \global\@firstcolumntrue
502 \setbox\@outputbox\vbox{%
504 \hb@xt@\columnwidth{\box\@leftcolumn \hss}%
506 {\normalcolor\vrule \@width\columnseprule}%
508 \hb@xt@\columnwidth{\box\@outputbox \hss}}}%
515 \@whilesw\if@fcolmade \fi{\@outputpage\@startdblcolumn}%
521 \ifnum\@floatpenalty <\z@
523 \global\dp\@currbox1sp %
524 \@cons\@currlist\@currbox
525 \ifnum\@floatpenalty <-\@Mii
530 \penalty\@floatpenalty
532 \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
539 \def\@testwrongwidth #1{%
545 \def\@dblfloatplacement{\global\@dbltopnum\c@dbltopnumber
546 \global\@dbltoproom \dbltopfraction\@colht
548 \advance \@textmin -\@dbltoproom
549 \@fpmin \dblfloatpagefraction\textheight
554 \def \@doclearpage {%
556 \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
557 \setbox\@tempboxa\box\@cclv
558 \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
559 \global \let \@toplist \@empty
560 \global \let \@botlist \@empty
561 \global \@colroom \@colht
562 \ifx \@currlist\@empty
564 \@latexerr{Float(s) lost}\@ehb
565 \global \let \@currlist \@empty
567 \@makefcolumn\@deferlist
568 \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
571 \xdef\@deferlist{\@dbltoplist\@deferlist}%
572 \global \let \@dbltoplist \@empty
573 \global \@colht \textheight
576 \@makefcolumn\@deferlist
577 \@whilesw\if@fcolmade \fi{\@outputpage
578 \@makefcolumn\@deferlist}%
584 \ifx\@deferlist\@empty \else\clearpage \fi
586 \setbox\@cclv\vbox{\box\@cclv\vfil}%
591 \def \@startdblcolumn {%
592 \@tryfcolumn \@deferlist
596 \let \reserved@b \@deferlist
597 \global \let \@deferlist \@empty
598 \let \@elt \@sdblcolelt
612 \@reqcolroom \ht\@currbox
613 \advance \@reqcolroom \@textmin
614 \ifdim \@colroom>\@reqcolroom
617 \@bitor\@currtype\@deferlist
618 \@testwrongwidth\@currbox
629 \@cons\@deferlist\@currbox
639 \@flsetnum \@dbltopnum
640 \ifnum \@dbltopnum>\z@
642 \ifdim \@dbltoproom>\ht\@currbox
645 \ifnum \@fpstype<\sixt@@n
646 \advance \@dbltoproom \@textmin
647 \ifdim \@dbltoproom>\ht\@currbox
650 \advance \@dbltoproom -\@textmin
654 \@bitor \@currtype \@deferlist
655 \@testwrongwidth\@currbox
658 \@tempdima -\ht\@currbox
660 -\ifx \@dbltoplist\@empty \dbltextfloatsep \else
662 \global \advance \@dbltoproom \@tempdima
663 \global \advance \@colht \@tempdima
664 \global \advance \@dbltopnum \m@ne
665 \@cons \@dbltoplist \@currbox
673 \@cons\@deferlist\@currbox
677 \def \@addtocurcol {%
685 \advance \@textmin \@textfloatsheight
686 \@reqcolroom \@pageht
687 \ifdim \@textmin>\@reqcolroom
688 \@reqcolroom \@textmin
690 \advance \@reqcolroom \ht\@currbox
691 \ifdim \@colroom>\@reqcolroom
694 \@bitor\@currtype\@deferlist
695 \@testwrongwidth\@currbox
698 \@bitor\@currtype\@botlist
702 \ifodd \count\@currbox
703 \advance \@reqcolroom \intextsep
704 \ifdim \@colroom>\@reqcolroom
705 \global \advance \@colnum \m@ne
706 \global \advance \@textfloatsheight \ht\@currbox
707 \global \advance \@textfloatsheight 2\intextsep
708 \@cons \@midlist \@currbox
714 \addpenalty \interlinepenalty
718 \penalty\interlinepenalty
720 \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
738 \@cons\@deferlist\@currbox
742 \@next\reserved@a\@trylist{}{}%
743 \@currtype \count #1%
744 \divide\@currtype\@xxxii
745 \multiply\@currtype\@xxxii
746 \@bitor \@currtype \@failedlist
749 \ifdim \ht #1>\@colht
753 \@cons\@failedlist #1%
759 \divide\@tempcnta\@xxxii
760 \multiply\@tempcnta\@xxxii
761 \@bitor \@tempcnta {\@failedlist \@flfail}%
765 \advance\@tempdimb\ht #1%
766 \advance\@tempdimb\@fpsep
767 \ifdim \@tempdimb >\@colht
773 \@cons\@flsucceed #1%
776 \def\@{\spacefactor\@m{}}
777 \def\@tempa#1#2{#1#2\relax}
778 \ifx\setlength\@tempa
779 \def\setlength#1#2{#1 #2\relax}
793 \ifdim\prevdepth>\maxdepth\maxdepth\else
794 \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
809 \ifcase#1\or \TextOrMath\textasteriskcentered *\or
810 \TextOrMath \textdagger \dagger\or
811 \TextOrMath \textdaggerdbl \ddagger \or
812 \TextOrMath \textsection \mathsection\or
813 \TextOrMath \textparagraph \mathparagraph\or
814 \TextOrMath \textbardbl \|\or
815 \TextOrMath {\textasteriskcentered\textasteriskcentered}{**}\or
816 \TextOrMath {\textdagger\textdagger}{\dagger\dagger}\or
817 \TextOrMath {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}\else
820 \begingroup\expandafter\expandafter\expandafter\endgroup
821 \expandafter\ifx\csname eTeXversion\endcsname\relax
822 \DeclareRobustCommand\TextOrMath{%
823 \ifmmode \expandafter\@secondoftwo
824 \else \expandafter\@firstoftwo \fi}
825 \protected@edef\TextOrMath#1#2{\TextOrMath{#1}{#2}}
827 \protected\expandafter\def\csname TextOrMath\space\endcsname{%
828 \ifmmode \expandafter\@secondoftwo
829 \else \expandafter\@firstoftwo \fi}
830 \edef\TextOrMath#1#2{%
831 \expandafter\noexpand\csname TextOrMath\space\endcsname
839 \nobreak \hskip\z@skip % <------
848 \nobreak \hskip\z@skip % <------
853 \DeclareRobustCommand\em
854 {\@nomath\em \ifdim \fontdimen\@ne\font >\z@
855 \eminnershape \else \itshape \fi}
856 \def\eminnershape{\upshape}
857 \DeclareRobustCommand*\textsubscript[1]{%
858 \@textsubscript{\selectfont#1}}
859 \def\@textsubscript#1{%
860 {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
861 \def\@DeclareMathSizes #1#2#3#4#5{%
862 \@defaultunits\dimen@ #2pt\relax\@nnil
864 \expandafter\let\csname S@\strip@pt\dimen@\endcsname\math@fontsfalse
866 \@defaultunits\dimen@ii #3pt\relax\@nnil
867 \@defaultunits\@tempdima #4pt\relax\@nnil
868 \@defaultunits\@tempdimb #5pt\relax\@nnil
870 \expandafter\xdef\csname S@\strip@pt\dimen@\endcsname{%
871 \gdef\noexpand\tf@size{\strip@pt\dimen@ii}%
872 \gdef\noexpand\sf@size{\strip@pt\@tempdima}%
873 \gdef\noexpand\ssf@size{\strip@pt\@tempdimb}%
878 \providecommand*\MakeRobust[1]{%
879 \@ifundefined{\expandafter\@gobble\string#1}{%
880 \@latex@error{The control sequence `\string#1' is undefined!%
881 \MessageBreak There is nothing here to make robust}%
885 \@ifundefined{\expandafter\@gobble\string#1\space}%
887 \expandafter\let\csname
888 \expandafter\@gobble\string#1\space\endcsname=#1%
889 \edef\reserved@a{\string#1}%
891 \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
893 \ifx\reserved@a\reserved@b
894 \noexpand\x@protect\noexpand#1%
896 \noexpand\protect\expandafter\noexpand
897 \csname\expandafter\@gobble\string#1\space\endcsname}%
899 {\@latex@info{The control sequence `\string#1' is already robust}}%
912 \def\@xfloat #1[#2]{%
916 \@onelevel@sanitize \@fps
917 \def \reserved@b {!}%
918 \ifx \reserved@b \@fps
927 \@floatpenalty -\@Mii
929 \@floatpenalty-\@Miii
932 \@parmoderr\@floatpenalty\z@
934 \@next\@currbox\@freelist
937 \expandafter \@tfor \expandafter \reserved@a
938 \expandafter :\expandafter =\@fps
944 \advance \@tempcnta \@ne
946 \else\if \reserved@a t%
948 \else\if \reserved@a b%
950 \else\if \reserved@a p%
952 \else\if \reserved@a !%
954 \advance\@tempcnta -\sixt@@n\relax
957 \@latex@error{Unknown float option `\reserved@a'}%
958 {Option `\reserved@a' ignored and `p' used.}%
962 \@tempcntb \csname ftype@\@captype \endcsname
963 \multiply \@tempcntb \@xxxii
964 \advance \@tempcnta \@tempcntb
965 \global \count\@currbox \@tempcnta
969 \global \setbox\@currbox
977 \def\@stpelt#1{\global\csname c@#1\endcsname \m@ne\stepcounter{#1}}