summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/base/fixltx2e.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/base/fixltx2e.dtx')
-rw-r--r--Master/texmf-dist/source/latex/base/fixltx2e.dtx333
1 files changed, 228 insertions, 105 deletions
diff --git a/Master/texmf-dist/source/latex/base/fixltx2e.dtx b/Master/texmf-dist/source/latex/base/fixltx2e.dtx
index d9d91e43636..c67813a566a 100644
--- a/Master/texmf-dist/source/latex/base/fixltx2e.dtx
+++ b/Master/texmf-dist/source/latex/base/fixltx2e.dtx
@@ -1,34 +1,34 @@
% \iffalse meta-comment
%
-% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
+% Copyright 1993-2014
% The LaTeX3 Project and any individual authors listed elsewhere
-% in this file.
-%
+% in this file.
+%
% This file is part of the LaTeX base system.
% -------------------------------------------
-%
+%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
+% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
-%
+%
% This file has the LPPL maintenance status "maintained".
-%
+%
% The list of all files belonging to the LaTeX base distribution is
% given in the file `manifest.txt'. See also `legal.txt' for additional
% information.
-%
-% The list of derived (unpacked) files belonging to the distribution
-% and covered by LPPL is defined by the unpacking scripts (with
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
-%
+%
% \fi
%
% \iffalse
-%
+%
%<*dtx>
\ProvidesFile{fixltx2e.dtx}
%</dtx>
@@ -38,7 +38,7 @@
%<driver>\ProvidesFile{fixltx2e.drv}
% \fi
% \ProvidesFile{fixltx2e.dtx}
- [2006/09/13 v1.1m fixes to LaTeX]
+ [2014/04/27 v1.1p fixes to LaTeX]
%
% \iffalse
%<*driver>
@@ -54,7 +54,7 @@
%</driver>
% \fi
%
-% \CheckSum{1078}
+% \CheckSum{1213}
%
%% \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
@@ -89,9 +89,9 @@
%
% \begin{abstract}
% These packages provides fixes to \LaTeXe{} which are desirable
-% but cannot be integrated into the \LaTeXe{} kernel or the
-% font definition files directly as they would produce a version
-% incompatible to earlier releases (either in formatting or
+% but cannot be integrated into the \LaTeXe{} kernel or the
+% font definition files directly as they would produce a version
+% incompatible to earlier releases (either in formatting or
% functionality).
%
% By providing these fixes in the form of packages, users can benefit
@@ -114,7 +114,7 @@
% classes are not concerned with bugs but are suggesting, more or
% less politely, that the design decisions embodied in them are
% `not optimal' and asking us to modify them.
-%
+%
% There are several reasons why we have decided not to make such
% changes to these files.
% \begin{itemize}
@@ -123,7 +123,7 @@
% good practice to change such aspects of `standard classes'
% because many people will be relying on them.
% \end{itemize}
-%
+%
% We have therefore decided not to even consider making such
% modifications, nor to spend time justifying that decision. This
% does not mean that we do not agree that there are many
@@ -146,7 +146,7 @@
%
% In theory one could get around this by adding a line like
% \begin{quote}
-% |\NeedsTeXFormat{latex2e}[|\meta{date}|]|
+% |\NeedsTeXFormat{latex2e}[|\meta{date}|]|
% \end{quote}
% on top of the document. However, this fails for two reasons. Firstly,
% most people will not be aware that they make use of a feature or fix
@@ -156,7 +156,7 @@
% in time to process the document properly (the latter is a sad fact
% of life).
%
-% By providing the \Lpack{fixltx2e} and \Lpack{fix-cm} packages
+% By providing the \Lpack{fixltx2e} and \Lpack{fix-cm} packages
% we hope to help people in this respect since, when they
% are used, a document will contain a clear
% indication that special features/fixes are needed and if the
@@ -164,10 +164,10 @@
% with the right version) it is far easier to download and install them
% from some archive than to upgrade \LaTeX{} in a rush.
%
-% The packages are independent from each other and deal with different
+% The packages are independent from each other and deal with different
% subjects:
% \Lpack{fixltx2e} provides general changes to the \LaTeX{} kernel,
-% while \Lpack{fix-cm} improves the definitions of the Computer Modern
+% while \Lpack{fix-cm} improves the definitions of the Computer Modern
% font families.
%
% We will try to maintain the packages in such a way that they can be used
@@ -189,14 +189,14 @@
% |\usepackage{fixltx2e}[|\meta{date}|]|
% \end{quote}
% into the preamble of your document, where \meta{date} is the date of
-% the \Lpack{fixltx2e} package that you are using.
+% the \Lpack{fixltx2e} package that you are using.
% This way your document will produce a warning if processed at a site
% that only has an older version of of this package.
%
% \subsection{Using \Lpack{fix-cm}}
%
% \begin{sloppypar}
-% To use the \Lpack{fix-cm} package,
+% To use the \Lpack{fix-cm} package,
% load \danger it \emph{before} \cmd{\documentclass},
% and use the command \cmd{\RequirePackage} to do so, rather than the
% normal \cmd{\usepackage}:
@@ -205,8 +205,8 @@
% |\RequirePackage{fix-cm}|\\
% |\documentclass| \dots
% \end{verse}
-% \textbf{Do not to load any other package before the document class},
-% unless you have a thorough understanding of the \LaTeX{} internals
+% \textbf{Do not to load any other package before the document class},
+% unless you have a thorough understanding of the \LaTeX{} internals
% and know exactly what you are doing!
%
%
@@ -219,7 +219,7 @@
%
%
%
-% \subsection{2-col: 1-col fig can come before earlier 2-col fig
+% \subsection{2-col: 1-col fig can come before earlier 2-col fig
% (pr/2346)}
%
%\begin{verbatim}
@@ -235,7 +235,7 @@
% table." however, there is a footnote stating, "However,
% in two-column page style, a single-column figure can come before
% an earlier double-column figure, and vice versa."
-%
+%
% this twocolumn behavior is undesireable---at least by me and
% most professional organizations i publish in. ed snyzter developed
% a hack fix for 2.09 several years ago which links the two
@@ -287,7 +287,7 @@
% float is committed to a certain region, an additional check must be
% made to check that the float is (or is not) double column. If it
% spans the wrong number of columns it is deferred rather than being
-% added.
+% added.
%
% Unfortunately the bit `16' is not available in \LaTeXe. It is used
% to encode the extra float position possibility `|!|' that was added
@@ -406,7 +406,7 @@
%
% \section{Fixes added for 2003/06/01}
%
-% \subsection{\texttt{\textbackslash fnsymbol} should use text symbols
+% \subsection{\texttt{\textbackslash fnsymbol} should use text symbols
% if possible (pr/3400)}
%
%\begin{verbatim}
@@ -434,7 +434,7 @@
% >Synopsis: No hyphenation in first word after float environment
% >Arrival-Date: Thu Jan 30 13:21:00 CET 2003
% >Originator: h.harders@tu-bs.de (Harald Harders)
-%
+%
% If a float environment (figure, table) is written within a paragraph,
% the first word after the environment is not hyphenated.
%\end{verbatim}
@@ -462,7 +462,7 @@
%\begin{verbatim}
%\usepackage[T1]{fontenc}
%\end{verbatim}
-% to a document that uses the Computer Modern typefaces,
+% to a document that uses the Computer Modern typefaces,
% then not only the T1 encoding is used but the fonts
% used in the document look noticeably different. This is due to the fact
% that the EC fonts have more font series designs, e.g.\ a 14.4\,pt bold
@@ -484,14 +484,14 @@
%
%
%
-% \subsubsection{What \Lpack{fix-cm} does}
+% \subsubsection{What \Lpack{fix-cm} does}
%
% ^^A Are you bothered by the T1 and TS1 encoded Computer Modern fonts,
% ^^A which look partially worse than the traditional ones? Would you
% ^^A like to use the CM fonts with arbitrary sizes? If so, the macro
% ^^A package \Lpack{fix-cm} can help you.
%
-% Loading the package \Lpack{fix-cm} changes the font definitions of the
+% Loading the package \Lpack{fix-cm} changes the font definitions of the
% Computer Modern fonts, in order to achieve the following effects:
% \begin{itemize}
% \item
@@ -513,10 +513,10 @@
% The package acts on the following font families:
% \begin{itemize}
% \item
-% The text font families \file{cmr}, \file{cmss}, \file{cmtt} and
+% The text font families \file{cmr}, \file{cmss}, \file{cmtt} and
% \file{cmvtt} with OT1, T1 and TS1 encoding.
-% \item
-% The default math fonts used by \LaTeX, i.e., the font families
+% \item
+% The default math fonts used by \LaTeX, i.e., the font families
% \file{cmm} with encoding OML and \file{cms} with encoding OMS.
% \item
% The symbols used by the package \Lpack{latexsym}, i.e., the font
@@ -551,7 +551,7 @@
% The package should be loaded \danger \emph{before} \cmd{\documentclass},
% using the command |\RequirePackage{fix-cm}|, rather than the
% normal \cmd{\usepackage}.
-% Rationale:
+% Rationale:
% If the package is loaded in the preamble, a preceding package or
% even the code of the document class may have used any of the CM
% fonts already. However, the definitions of those fonts, that are
@@ -572,18 +572,18 @@
% lots of possibly huge \file{.pk} files. Also, \MF{} chokes
% sometimes on extremely small or large sizes, because of arithmetic
% problems.
-%
+%
% \Lpack{fix-cm} supersedes the experimental packages \Lpack{cmsd} and
% \Lpack{fix-ec}, which are no longer distributed.
%
% The packages \Lpack{type1cm} and \Lpack{type1ec} must not be loaded
-% additionally; they enable only continuous scaling.
+% additionally; they enable only continuous scaling.
%
%
%
% \section{Fixes added for 2005/12/01}
%
-% \subsection{\texttt{\textbackslash textsubscript} not defined in
+% \subsection{\texttt{\textbackslash textsubscript} not defined in
% latex.ltx (pr/3492)}
%
%\begin{verbatim}
@@ -609,10 +609,10 @@
% >Arrival-Date: Fri Jun 11 16:21:00 CEST 2004
% >Originator: moho01ab@student.cbs.dk (Morten Hoegholm)
%
-% The last three arguments of \@DeclareMathSizes cannot take a dimension
-% as argument, making it inconsistent with the rest of the font changing
-% commands and itself, as the second argument can take a dimension
-% specification.
+% The last three arguments of \@DeclareMathSizes cannot take a dimension
+% as argument, making it inconsistent with the rest of the font changing
+% commands and itself, as the second argument can take a dimension
+% specification.
%\end{verbatim}
%
% \subsection{\texttt{\textbackslash addpenalty} ruins flush-bottom (pr/3073)}
@@ -624,14 +624,14 @@
% >Arrival-Date: 20 Oct 2005 14:46:35 -0700
% >Originator: asnd@triumf.ca (Donald Arseneau)
% >Description:
-% The (revised) definition of \addpenalty has been
+% The (revised) definition of \addpenalty has been
% incorporated into fixltx2e, but now Plamen Tanovski has found a
% problem: since the \vskip is increased by the previous depth,
% consecutive \addpenalty and \addvspace commands keep enlarging
% the \vskip.
%\end{verbatim}
%
-% \subsection{\texttt{\textbackslash footnotemark[x]} crashes with fixltx2e.sty
+% \subsection{\texttt{\textbackslash footnotemark[x]} crashes with fixltx2e.sty
% (pr/3752)}
%
%\begin{verbatim}
@@ -695,12 +695,12 @@
%
% Use of a \raisebox in \section{} produces the error message
% mentioned in the subject.
-%
+%
% PR latex/1738 descriped a similar problem, which has been solved
% 10 years ago. Protecting the \raisebox with \protect solved my
% problem as well, but wouldn't it make sense to have a similar fix
% as in the PR?
-%
+%
% It is particulary confusing, that an unprotected \raisebox in a
% \section*-environment works fine, while in a \section-environment
% produces error.
@@ -720,6 +720,31 @@
% |\framebox|, |\parbox|, |\rule| and |\raisebox|.
%
%
+% \section{Fixes added for 2014/05/01}
+%
+% \subsection{Check the optional arguments of floats}
+%
+% By default LaTeX silently ignores unknown letters in the optional
+% arguments of floats. |\begin{figure}[tB]| the |B| is ignored so it
+% acts like |\begin{figure}[t]| However |\begin{figure}[B]| does
+% \emph{not} act like |\begin{figure}[]| as the check for an empty
+% argumant, or unsupplied argument, is earlier. |[]| causes the
+% default float placement to be used, but |[B]| means that \emph{no}
+% float area is allowed and so the float will not be placed until the
+% next |\clearpage| or end of document, no warning is given.
+%
+% This package adds a check on each letter, and if it not one of
+% |!tbhp| then an error is given and the code acts as if |p| had been
+% used, so that the float may be placed somewhere.
+%
+% \subsection{Infinite glue found (pr/4023 and pr/2346)}
+%
+% The fix for pr/2346 had an issue when used in conjunction with
+% |\enlargethispage| as the latter introduced an infinite negative
+% glue at the bottom of the page. That in turn make a |\vsplit|
+% operation to get at the column marks invalid.
+%
+%
% \StopEventually{}
%
% \section{Implementation}
@@ -733,7 +758,7 @@
%
%
%
-% \subsection{2-col: 1-col fig can come before earlier 2-col fig
+% \subsection{2-col: 1-col fig can come before earlier 2-col fig
% (pr/2346) \\
% Wrong headline for twocolumn (pr/2613)}
%
@@ -760,10 +785,20 @@
% \begin{macrocode}
\splitmaxdepth\maxdimen
\vbadness\maxdimen
- \setbox\@outputbox\vsplit\@outputbox to\maxdimen
+% \end{macrocode}
+% In case of |\enlargethispage| we will have infinite negative glue
+% at the bottom of the page (coming from |\vss|) and that will earn
+% us an error message if we |\vsplit| to get at the marks. So we
+% need to remove thek last glue (if any) at the end of |\@outputbox|
+% as we are only interested in marks that change doesn't matter.
+% \changes{v1.1o}{2014/04/18}{Handle infinite glue from
+% \cs{enlargethispage} (pr/4023)}
+% \begin{macrocode}
+ \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
+ \setbox\@outputbox\vsplit\@outputbox to\maxdimen
% \end{macrocode}
%
-% One minor difference from the current \package{fixmarks}, pass the
+% One minor difference from the current \package{fixmarks}, pass the
% marks through a token register to stop any |#| tokens causing an
% error in a |\def|.
% \begin{macrocode}
@@ -828,32 +863,37 @@
%
% \begin{macrocode}
\def\end@dblfloat{%
-\if@twocolumn
- \@endfloatbox
- \ifnum\@floatpenalty <\z@
- \@largefloatcheck
+ \if@twocolumn
+ \@endfloatbox
+ \ifnum\@floatpenalty <\z@
+ \@largefloatcheck
% \end{macrocode}
%
% Force the depth of two column float boxes.
% \begin{macrocode}
- \global\dp\@currbox1sp %
+ \global\dp\@currbox1sp %
% \end{macrocode}
-%
+% What follows is essentially |\end@float| without a starting
+% |\@endfloatbox|.
% \changes{v1.1d}{2000/09/24}{FMi: use output routine to
% defer float}
-% Next line assumes that first token of |\end@float| is
-% |\@endfloatbox| so we gobble that.
-% \begin{macrocode}
-% \@cons\@deferlist\@currbox
- \expandafter\@gobble\end@float
-% \end{macrocode}
-% |\@Esphack| is then added by |\@endfloat| above.
-% \begin{macrocode}
+% \changes{v1.1p}{2014/04/27}{Inline the code to allow some
+% coexistance with packages that hook into \cs{end@float} and do not
+% know about the algorithm change}
+% \begin{macrocode}
+ \@cons\@currlist\@currbox
+ \ifnum\@floatpenalty <-\@Mii
+ \penalty -\@Miv
+ \@tempdima\prevdepth
+ \vbox{}%
+ \prevdepth\@tempdima
+ \penalty\@floatpenalty
+ \else
+ \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
+ \fi
+ \else
+ \end@float
\fi
-% \ifnum \@floatpenalty =-\@Mii \@Esphack\fi
-\else
- \end@float
-\fi
}
% \end{macrocode}
%
@@ -862,7 +902,7 @@
% width of the float).
% \begin{macrocode}
\def\@testwrongwidth #1{%
- \ifdim\dp#1=\f@depth
+ \ifdim\dp#1=\f@depth
\else
\global\@testtrue
\fi}
@@ -892,7 +932,7 @@
%
% All the remaining changes are replacing the double column defer list
% or insering the extra test |\@testwrongwidth|\marg{box} at suitable
-% places. That is at plces where a box is taken off the deferlist.
+% places. That is at places where a box is taken off the deferlist.
% \begin{macrocode}
\def \@doclearpage {%
\ifvoid\footins
@@ -937,7 +977,7 @@
\fi
\fi
% \end{macrocode}
-% the next line is needed to avoid loosing floats in certain
+% the next line is needed to avoid losing floats in certain
% circumstances a single call to the original |\doclearpage|
% will now no longer output all floats.
% \changes{v1.1d}{2000/09/24}{FMi: ensure \cs{doclearpage}
@@ -1148,7 +1188,7 @@
\ifdim \ht #1>\@colht
\@testtrue
\fi
- \if@test
+ \if@test
\@cons\@failedlist #1%
\else
\@ytryfc #1%
@@ -1159,7 +1199,7 @@
\def\@ztryfc #1{%
\@tempcnta\count #1%
\divide\@tempcnta\@xxxii
- \multiply\@tempcnta\@xxxii
+ \multiply\@tempcnta\@xxxii
\@bitor \@tempcnta {\@failedlist \@flfail}%
\@testfp #1%
% \end{macrocode}
@@ -1240,7 +1280,7 @@
\else
\@tempskipb\lastskip
% \end{macrocode}
-% \changes{v1.1l}{2005/11/10}{Add the correct \cs{vskip}}
+% \changes{v1.1l}{2005/11/10}{Add the correct \cs{vskip}}
% We have to make sure the final \cs{vskip} seen by \TeX\ is the
% correct one, namely \cs{@tempskipb}. However we may have to
% adjust for \cs{prevdepth} when placing the penalty but that
@@ -1274,7 +1314,7 @@
%
%
%
-% \subsection{\texttt{\textbackslash fnsymbol} should use text symbols
+% \subsection{\texttt{\textbackslash fnsymbol} should use text symbols
% if possible (pr/3400)}
% \begin{macro}{\@fnsymbol}
%
@@ -1322,12 +1362,12 @@
% beginning of an alignment cell. However, users of e\TeX\ will be
% pleasantly surprised to get the best of both worlds and no bad
% side effects.
-%
+%
% First some code for checking if we are running e\TeX\ but making
% sure not to permanently turn |\eTeXversion| into |\relax|.
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname eTeXversion\endcsname\relax
+\expandafter\ifx\csname eTeXversion\endcsname\relax
% \end{macrocode}
% In case of ordinary \TeX\ we define |\TextOrMath| as a robust
% command but make sure it always grabs its arguments. If we didn't do
@@ -1400,7 +1440,7 @@
% \end{macro}
% \end{macro}
%
-% \subsection{\texttt{\textbackslash textsubscript} not defined in
+% \subsection{\texttt{\textbackslash textsubscript} not defined in
% latex.ltx (pr/3492)}
%
% \begin{macro}{\textsubscript}
@@ -1419,7 +1459,7 @@
% \subsection{\texttt{\textbackslash DeclareMathSizes} only take pts.
% (pr/3693)}
%
-% \begin{macro}{\@DeclareMathSizes}
+% \begin{macro}{\@DeclareMathSizes}
% \changes{v1.1k}{2005/09/29}{Fixed blank lines}
% This fix given by Michael J. Downes on comp.text.tex on 2002/10/17
% allows the user to have settings such as
@@ -1447,8 +1487,8 @@
%
% \subsection{Fewer fragile macros}
%
-% \begin{macro}{\MakeRobust}
-% \changes{v1.1n}{2006/03/24}{Added macro}
+% \begin{macro}{\MakeRobust}
+% \changes{v1.1n}{2006/03/24}{Added macro}
%
% The macro firstly checks if the controls sequence in question exists
% at all.
@@ -1466,9 +1506,9 @@
% \verb*=\foo = equal to \verb*=\foo= and redefine \verb*=\foo= so
% that it acts like a macro defined with \verb=\DeclareRobustCommand=.
% \begin{macrocode}
- {%
+ {%
\@ifundefined{\expandafter\@gobble\string#1\space}%
- {%
+ {%
\expandafter\let\csname
\expandafter\@gobble\string#1\space\endcsname=#1%
\edef\reserved@a{\string#1}%
@@ -1489,13 +1529,13 @@
% Here we make some kernel macros robust.
% \begin{macrocode}
\MakeRobust\(
-\MakeRobust\)
-\MakeRobust\[
+\MakeRobust\)
+\MakeRobust\[
\MakeRobust\]
-\MakeRobust\makebox
-\MakeRobust\savebox
-\MakeRobust\framebox
-\MakeRobust\parbox
+\MakeRobust\makebox
+\MakeRobust\savebox
+\MakeRobust\framebox
+\MakeRobust\parbox
\MakeRobust\rule
\MakeRobust\raisebox
% \end{macrocode}
@@ -1507,7 +1547,7 @@
% \subsection{Using EC fonts (T1 encoding) makes my documents look
% bl**dy horrible}
%
-% \subsubsection{Preliminaries}
+% \subsubsection{Preliminaries}
% The \LaTeX{} kernel does not declare the font encoding TS1.
% However, we are going to set up font definitions for this encoding,
% so we have to declare it now.
@@ -1518,8 +1558,8 @@
%
% In case the package is loaded in the preamble, any of the CM fonts may
% have been used already and cannot be redefined. Yet we try to
-% intercept at least the problem that is most likely to occur, i.e.,
-% a hidden \cmd{\normalfont}. Most of the standard definitions
+% intercept at least the problem that is most likely to occur, i.e.,
+% a hidden \cmd{\normalfont}. Most of the standard definitions
% are ok, but those for T1 encoding and 10.95\,pt need to be removed:
% \begin{macrocode}
\expandafter \let \csname T1/cmr/m/n/10.95\endcsname \relax
@@ -1528,11 +1568,11 @@
\expandafter \let \csname T1/cmvtt/m/n/10.95\endcsname \relax
% \end{macrocode}
%
-% \Lpack{fix-cm} may still fail, if the EC fonts are preloaded in the
-% \LaTeX{} format file. This situation is, however, very unlikely and could occur
+% \Lpack{fix-cm} may still fail, if the EC fonts are preloaded in the
+% \LaTeX{} format file. This situation is, however, very unlikely and could occur
% only with a customized format.
%
-% The remainder of the package is enclosed in a group, where the catcodes
+% The remainder of the package is enclosed in a group, where the catcodes
% are guaranteed to be appropriate for the processing of font definitions.
% \begin{macrocode}
\begingroup
@@ -1672,8 +1712,8 @@
\DeclareFontShape{T1}{cmss}{bx}{it}
{<->ssub*cmss/bx/sl}{}
% \end{macrocode}
-% The following substitutions are not provided in the default
-% \file{.fd} files. I have included them, so that you can
+% The following substitutions are not provided in the default
+% \file{.fd} files. I have included them, so that you can
% easily use the EC fonts with the default bold series being
% \file{b} rather than \file{bx}.
% \begin{macrocode}
@@ -2093,17 +2133,17 @@
% \subsubsection{\LaTeX{} symbols}
% \begin{macrocode}
\DeclareFontFamily{U}{lasy}{}
-\DeclareFontShape{U}{lasy}{m}{n}{
- <-6> lasy5
+\DeclareFontShape{U}{lasy}{m}{n}{
+ <-6> lasy5
<6-7> lasy6
<7-8> lasy7
<8-9> lasy8
- <9-10> lasy9
- <10-> lasy10
+ <9-10> lasy9
+ <10-> lasy10
}{}
\DeclareFontShape{U}{lasy}{b}{n}{
<-10> ssub * lasy/m/n
- <10-> lasyb10
+ <10-> lasyb10
}{}
% \end{macrocode}
% \begin{macrocode}
@@ -2112,6 +2152,89 @@
% \end{macrocode}
%
%
+% \subsection{Check the optional argument to floats}
+%
+% The default definition of |\@xfloat| allows
+% |\begin{figure}[abt23WD]| silently ignoring all but |t|. If you use
+% |\begin{figure}[T]| you get no warning but the float is not allowed
+% \emph{anywhere} so will go to the end of document (or
+% |\clearpage|). This change gives an error message for undefined
+% options.
+%
+% \changes{v1.1n}{2013/12/13}{Check float optional argument.}
+% \begin{macrocode}
+\def\@xfloat #1[#2]{%
+ \@nodocument
+ \def \@captype {#1}%
+ \def \@fps {#2}%
+ \@onelevel@sanitize \@fps
+ \def \reserved@b {!}%
+ \ifx \reserved@b \@fps
+ \@fpsadddefault
+ \else
+ \ifx \@fps \@empty
+ \@fpsadddefault
+ \fi
+ \fi
+ \ifhmode
+ \@bsphack
+ \@floatpenalty -\@Mii
+ \else
+ \@floatpenalty-\@Miii
+ \fi
+ \ifinner
+ \@parmoderr\@floatpenalty\z@
+ \else
+ \@next\@currbox\@freelist
+ {%
+ \@tempcnta \sixt@@n
+ \expandafter \@tfor \expandafter \reserved@a
+ \expandafter :\expandafter =\@fps
+ \do
+% \end{macrocode}
+% Start of changes, use a nested if structure, ending in an error.
+% \begin{macrocode}
+ {%
+ \if \reserved@a h%
+ \ifodd \@tempcnta
+ \else
+ \advance \@tempcnta \@ne
+ \fi
+ \else\if \reserved@a t%
+ \@setfpsbit \tw@
+ \else\if \reserved@a b%
+ \@setfpsbit 4%
+ \else\if \reserved@a p%
+ \@setfpsbit 8%
+ \else\if \reserved@a !%
+ \ifnum \@tempcnta>15
+ \advance\@tempcnta -\sixt@@n\relax
+ \fi
+ \else
+ \@latex@error{Unknown float option `\reserved@a'}%
+ {Option `\reserved@a' ignored and `p' used.}%
+ \@setfpsbit 8%
+ \fi\fi\fi\fi\fi
+ }%
+% \end{macrocode}
+% End of changes
+% \begin{macrocode}
+ \@tempcntb \csname ftype@\@captype \endcsname
+ \multiply \@tempcntb \@xxxii
+ \advance \@tempcnta \@tempcntb
+ \global \count\@currbox \@tempcnta
+ }%
+ \@fltovf
+ \fi
+ \global \setbox\@currbox
+ \color@vbox
+ \normalcolor
+ \vbox \bgroup
+ \hsize\columnwidth
+ \@parboxrestore
+ \@floatboxreset
+}
+% \end{macrocode}
% \Finale
%
\endinput