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{fixltx2e.dtx}
35 %<fixltx2e,fix-cm>\NeedsTeXFormat{LaTeX2e}
36 %<fixltx2e>\ProvidesPackage{fixltx2e}
37 %<fix-cm>\ProvidesPackage{fix-cm}
38 %<driver>\ProvidesFile{fixltx2e.drv}
40 % \ProvidesFile{fixltx2e.dtx}
41 [2014/04/18 v1.1o fixes to LaTeX]
45 \documentclass{ltxdoc}
46 \newcommand\Lopt[1]{\textsf{#1}}
48 \providecommand{\file}[1]{\texttt{#1}}
49 \providecommand{\MF}{\textsf{Metafont}}
50 \providecommand{\danger}{\marginpar[\hfill\protect\Huge!!]{\protect\Huge!!\hfill}}
52 \DocInput{fixltx2e.dtx}
60 %% {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
61 %% 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
62 %% Digits \0\1\2\3\4\5\6\7\8\9
63 %% Exclamation \! Double quote \" Hash (number) \#
64 %% Dollar \$ Percent \% Ampersand \&
65 %% Acute accent \' Left paren \( Right paren \)
66 %% Asterisk \* Plus \+ Comma \,
67 %% Minus \- Point \. Solidus \/
68 %% Colon \: Semicolon \; Less than \<
69 %% Equals \= Greater than \> Question mark \?
70 %% Commercial at \@ Left bracket \[ Backslash \\
71 %% Right bracket \] Circumflex \^ Underscore \_
72 %% Grave accent \` Left brace \{ Vertical bar \|
73 %% Right brace \} Tilde \~}
80 % \GetFileInfo{fixltx2e.dtx}
82 % \title{The \Lpack{fixltx2e} and \Lpack{fix-cm} packages\thanks{This file
83 % has version number \fileversion, last
84 % revised \filedate.}}
85 % \author{Frank Mittelbach, David Carlisle, Chris Rowley, Walter
86 % Schmidt\thanks{Walter wrote \Lpack{fix-cm}}}
91 % These packages provides fixes to \LaTeXe{} which are desirable
92 % but cannot be integrated into the \LaTeXe{} kernel or the
93 % font definition files directly as they would produce a version
94 % incompatible to earlier releases (either in formatting or
97 % By providing these fixes in the form of packages, users can benefit
98 % from them without the danger that their documents will fail or
99 % produce unexpected results at other sites since the documents
100 % contain a clear indication (the |\usepackage| line, preferably
101 % with a required date) that the fixes are needed.
108 % \section{Introduction}
110 % In the newsletter \texttt{ltnews07.tex}, which accompanied the
111 % \LaTeXe{} maintenance release of June 1997, we wrote:
113 % Many of the problem reports we receive concerning the standard
114 % classes are not concerned with bugs but are suggesting, more or
115 % less politely, that the design decisions embodied in them are
116 % `not optimal' and asking us to modify them.
118 % There are several reasons why we have decided not to make such
119 % changes to these files.
121 % \item However misguided, the current behaviour is clearly what
122 % was intended when these classes were designed. \item It is not
123 % good practice to change such aspects of `standard classes'
124 % because many people will be relying on them.
127 % We have therefore decided not to even consider making such
128 % modifications, nor to spend time justifying that decision. This
129 % does not mean that we do not agree that there are many
130 % deficiencies in the design of these classes, but we have many
131 % tasks with higher priority than continually explaining why the
132 % standard classes for \LaTeX{} cannot be changed.
135 % Back then we probably should have said that this decision also
136 % covers changes to the \LaTeX{} kernel and font definitions,
137 % if the change results in
138 % noticeable differences in the formatting of documents or otherwise
139 % produces severe incompatibilities between releases. The important
140 % point to stress here is that ``people rely on the fact that a
141 % document formatted at one site produces identical output at a
142 % different site''. By fixing a certain problem in version
143 % \meta{date}, people making use of the fix will get incorrectly
144 % formatted documents if they send them to others who still run on a
145 % version prior to \meta{date}.
147 % In theory one could get around this by adding a line like
149 % |\NeedsTeXFormat{latex2e}[|\meta{date}|]|
151 % on top of the document. However, this fails for two reasons. Firstly,
152 % most people will not be aware that they make use of a feature or fix
153 % that is only available in their version of \LaTeX{}; and thus do not
154 % add such a line in their documents. Secondly, even if there is such a
155 % line the receiving site might not be able to upgrade their \LaTeX{}
156 % in time to process the document properly (the latter is a sad fact
159 % By providing the \Lpack{fixltx2e} and \Lpack{fix-cm} packages
160 % we hope to help people in this respect since, when they
161 % are used, a document will contain a clear
162 % indication that special features/fixes are needed and if the
163 % receiving site does not have the packages available (or not available
164 % with the right version) it is far easier to download and install them
165 % from some archive than to upgrade \LaTeX{} in a rush.
167 % The packages are independent from each other and deal with different
169 % \Lpack{fixltx2e} provides general changes to the \LaTeX{} kernel,
170 % while \Lpack{fix-cm} improves the definitions of the Computer Modern
173 % We will try to maintain the packages in such a way that they can be used
174 % with all maintenance releases of \LaTeXe{} so that, if urgently
175 % needed, people can simply add them to the current directory in case
176 % they cannot upgrade their \LaTeX{} for whatever reason.
178 % The packages are \textbf{NOT} provided so that people can stop
179 % upgrading their \LaTeX{} system. They will contain only fixes of a
180 % certain nature, others will still go into the kernel and extensions
181 % in form of packages, and support files will still be added to the
182 % base system at regular intervals.
185 % \subsection{Using \Lpack{fixltx2e}}
187 % To use the \Lpack{fixltx2e} package include the line
189 % |\usepackage{fixltx2e}[|\meta{date}|]|
191 % into the preamble of your document, where \meta{date} is the date of
192 % the \Lpack{fixltx2e} package that you are using.
193 % This way your document will produce a warning if processed at a site
194 % that only has an older version of of this package.
196 % \subsection{Using \Lpack{fix-cm}}
199 % To use the \Lpack{fix-cm} package,
200 % load \danger it \emph{before} \cmd{\documentclass},
201 % and use the command \cmd{\RequirePackage} to do so, rather than the
202 % normal \cmd{\usepackage}:
205 % |\RequirePackage{fix-cm}|\\
206 % |\documentclass| \dots
208 % \textbf{Do not to load any other package before the document class},
209 % unless you have a thorough understanding of the \LaTeX{} internals
210 % and know exactly what you are doing!
213 % \section{Fixes added}
215 % This section describes all the fixes/features that have been added
216 % to the initial release of the package. If applicable the bug report
217 % info (see \texttt{bugs.txt}) is given.
222 % \subsection{2-col: 1-col fig can come before earlier 2-col fig
228 % >Synopsis: 2-col: 1-col fig can come before earlier 2-col fig
229 % >Arrival-Date: Wed Dec 18 15:41:07 1996
230 % >Originator: w.l.kleb@larc.nasa.gov (bil kleb)
232 % as documented in lamport's book, p. 198, concerning figure
233 % placement, "a figure will not be printed before an earlier
234 % figure, and a table will not be printed before an earlier
235 % table." however, there is a footnote stating, "However,
236 % in two-column page style, a single-column figure can come before
237 % an earlier double-column figure, and vice versa."
239 % this twocolumn behavior is undesireable---at least by me and
240 % most professional organizations i publish in. ed snyzter developed
241 % a hack fix for 2.09 several years ago which links the two
242 % counters, but i have not run across a similar "fix" for 2e...
245 % Originally fixed in package \Lpack{fix2col} which was merged into
246 % this package. Documentation and code from this package have been
247 % merged into this file.
249 % \subsubsection{Notes on the Implementation Strategy}
251 % The standard output routine maintains two lists of floats that have
252 % been `deferred' for later consideration. One list for single column
253 % floats, and one for double column floats (which are always
254 % immediately put onto their deferred list). This mechanism means
255 % that \LaTeX\ `knows' which type of float is contained in each box
256 % by the list that it is processing, but having two lists means
257 % that there is no mechanism for preserving the order between the
258 % floats in each list.
260 % The solution to this problem consists of two small changes to
261 % the output routine.
263 % Firstly, abandon the `double column float list' |\@dbldeferlist|
264 % and change every command where it is used so that instead the
265 % same |\@deferlist| is used as for single column floats.
266 % That one change ensures that double and single column floats
267 % stay in the same sequence, but as \LaTeX\ no longer `knows'
268 % whether a float is double or single column, it will happily
269 % insert a double float into a single column, overprinting the
270 % other column, or the margin.
272 % The second change is to provide an alternative mechanism for
273 % recording the two column floats. \LaTeX\ already has a compact
274 % mechanism for recording float information, an integer count register
275 % assigned to each float records information about the `type' of float
276 % `figure', `table' and the position information `htp' etc.
278 % The type information is stored in the `high' bits, one bit position
279 % (above `32') allocated to each float type. The `low' bits store
280 % information about the allowed positions, one bit each allocated for
281 % |h t b p|. In the \LaTeX2.09 system, the bit corresponding to `16'
282 % formed a `boundary' between these two sets of information, and it
283 % was never actually used by the system. Ed Sznyter's
284 % \package{fixfloats} package not unreasonably used this position to
285 % store the double column information, setting the bit for double
286 % column floats. Then at each point in the output routine at which a
287 % float is committed to a certain region, an additional check must be
288 % made to check that the float is (or is not) double column. If it
289 % spans the wrong number of columns it is deferred rather than being
292 % Unfortunately the bit `16' is not available in \LaTeXe. It is used
293 % to encode the extra float position possibility `|!|' that was added
294 % in that system. It would be possible to use position `32' and to
295 % move the flags for `table', `figure',\ldots\ up one position, to
296 % start at 64, but this would mean that in principle one less float
297 % type would be supported, and more importantly is likely to break
298 % any other packages that assume anything about the output routine
299 % internals. So here I instead use another mechanism for flagging
300 % double column floats: By default all floats have depth 0pt.
301 % This package arranges that double column ones have depth 1sp.
302 % This information may then be used in the same manner as in
303 % the \package{fixfloats} package, to defer any floats that are not of
304 % the correct column spanning type.
308 % \subsection{Wrong header for twocolumn (pr/2613)}
313 % >Synopsis: wrong headline for twocolumn
314 % >Arrival-Date: Mon Sep 22 16:41:09 1997
315 % >Originator: daniel@cs.uni-bonn.de (Daniel Reischert)
317 % When setting the document in two columns
318 % the headline shows the top mark of the second column,
319 % but it should show the top mark of the first column.
322 % Originally fixed in package \Lpack{fix2col} which was merged into
323 % this package. Documentation and code from this package have been
324 % merged into this file.
326 % \subsubsection{Notes on the Implementation Strategy}
328 % The standard \LaTeX\ twocolumn system works internally by making
329 % each column a separate `page' that is passed independently to \TeX's
330 % pagebreaker. (Unlike say the \package{multicol} package, where all
331 % columns are gathered together and then split into columns later,
332 % using |\vsplit|.) This means that the primitive \TeX\ marks that are
333 % normally used for header information, are globally reset after the
334 % first column. By default \LaTeX\ does nothing about this.
335 % A good solution is provided by Piet van Oostrum (building on earlier
336 % work of Joe Pallas) in his \package{fixmarks} package.
338 % After the first column box has been collected the mark information
339 % for that box is saved, so that any |\firstmark| can be
340 % `artificially' used to set the page-level marks after the second
341 % column has been collected. (The second column |\firstmark| is not
342 % normally required.) Unfortunately \TeX\ does not provide a direct
343 % way of knowing if any marks are in the page, |\firstmark| always has a
344 % value from previous pages, even if there is no mark in this page.
345 % The solution is to make a copy of the box and then |\vsplit| it
346 % so that any marks show up as |\splitfirstmark|.
348 % The use of |\vsplit| does mean that the output routine will globally
349 % change the value of |\splitfirstmark| and
350 % |\splitbotmark|. The \package{fixmarks} package goes to some trouble
351 % to save and restore these values so that the output routine does
352 % \emph{not} change the values. This part of \package{fixmarks} is not
353 % copied here as it is quite costly (having to be run on every page) and
354 % there is no reason why anyone writing code using |\vsplit| should
355 % allow the output routine to be triggered before the split marks have
359 % \subsection{\texttt{\textbackslash @} discards spaces when moving
365 % >Synopsis: \@ discards spaces when moving
366 % >Arrival-Date: Sat May 22 09:01:06 1999
367 % >Originator: asnd@triumf.ca (Donald Arseneau)
369 % The \@ command expands to \spacefactor\@m in auxiliary files,
370 % which then ignores following spaces when it is reprocessed.
373 % \subsection{\texttt{\textbackslash setlength} produces error if
374 % used with registers like \texttt{\textbackslash dimen0} (pr/3066)}
379 % >Synopsis: \setlength{\dimen0}{10pt}
380 % >Arrival-Date: Tue Jul 6 15:01:06 1999
381 % >Originator: oberdiek@ruf.uni-freiburg.de (Heiko Oberdiek)
383 % The current implementation of \setlength causes an error,
384 % because the length specification isn't terminated properly.
386 % \def\setlength#1#2{#1=#2\relax}
389 % \subsection{\texttt{\textbackslash addpenalty} ruins flush-bottom (pr/3073)}
394 % >Synopsis: \addpenalty ruins flush-bottom
395 % >Arrival-Date: Sat Jul 17 05:11:05 1999
396 % >Originator: asnd@triumf.ca (Donald Arseneau)
398 % Just to keep in mind for further development eh?
399 % A page break at an \addpenalty after \vspace does *not*
400 % give a flush-bottom page. (The intent of \addpenalty is
401 % apparently just to preserve the flush bottom by putting
402 % the breakpoint `above' the skip.)
407 % \section{Fixes added for 2003/06/01}
409 % \subsection{\texttt{\textbackslash fnsymbol} should use text symbols
410 % if possible (pr/3400)}
415 % >Synopsis: \fnsymbol should use text symbols if possible
416 % >Arrival-Date: Fri Jan 04 20:41:00 CET 2002
417 % >Originator: was@VR-Web.de ( Walter Schmidt )
419 % The \fnsymbol command can be used in both text and math
420 % mode. The symbols produced are, however, always taken from
421 % the math fonts. As a result, they may not match the text
422 % fonts, even if the symbols are actually available, for
423 % instance from the TS1 encoding. Since \fnsymbol is
424 % primarily used for footnotes in text, this should be fixed,
429 % \subsection{No hyphenation in first word after float environment (pr/3498)}
434 % >Synopsis: No hyphenation in first word after float environment
435 % >Arrival-Date: Thu Jan 30 13:21:00 CET 2003
436 % >Originator: h.harders@tu-bs.de (Harald Harders)
438 % If a float environment (figure, table) is written within a paragraph,
439 % the first word after the environment is not hyphenated.
444 % \subsection{Allowing \texttt{\textbackslash emph} to produce small
447 % By default |\em| or |\emph| switches to roman in an italic
448 % context but some designers prefer a switch to small caps in that
449 % case. This can be achieved by setting |\eminnershape|, e.g.,
452 %\renewcommand\eminnershape{\scshape}
456 % \subsection{Using EC fonts (T1 encoding) makes my documents look
457 % bl**dy horrible (from c.t.t.)\\
458 % I can't use arbitrary sizes with CM fonts (from c.t.t.)}
460 % No I'm not trying to collect any cites from the news group
461 % discussion on this topic. In a nutshell, if one adds
463 %\usepackage[T1]{fontenc}
465 % to a document that uses the Computer Modern typefaces,
466 % then not only the T1 encoding is used but the fonts
467 % used in the document look noticeably different. This is due to the fact
468 % that the EC fonts have more font series designs, e.g.\ a 14.4\,pt bold
469 % etc and those get used in the standard \texttt{.fd} files, while
470 % with Computer Modern (in OT1 encoding) such sizes were scaled
471 % versions of smaller sizes---with a noticeable different look and
474 % So we provide a package \Lpack{fix-cm} to ensure that comparable
475 % definitions are used. In addition to that, the package
476 % \Lpack{fix-cm} also enables continuous scaling of the CM fonts.
477 % This package was written by Walter Schmidt.
481 %^^A \section{The macro package \textsf{fix-cm} for \LaTeXe}
483 %^^A The documentation in this section was prepared by Walter Schmidt.
487 % \subsubsection{What \Lpack{fix-cm} does}
489 % ^^A Are you bothered by the T1 and TS1 encoded Computer Modern fonts,
490 % ^^A which look partially worse than the traditional ones? Would you
491 % ^^A like to use the CM fonts with arbitrary sizes? If so, the macro
492 % ^^A package \Lpack{fix-cm} can help you.
494 % Loading the package \Lpack{fix-cm} changes the font definitions of the
495 % Computer Modern fonts, in order to achieve the following effects:
498 % The appearance of the T1 and TS1 encoded CM fonts (aka `EC') is
499 % made as similar as possible to the traditional (OT1 encoded) ones.
500 % Particularly, a number of broken or ugly design sizes are no
501 % longer used, the look of the bold sans serif typeface at large
502 % sizes is considerably improved, and mismatches between the text
503 % fonts and the corresponding math fonts are avoided. As a side
504 % effect, PostScript and PDF documents may become smaller, because
505 % fewer fonts need to be embedded.
507 % The Computer Modern fonts are made available with arbitrary sizes.
509 % Only those design sizes of the fonts will be used, that are
510 % normally available in Type1 format, too. You need not load the
511 % extra package \Lpack{cmmib57} for this purpose.
513 % The package acts on the following font families:
516 % The text font families \file{cmr}, \file{cmss}, \file{cmtt} and
517 % \file{cmvtt} with OT1, T1 and TS1 encoding.
519 % The default math fonts used by \LaTeX, i.e., the font families
520 % \file{cmm} with encoding OML and \file{cms} with encoding OMS.
522 % The symbols used by the package \Lpack{latexsym}, i.e., the font
523 % family \file{lasy}.
525 % Note that the package does \emph{not} act on:
527 % \item Font families such as CM~Fibonacci, CM~Dunhill etc.,
528 % which are provided for experimental purposes or for fun only.
530 % CM text fonts with character sets other than Latin, e.g.,
531 % Cyrillic. Loading of the required font and encoding definitions
532 % while the fonts are not actually used, would not be a good idea.
533 % This should be addressed by particular packages or by changing the
534 % standard FDs of these fonts.
536 % Extra math fonts such as the AMS symbol fonts. While
537 % they match the style of Computer Modern, they are frequently used
538 % in conjunction with other font families, too. Thus,
539 % \Lpack{fix-cm} is obviously not the right place to make sure that
540 % they can be scaled continuously. Ask the maintainers of these
541 % fonts to provide this feature, which is badly needed!
543 % The math extension font \file{cmex}. Whether or not this font
544 % should be scaled is a question of its own, and there are other
545 % packages (\Lpack{exscale}, \Lpack{amsmath}, \Lpack{amsfonts}) to
549 % \subsubsection{How to load the package}
551 % The package should be loaded \danger \emph{before} \cmd{\documentclass},
552 % using the command |\RequirePackage{fix-cm}|, rather than the
553 % normal \cmd{\usepackage}.
555 % If the package is loaded in the preamble, a preceding package or
556 % even the code of the document class may have used any of the CM
557 % fonts already. However, the definitions of those fonts, that are
558 % already in use, cannot be changed any more.
561 % \subsubsection{Usage notes}
562 % In contrast to what you may expect, \Lpack{fix-cm} does \emph{not}
563 % ensure that line and page breaks stay the same, when you switch an
564 % existing document from OT1 to T1 encoding. The package does not
565 % turn off all of the additional design sizes in the EC fonts
566 % collection: Those, that contribute considerably to the typographical
567 % quality and do not conflict with the math fonts,
568 % are---indeed---used.
570 % Be careful when using arbitrary, non-standard font sizes with
571 % applications that need bitmap fonts: You may end up \danger with
572 % lots of possibly huge \file{.pk} files. Also, \MF{} chokes
573 % sometimes on extremely small or large sizes, because of arithmetic
576 % \Lpack{fix-cm} supersedes the experimental packages \Lpack{cmsd} and
577 % \Lpack{fix-ec}, which are no longer distributed.
579 % The packages \Lpack{type1cm} and \Lpack{type1ec} must not be loaded
580 % additionally; they enable only continuous scaling.
584 % \section{Fixes added for 2005/12/01}
586 % \subsection{\texttt{\textbackslash textsubscript} not defined in
587 % latex.ltx (pr/3492)}
592 % >Synopsis: \textsubscript not defined in latex.ltx
593 % >Arrival-Date: Tue Jan 14 23:01:00 CET 2003
594 % >Originator: tgakic@chem.tue.nl (Ionel Mugurel Ciobica)
596 % I use \textsubscript much more often than \textsuperscript, and
597 % \textsubscript it is not defined in latex.ltx. Could you please
598 % consider including the definition of \textsubscript in the latex.ltx
599 % for the next versions of LaTeX. Thank you.
602 % \subsection{\texttt{\textbackslash DeclareMathSizes} only take pts.
608 % >Synopsis: \DeclareMathSizes only take pts.
609 % >Arrival-Date: Fri Jun 11 16:21:00 CEST 2004
610 % >Originator: moho01ab@student.cbs.dk (Morten Hoegholm)
612 % The last three arguments of \@DeclareMathSizes cannot take a dimension
613 % as argument, making it inconsistent with the rest of the font changing
614 % commands and itself, as the second argument can take a dimension
618 % \subsection{\texttt{\textbackslash addpenalty} ruins flush-bottom (pr/3073)}
623 % >Synopsis: \addpenalty ruins flush-bottom
624 % >Arrival-Date: 20 Oct 2005 14:46:35 -0700
625 % >Originator: asnd@triumf.ca (Donald Arseneau)
627 % The (revised) definition of \addpenalty has been
628 % incorporated into fixltx2e, but now Plamen Tanovski has found a
629 % problem: since the \vskip is increased by the previous depth,
630 % consecutive \addpenalty and \addvspace commands keep enlarging
634 % \subsection{\texttt{\textbackslash footnotemark[x]} crashes with fixltx2e.sty
640 % >Synopsis: feature \footnotemark[x] crashes with fixltx2e.sty
641 % >Arrival-Date: Fri Dec 17 10:11:00 +0100 2004
642 % >Originator: stefan.pofahl@zsw-bw.de (Stefan Pofahl)
644 % If I use /fnsymbol together with fixltx2e.sty I can not use
645 % optinal parameter [num]
646 % \footnotemark[1] is not showing the mark number 1 but
647 % the mark \value{footnote}.
649 % This bug was related to pr/3400, where |\@fnsymbol| was made robust.
651 % \subsubsection{Notes on the implementation strategy}
653 % Pr/3400 made |\@fnsymbol| decide between text-mode and math-mode,
654 % which requires a certain level of robustness somewhere as the
655 % decision between text and math must be made at typesetting time and
656 % not when inside |\protected@edef| or similar commands. One way of
657 % dealing with this is to make sure the value seen by |\@fnsymbol| is
658 % a fully expanded number, which could be handled by code such as
660 % \def\fnsymbol#1{\expandafter\@fnsymbol
661 % \expandafter{\the\csname c@#1\endcsname}}
663 % This would be a good solution if everybody used the high level
664 % commands only by writing code like |\fnsymbol{footnote}|. Unfortunately
665 % many classes (including the standard classes) and packages use the
666 % internal forms directly as in |\@fnsymbol\c@footnote| so the easy
667 % solution of changing |\fnsymbol| would break code that had worked for
670 % Therefore the implementation here makes |\@fnsymbol| itself a
671 % non-robust command again and instead uses a new robust command
672 % \DescribeMacro{\TextOrMath}|\TextOrMath|, which will take care of
673 % typesetting either the math or the text symbol. In order to do so,
674 % we face an age old problem and unsolvable problem in \TeX: A
675 % reliable test for math mode that doesn't destroy
676 % kerning. Fortunately this problem can be solved when using e\TeX\ so
677 % if you use this as engine for your \LaTeX\ format, as recommended by
678 % the \LaTeX3 Project, you will get a fully functioning |\TextOrMath|
679 % command with no side effects. If you use regular \TeX\ as engine for
680 % your \LaTeX\ format then we have to choose between the lesser of two
681 % evils: 1)~breaking ligatures and preventing kerning or 2)~face the
682 % risk of choosing text-mode at the beginning of an alignment cell,
683 % which was suppodes to be math-mode. We have decided upon 1) as is
684 % costumary for regular robust commands in \LaTeX.
687 % \subsection{Fewer fragile commands}
692 % >Synopsis: Argument of \@sect has an extra }.
693 % >Arrival-Date: Sat Oct 22 23:11:01 +0200 2005
694 % >Originator: susi@uriah.heep.sax.de (Susanne Wunsch)
696 % Use of a \raisebox in \section{} produces the error message
697 % mentioned in the subject.
699 % PR latex/1738 descriped a similar problem, which has been solved
700 % 10 years ago. Protecting the \raisebox with \protect solved my
701 % problem as well, but wouldn't it make sense to have a similar fix
704 % It is particulary confusing, that an unprotected \raisebox in a
705 % \section*-environment works fine, while in a \section-environment
709 % While not technically a bug, in this day and age there are few
710 % reasons why commands taking optional arguments should not be robust.
712 % \subsubsection{Notes on the implementation strategy}
714 % Rather than changing the kernel macros to be robust, we have decided
715 % to add the macro \DescribeMacro{\MakeRobust}|\MakeRobust| in
716 % \Lpack{fixltx2e} so that users can easily turn fragile macros into
717 % robust ones. A macro |\foo| is made robust by doing the simple
718 % |\MakeRobust{\foo}|. \Lpack{fixltx2e} makes the following kernel
719 % macros robust: |\(|, |\)|, |\[|, |\]|, |\makebox|, |\savebox|,
720 % |\framebox|, |\parbox|, |\rule| and |\raisebox|.
723 % \section{Fixes added for 2014/05/01}
725 % \subsection{Check the optional arguments of floats}
727 % By default LaTeX silently ignores unknown letters in the optional
728 % arguments of floats. |\begin{figure}[tB]| the |B| is ignored so it
729 % acts like |\begin{figure}[t]| However |\begin{figure}[B]| does
730 % \emph{not} act like |\begin{figure}[]| as the check for an empty
731 % argumant, or unsupplied argument, is earlier. |[]| causes the
732 % default float placement to be used, but |[B]| means that \emph{no}
733 % float area is allowed and so the float will not be placed until the
734 % next |\clearpage| or end of document, no warning is given.
736 % This package adds a check on each letter, and if it not one of
737 % |!tbhp| then an error is given and the code acts as if |p| had been
738 % used, so that the float may be placed somewhere.
740 % \subsection{Infinite glue found (pr/4023 and pr/2346)}
742 % The fix for pr/2346 had an issue when used in conjunction with
743 % |\enlargethispage| as the latter introduced an infinite negative
744 % glue at the bottom of the page. That in turn make a |\vsplit|
745 % operation to get at the column marks invalid.
750 % \section{Implementation}
752 % We require at least a somewhat sane version of \LaTeXe{}. Earlier
753 % ones where really quite different from one another.
756 \NeedsTeXFormat{LaTeX2e}[1996/06/01]
761 % \subsection{2-col: 1-col fig can come before earlier 2-col fig
763 % Wrong headline for twocolumn (pr/2613)}
765 % Originally fixed in package \Lpack{fix2col} which was merged into
766 % this package. Code and documentation are straight copies from that
769 % \subsubsection{Preserving Marks}
771 % This is just a change to the single command |\@outputdblcol|
772 % so that it saves mark information for the first column and restores
773 % it in the second column.
777 \global\@firstcolumnfalse
779 % Save the left column
781 \global\setbox\@leftcolumn\copy\@outputbox
784 % Remember the marks from the first column
786 \splitmaxdepth\maxdimen
789 % In case of |\enlargethispage| we will have infinite negative glue
790 % at the bottom of the page (coming from |\vss|) and that will earn
791 % us an error message if we |\vsplit| to get at the marks. So we
792 % need to remove thek last glue (if any) at the end of |\@outputbox|
793 % as we are only interested in marks that change doesn't matter.
794 % \changes{v1.1o}{2014/04/18}{Handle infinite glue from
795 % \cs{enlargethispage} (pr/4023)}
797 \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
798 \setbox\@outputbox\vsplit\@outputbox to\maxdimen
801 % One minor difference from the current \package{fixmarks}, pass the
802 % marks through a token register to stop any |#| tokens causing an
805 \toks@\expandafter{\topmark}%
806 \xdef\@firstcoltopmark{\the\toks@}%
807 \toks@\expandafter{\splitfirstmark}%
808 \xdef\@firstcolfirstmark{\the\toks@}%
811 % This test does not work if truly empty marks have been inserted, but
812 % \LaTeX\ marks should always have (at least) two brace groups.
813 % (Except before the first mark is used, when the marks are empty,
814 % but that is OK here.)
816 \ifx\@firstcolfirstmark\@empty
817 \global\let\@setmarks\relax
820 \let\firstmark\@firstcolfirstmark
821 \let\topmark\@firstcoltopmark}%
828 \global\@firstcolumntrue
829 \setbox\@outputbox\vbox{%
831 \hb@xt@\columnwidth{\box\@leftcolumn \hss}%
834 % \changes{v1.1m}{2006/09/13}{Ensure that rule is in \cs{normalcolor}}
835 % The color of the \cs{vrule} should be \cs{normalcolor} as to not
836 % inherit the color from the column.
838 {\normalcolor\vrule \@width\columnseprule}%
840 \hb@xt@\columnwidth{\box\@outputbox \hss}}}%
843 % Override current first and top with those of first column if necessary
853 \@whilesw\if@fcolmade \fi{\@outputpage\@startdblcolumn}%
858 % \subsubsection{Preserving Float Order}
860 % Changes |\@dbldeferlist| to |\@deferlist| are not explicitly noted
861 % but are flagged by blank comment lines around the changed line.
868 \ifnum\@floatpenalty <\z@
872 % Force the depth of two column float boxes.
874 \global\dp\@currbox1sp %
877 % \changes{v1.1d}{2000/09/24}{FMi: use output routine to
879 % Next line assumes that first token of |\end@float| is
880 % |\@endfloatbox| so we gobble that.
882 % \@cons\@deferlist\@currbox
883 \expandafter\@gobble\end@float
885 % |\@Esphack| is then added by |\@endfloat| above.
888 % \ifnum \@floatpenalty =-\@Mii \@Esphack\fi
895 % Test if the float box has the wrong width. (Actually as noted above
896 % the test is for a conventional depth setting rather than for the
897 % width of the float).
899 \def\@testwrongwidth #1{%
906 % Normally looking for single column floats, which have zero depth.
911 % but when making two column float area, look for floats with 1sp
914 \def\@dblfloatplacement{\global\@dbltopnum\c@dbltopnumber
915 \global\@dbltoproom \dbltopfraction\@colht
917 \advance \@textmin -\@dbltoproom
918 \@fpmin \dblfloatpagefraction\textheight
928 % All the remaining changes are replacing the double column defer list
929 % or insering the extra test |\@testwrongwidth|\marg{box} at suitable
930 % places. That is at places where a box is taken off the deferlist.
932 \def \@doclearpage {%
934 \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
935 \setbox\@tempboxa\box\@cclv
936 \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
937 \global \let \@toplist \@empty
938 \global \let \@botlist \@empty
939 \global \@colroom \@colht
940 \ifx \@currlist\@empty
942 \@latexerr{Float(s) lost}\@ehb
943 \global \let \@currlist \@empty
945 \@makefcolumn\@deferlist
946 \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
952 \xdef\@deferlist{\@dbltoplist\@deferlist}%
956 \global \let \@dbltoplist \@empty
957 \global \@colht \textheight
963 \@makefcolumn\@deferlist
964 \@whilesw\if@fcolmade \fi{\@outputpage
965 \@makefcolumn\@deferlist}%
975 % the next line is needed to avoid losing floats in certain
976 % circumstances a single call to the original |\doclearpage|
977 % will now no longer output all floats.
978 % \changes{v1.1d}{2000/09/24}{FMi: ensure \cs{doclearpage}
979 % is called again until all floats are output.}
981 \ifx\@deferlist\@empty \else\clearpage \fi
983 \setbox\@cclv\vbox{\box\@cclv\vfil}%
991 \def \@startdblcolumn {%
992 \@tryfcolumn \@deferlist
996 \let \reserved@b \@deferlist
997 \global \let \@deferlist \@empty
998 \let \@elt \@sdblcolelt
1006 \def\@addtonextcol{%
1009 \@setfloattypecounts
1015 \@reqcolroom \ht\@currbox
1016 \advance \@reqcolroom \@textmin
1017 \ifdim \@colroom>\@reqcolroom
1020 \@bitor\@currtype\@deferlist
1021 \@testwrongwidth\@currbox
1032 \@cons\@deferlist\@currbox
1042 \@setfloattypecounts
1045 \@flsetnum \@dbltopnum
1046 \ifnum \@dbltopnum>\z@
1048 \ifdim \@dbltoproom>\ht\@currbox
1051 \ifnum \@fpstype<\sixt@@n
1052 \advance \@dbltoproom \@textmin
1053 \ifdim \@dbltoproom>\ht\@currbox
1056 \advance \@dbltoproom -\@textmin
1060 \@bitor \@currtype \@deferlist
1065 \@testwrongwidth\@currbox
1071 \@tempdima -\ht\@currbox
1073 -\ifx \@dbltoplist\@empty \dbltextfloatsep \else
1075 \global \advance \@dbltoproom \@tempdima
1076 \global \advance \@colht \@tempdima
1077 \global \advance \@dbltopnum \m@ne
1078 \@cons \@dbltoplist \@currbox
1086 \@cons\@deferlist\@currbox
1093 \def \@addtocurcol {%
1095 \@setfloattypecounts
1101 \advance \@textmin \@textfloatsheight
1102 \@reqcolroom \@pageht
1103 \ifdim \@textmin>\@reqcolroom
1104 \@reqcolroom \@textmin
1106 \advance \@reqcolroom \ht\@currbox
1107 \ifdim \@colroom>\@reqcolroom
1110 \@bitor\@currtype\@deferlist
1112 % We need to defer the float also if its width
1114 % \changes{v1.1d}{2000/09/24}{FMi: test for wide float was
1117 \@testwrongwidth\@currbox
1123 \@bitor\@currtype\@botlist
1127 \ifodd \count\@currbox
1128 \advance \@reqcolroom \intextsep
1129 \ifdim \@colroom>\@reqcolroom
1130 \global \advance \@colnum \m@ne
1131 \global \advance \@textfloatsheight \ht\@currbox
1132 \global \advance \@textfloatsheight 2\intextsep
1133 \@cons \@midlist \@currbox
1139 \addpenalty \interlinepenalty
1143 \penalty\interlinepenalty
1145 \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
1163 \@cons\@deferlist\@currbox
1170 \@next\reserved@a\@trylist{}{}%
1171 \@currtype \count #1%
1172 \divide\@currtype\@xxxii
1173 \multiply\@currtype\@xxxii
1174 \@bitor \@currtype \@failedlist
1179 \@testwrongwidth #1%
1183 \ifdim \ht #1>\@colht
1187 \@cons\@failedlist #1%
1195 \@tempcnta\count #1%
1196 \divide\@tempcnta\@xxxii
1197 \multiply\@tempcnta\@xxxii
1198 \@bitor \@tempcnta {\@failedlist \@flfail}%
1204 \@testwrongwidth #1%
1208 \@tempdimb\@tempdima
1209 \advance\@tempdimb\ht #1%
1210 \advance\@tempdimb\@fpsep
1211 \ifdim \@tempdimb >\@colht
1217 \@cons\@flsucceed #1%
1218 \@tempdima\@tempdimb
1227 % \subsection{\texttt{\textbackslash @} discards spaces when moving
1231 % Ensure that |\@m| can't eat spaces. Alternative would be to make
1232 % |\@| robust but that takes more space.
1234 \def\@{\spacefactor\@m{}}
1239 % \subsection{\texttt{\textbackslash setlength} produces error if
1240 % used with registers like \texttt{\textbackslash dimen0} (pr/3066)}
1242 % \begin{macro}{\setlength}
1243 % Add space after register (|#1|) but only if this is still the
1244 % original definition. When, for example, \Lpack{calc} was already
1245 % loaded this wouldn't be a good idea any more.
1246 % \changes{v1.0c}{2000/09/21}{Don't change if definition was
1249 \def\@tempa#1#2{#1#2\relax}
1250 \ifx\setlength\@tempa
1251 \def\setlength#1#2{#1 #2\relax}
1257 % \subsection{\texttt{\textbackslash addpenalty} ruins flush-bottom
1260 % \begin{macro}{\addpenalty}
1261 % Fix provided by Donald (though the original fix was not good
1262 % enough). In 2005 Plamen Tanovski discovered that this fix wasn't
1263 % good enough either as the \cs{vskip} kept getting bigger if
1264 % several \cs{addpenalty} commands followed each other. Donald
1265 % kindly send a new fix.
1276 \@tempskipb\lastskip
1278 % \changes{v1.1l}{2005/11/10}{Add the correct \cs{vskip}}
1279 % We have to make sure the final \cs{vskip} seen by \TeX\ is the
1280 % correct one, namely \cs{@tempskipb}. However we may have to
1281 % adjust for \cs{prevdepth} when placing the penalty but that
1282 % should not affect the skip we pass on to \TeX.
1285 \advance \@tempskipb
1286 \ifdim\prevdepth>\maxdepth\maxdepth\else
1288 % If |\prevdepth| is -1000pt due to |\nointerlineskip| we better
1290 % \changes{v1.0c}{2000/09/21}{Don't add \cs{prevdepth} if it is a
1293 \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
1312 % \subsection{\texttt{\textbackslash fnsymbol} should use text symbols
1313 % if possible (pr/3400)}
1314 % \begin{macro}{\@fnsymbol}
1316 % This macro is another example of an ever recurring problem in
1317 % \TeX: Determining if something is text-mode or math-mode. It is
1318 % imperative for the decision between text and math to be delayed
1319 % until the actual typesetting is done as the code in question may
1320 % go through an |\edef| or |\write| where an |\ifmmode| test would
1321 % be executed prematurely. Hence in the implementation below,
1322 % |\@fnsymbol| is not robust in itself but the parts doing the
1323 % actual typesetting are.
1325 % In the case of |\@fnsymbol| we make use of the robust command
1326 % |\TextOrMath| which takes two arguments and typesets the first if
1327 % in text-mode and the second if in math-mode. Note that in order
1328 % for this command to make the correct decision, it must insert a
1329 % |\relax| token if run under regular \TeX, which ruins any kerning
1330 % between the preceding characters and whatever awaits
1331 % typesetting. If you use e\TeX\ as engine for \LaTeX\ (as
1332 % recommended) this unfortunate side effect is not present.
1335 \ifcase#1\or \TextOrMath\textasteriskcentered *\or
1336 \TextOrMath \textdagger \dagger\or
1337 \TextOrMath \textdaggerdbl \ddagger \or
1338 \TextOrMath \textsection \mathsection\or
1339 \TextOrMath \textparagraph \mathparagraph\or
1340 \TextOrMath \textbardbl \|\or
1341 \TextOrMath {\textasteriskcentered\textasteriskcentered}{**}\or
1342 \TextOrMath {\textdagger\textdagger}{\dagger\dagger}\or
1343 \TextOrMath {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}\else
1348 % \begin{macro}{\TextOrMath}
1349 % \changes{v1.1m}{2006/01/08}{Add command to solve robustness
1351 % When using regular \TeX, we make this command robust so that it
1352 % always selects the correct branch in an |\ifmmode| switch with
1353 % the usual disadvantage of ruining kerning. For the application we
1354 % use it for here that shouldn't matter. The alternative would be
1355 % to mimic |\IeC| from \textsf{inputenc} but then it wil have the
1356 % disadvantage of choosing the wrong branch if appearing at the
1357 % beginning of an alignment cell. However, users of e\TeX\ will be
1358 % pleasantly surprised to get the best of both worlds and no bad
1361 % First some code for checking if we are running e\TeX\ but making
1362 % sure not to permanently turn |\eTeXversion| into |\relax|.
1364 \begingroup\expandafter\expandafter\expandafter\endgroup
1365 \expandafter\ifx\csname eTeXversion\endcsname\relax
1367 % In case of ordinary \TeX\ we define |\TextOrMath| as a robust
1368 % command but make sure it always grabs its arguments. If we didn't do
1369 % this it might very well gobble spaces in the input stream.
1371 \DeclareRobustCommand\TextOrMath{%
1372 \ifmmode \expandafter\@secondoftwo
1373 \else \expandafter\@firstoftwo \fi}
1374 \protected@edef\TextOrMath#1#2{\TextOrMath{#1}{#2}}
1377 % For e\TeX\ the situation is similar. The robust macro is a hidden
1378 % one so that we again avoid problems of gobbling spaces in the input.
1380 \protected\expandafter\def\csname TextOrMath\space\endcsname{%
1381 \ifmmode \expandafter\@secondoftwo
1382 \else \expandafter\@firstoftwo \fi}
1383 \edef\TextOrMath#1#2{%
1384 \expandafter\noexpand\csname TextOrMath\space\endcsname
1390 % \subsection{No hyphenation in first word after float environment(pr/3498)}
1392 % \begin{macro}{\@esphack}
1393 % \begin{macro}{\@Esphack}
1394 % Fix suggested by Donald Arseneau.
1395 % \changes{v1.1g}{2003/09/19}{Fix for \cs{@esphack} (pr/3498)}
1396 % \changes{v1.1h}{2004/02/13}{Fix for \cs{@Esphack} (pr/3498)}
1403 \nobreak \hskip\z@skip % <------
1415 \nobreak \hskip\z@skip % <------
1424 % \subsection{Allowing \texttt{\textbackslash emph} to produce small
1426 % \begin{macro}{\em}
1427 % \begin{macro}{\eminnershape}
1428 % \changes{v1.1g}{2003/09/19}{Allow \cs{emph} to produce small caps}
1430 \DeclareRobustCommand\em
1431 {\@nomath\em \ifdim \fontdimen\@ne\font >\z@
1432 \eminnershape \else \itshape \fi}
1433 \def\eminnershape{\upshape}
1438 % \subsection{\texttt{\textbackslash textsubscript} not defined in
1439 % latex.ltx (pr/3492)}
1441 % \begin{macro}{\textsubscript}
1442 % \changes{v1.1j}{2005/07/13}{Add \cs{textsubscript}}
1443 % \changes{v1.1k}{2005/09/29}{Fixed blank lines}
1444 % This macro is almost identical to \cs{textsuperscript} from the
1447 \DeclareRobustCommand*\textsubscript[1]{%
1448 \@textsubscript{\selectfont#1}}
1449 \def\@textsubscript#1{%
1450 {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
1454 % \subsection{\texttt{\textbackslash DeclareMathSizes} only take pts.
1457 % \begin{macro}{\@DeclareMathSizes}
1458 % \changes{v1.1k}{2005/09/29}{Fixed blank lines}
1459 % This fix given by Michael J. Downes on comp.text.tex on 2002/10/17
1460 % allows the user to have settings such as
1461 % \verb=\DeclareMathSizes{9.5dd}{9.5dd}{7.4dd}{6.6dd}=.
1463 \def\@DeclareMathSizes #1#2#3#4#5{%
1464 \@defaultunits\dimen@ #2pt\relax\@nnil
1466 \expandafter\let\csname S@\strip@pt\dimen@\endcsname\math@fontsfalse
1468 \@defaultunits\dimen@ii #3pt\relax\@nnil
1469 \@defaultunits\@tempdima #4pt\relax\@nnil
1470 \@defaultunits\@tempdimb #5pt\relax\@nnil
1472 \expandafter\xdef\csname S@\strip@pt\dimen@\endcsname{%
1473 \gdef\noexpand\tf@size{\strip@pt\dimen@ii}%
1474 \gdef\noexpand\sf@size{\strip@pt\@tempdima}%
1475 \gdef\noexpand\ssf@size{\strip@pt\@tempdimb}%
1483 % \subsection{Fewer fragile macros}
1485 % \begin{macro}{\MakeRobust}
1486 % \changes{v1.1n}{2006/03/24}{Added macro}
1488 % The macro firstly checks if the controls sequence in question exists
1491 \providecommand*\MakeRobust[1]{%
1492 \@ifundefined{\expandafter\@gobble\string#1}{%
1493 \@latex@error{The control sequence `\string#1' is undefined!%
1494 \MessageBreak There is nothing here to make robust}%
1498 % Then we check if the macro is already robust. We do this by testing
1499 % if the internal name for a robust macro is defined, namely
1500 % \verb*=\foo =. If it is already defined do nothing, otherwise set
1501 % \verb*=\foo = equal to \verb*=\foo= and redefine \verb*=\foo= so
1502 % that it acts like a macro defined with \verb=\DeclareRobustCommand=.
1505 \@ifundefined{\expandafter\@gobble\string#1\space}%
1507 \expandafter\let\csname
1508 \expandafter\@gobble\string#1\space\endcsname=#1%
1509 \edef\reserved@a{\string#1}%
1510 \def\reserved@b{#1}%
1511 \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
1513 \ifx\reserved@a\reserved@b
1514 \noexpand\x@protect\noexpand#1%
1516 \noexpand\protect\expandafter\noexpand
1517 \csname\expandafter\@gobble\string#1\space\endcsname}%
1519 {\@latex@info{The control sequence `\string#1' is already robust}}%
1524 % Here we make some kernel macros robust.
1532 \MakeRobust\framebox
1535 \MakeRobust\raisebox
1542 % \subsection{Using EC fonts (T1 encoding) makes my documents look
1545 % \subsubsection{Preliminaries}
1546 % The \LaTeX{} kernel does not declare the font encoding TS1.
1547 % However, we are going to set up font definitions for this encoding,
1548 % so we have to declare it now.
1554 % In case the package is loaded in the preamble, any of the CM fonts may
1555 % have been used already and cannot be redefined. Yet we try to
1556 % intercept at least the problem that is most likely to occur, i.e.,
1557 % a hidden \cmd{\normalfont}. Most of the standard definitions
1558 % are ok, but those for T1 encoding and 10.95\,pt need to be removed:
1560 \expandafter \let \csname T1/cmr/m/n/10.95\endcsname \relax
1561 \expandafter \let \csname T1/cmss/m/n/10.95\endcsname \relax
1562 \expandafter \let \csname T1/cmtt/m/n/10.95\endcsname \relax
1563 \expandafter \let \csname T1/cmvtt/m/n/10.95\endcsname \relax
1566 % \Lpack{fix-cm} may still fail, if the EC fonts are preloaded in the
1567 % \LaTeX{} format file. This situation is, however, very unlikely and could occur
1568 % only with a customized format.
1570 % The remainder of the package is enclosed in a group, where the catcodes
1571 % are guaranteed to be appropriate for the processing of font definitions.
1577 % \subsubsection{T1 encoding}
1579 % \paragraph{CM Roman}
1581 \DeclareFontFamily{T1}{cmr}{}
1582 \DeclareFontShape{T1}{cmr}{m}{n}{
1592 \DeclareFontShape{T1}{cmr}{m}{sl}{
1602 \DeclareFontShape{T1}{cmr}{m}{it}{
1610 \DeclareFontShape{T1}{cmr}{m}{sc}{
1620 \DeclareFontShape{T1}{cmr}{m}{ui}{
1628 \DeclareFontShape{T1}{cmr}{b}{n}{
1638 \DeclareFontShape{T1}{cmr}{bx}{n}{
1647 \DeclareFontShape{T1}{cmr}{bx}{sl}{
1656 \DeclareFontShape{T1}{cmr}{bx}{it}{
1663 \DeclareFontShape{T1}{cmr}{bx}{sc}{
1675 % \paragraph{CM Sans}
1677 \DeclareFontFamily{T1}{cmss}{}
1678 \DeclareFontShape{T1}{cmss}{m}{n}{
1685 \DeclareFontShape{T1}{cmss}{m}{sl}{
1692 \DeclareFontShape{T1}{cmss}{m}{it}
1693 {<->ssub*cmss/m/sl}{}
1694 \DeclareFontShape{T1}{cmss}{m}{sc}
1696 \DeclareFontShape{T1}{cmss}{sbc}{n}{
1699 \DeclareFontShape{T1}{cmss}{bx}{n}{
1703 \DeclareFontShape{T1}{cmss}{bx}{sl}{
1707 \DeclareFontShape{T1}{cmss}{bx}{it}
1708 {<->ssub*cmss/bx/sl}{}
1710 % The following substitutions are not provided in the default
1711 % \file{.fd} files. I have included them, so that you can
1712 % easily use the EC fonts with the default bold series being
1713 % \file{b} rather than \file{bx}.
1715 \DeclareFontShape{T1}{cmss}{b}{n}
1716 {<->ssub*cmss/bx/n}{}
1717 \DeclareFontShape{T1}{cmss}{b}{sl}
1718 {<->ssub*cmss/bx/sl}{}
1719 \DeclareFontShape{T1}{cmss}{b}{it}
1720 {<->ssub*cmss/bx/sl}{}
1723 % \paragraph{CM Typewriter}
1725 \DeclareFontFamily{T1}{cmtt}{\hyphenchar \font\m@ne}
1726 \DeclareFontShape{T1}{cmtt}{m}{n}{
1733 \DeclareFontShape{T1}{cmtt}{m}{it}{
1740 \DeclareFontShape{T1}{cmtt}{m}{sl}{
1747 \DeclareFontShape{T1}{cmtt}{m}{sc}{
1754 \DeclareFontShape{T1}{cmtt}{bx}{n}
1755 {<->sub * cmtt/m/n}{}
1756 \DeclareFontShape{T1}{cmtt}{bx}{it}
1757 {<->sub * cmtt/m/it}{}
1758 \DeclareFontShape{T1}{cmtt}{bx}{sl}
1759 {<->sub * cmtt/m/sl}{}
1761 % Substitutions not provided in the default \file{.fd} files:
1763 \DeclareFontShape{T1}{cmtt}{b}{n}
1764 {<->sub * cmtt/m/n}{}
1765 \DeclareFontShape{T1}{cmtt}{b}{it}
1766 {<->sub * cmtt/m/it}{}
1767 \DeclareFontShape{T1}{cmtt}{b}{sl}
1768 {<->sub * cmtt/m/sl}{}
1771 % \paragraph{CM Typewiter (var.)}
1773 \DeclareFontFamily{T1}{cmvtt}{}
1774 \DeclareFontShape{T1}{cmvtt}{m}{n}{
1781 \DeclareFontShape{T1}{cmvtt}{m}{it}{
1790 % \subsubsection{TS1 encoding}
1792 % \paragraph{CM Roman}
1794 \DeclareFontFamily{TS1}{cmr}{\hyphenchar\font\m@ne}
1795 \DeclareFontShape{TS1}{cmr}{m}{n}{
1805 \DeclareFontShape{TS1}{cmr}{m}{sl}{
1815 \DeclareFontShape{TS1}{cmr}{m}{it}{
1823 \DeclareFontShape{TS1}{cmr}{m}{ui}{
1831 \DeclareFontShape{TS1}{cmr}{b}{n}{
1841 \DeclareFontShape{TS1}{cmr}{bx}{n}{
1850 \DeclareFontShape{TS1}{cmr}{bx}{sl}{
1859 \DeclareFontShape{TS1}{cmr}{bx}{it}{
1868 % \paragraph{CM Sans}
1870 \DeclareFontFamily{TS1}{cmss}{\hyphenchar\font\m@ne}
1871 \DeclareFontShape{TS1}{cmss}{m}{n}{
1878 \DeclareFontShape{TS1}{cmss}{m}{it}
1879 {<->ssub*cmss/m/sl}{}
1880 \DeclareFontShape{TS1}{cmss}{m}{sl}{
1887 \DeclareFontShape{TS1}{cmss}{sbc}{n}{
1890 \DeclareFontShape{TS1}{cmss}{bx}{n}{
1894 \DeclareFontShape{TS1}{cmss}{bx}{sl}{
1898 \DeclareFontShape{TS1}{cmss}{bx}{it}
1899 {<->ssub*cmss/bx/sl}{}
1901 % Substitutions not provided in the default \file{.fd} files:
1903 \DeclareFontShape{TS1}{cmss}{b}{n}
1904 {<->ssub*cmss/bx/n}{}
1905 \DeclareFontShape{TS1}{cmss}{b}{sl}
1906 {<->ssub*cmss/bx/sl}{}
1907 \DeclareFontShape{TS1}{cmss}{b}{it}
1908 {<->ssub*cmss/bx/sl}{}
1911 % \paragraph{CM Typewriter}
1913 \DeclareFontFamily{TS1}{cmtt}{\hyphenchar \font\m@ne}
1914 \DeclareFontShape{TS1}{cmtt}{m}{n}{
1921 \DeclareFontShape{TS1}{cmtt}{m}{it}{
1928 \DeclareFontShape{TS1}{cmtt}{m}{sl}{
1935 \DeclareFontShape{TS1}{cmtt}{bx}{n}
1936 {<->sub * cmtt/m/n}{}
1937 \DeclareFontShape{TS1}{cmtt}{bx}{it}
1938 {<->sub * cmtt/m/it}{}
1939 \DeclareFontShape{TS1}{cmtt}{bx}{sl}
1940 {<->sub * cmtt/m/sl}{}
1942 % Substitutions not provided in the default \file{.fd} files:
1944 \DeclareFontShape{TS1}{cmtt}{b}{n}
1945 {<->sub * cmtt/m/n}{}
1946 \DeclareFontShape{TS1}{cmtt}{b}{it}
1947 {<->sub * cmtt/m/it}{}
1948 \DeclareFontShape{TS1}{cmtt}{b}{sl}
1949 {<->sub * cmtt/m/sl}{}
1952 % \paragraph{CM Typewriter (var.)}
1954 \DeclareFontFamily{TS1}{cmvtt}{}
1955 \DeclareFontShape{TS1}{cmvtt}{m}{n}{
1962 \DeclareFontShape{TS1}{cmvtt}{m}{it}{
1971 % \subsubsection{OT1 encoding}
1973 % \paragraph{CM Roman}
1975 \DeclareFontFamily{OT1}{cmr}{\hyphenchar\font45 }
1976 \DeclareFontShape{OT1}{cmr}{m}{n}{
1986 \DeclareFontShape{OT1}{cmr}{m}{sl}{
1992 \DeclareFontShape{OT1}{cmr}{m}{it}{
1999 \DeclareFontShape{OT1}{cmr}{m}{sc}{
2002 \DeclareFontShape{OT1}{cmr}{m}{ui}{
2005 \DeclareFontShape{OT1}{cmr}{b}{n}{
2008 \DeclareFontShape{OT1}{cmr}{bx}{n}{
2017 \DeclareFontShape{OT1}{cmr}{bx}{sl}{
2020 \DeclareFontShape{OT1}{cmr}{bx}{it}{
2023 \DeclareFontShape{OT1}{cmr}{bx}{ui}
2027 % \paragraph{CM Sans}
2029 \DeclareFontFamily{OT1}{cmss}{\hyphenchar\font45 }
2030 \DeclareFontShape{OT1}{cmss}{m}{n}{
2037 \DeclareFontShape{OT1}{cmss}{m}{it}
2038 {<->sub*cmss/m/sl}{}
2039 \DeclareFontShape{OT1}{cmss}{m}{sl}{
2046 \DeclareFontShape{OT1}{cmss}{m}{sc}
2048 \DeclareFontShape{OT1}{cmss}{m}{ui}
2050 \DeclareFontShape{OT1}{cmss}{sbc}{n}{
2053 \DeclareFontShape{OT1}{cmss}{bx}{n}{
2056 \DeclareFontShape{OT1}{cmss}{bx}{ui}
2057 {<->sub*cmr/bx/ui}{}
2060 % \paragraph{CM Typewriter}
2062 \DeclareFontFamily{OT1}{cmtt}{\hyphenchar \font\m@ne}
2063 \DeclareFontShape{OT1}{cmtt}{m}{n}{
2069 \DeclareFontShape{OT1}{cmtt}{m}{it}{
2072 \DeclareFontShape{OT1}{cmtt}{m}{sl}{
2075 \DeclareFontShape{OT1}{cmtt}{m}{sc}{
2078 \DeclareFontShape{OT1}{cmtt}{m}{ui}
2079 {<->ssub*cmtt/m/it}{}
2080 \DeclareFontShape{OT1}{cmtt}{bx}{n}
2081 {<->ssub*cmtt/m/n}{}
2082 \DeclareFontShape{OT1}{cmtt}{bx}{it}
2083 {<->ssub*cmtt/m/it}{}
2084 \DeclareFontShape{OT1}{cmtt}{bx}{ui}
2085 {<->ssub*cmtt/m/it}{}
2088 % \paragraph{CM Typewriter (var.)}
2090 \DeclareFontFamily{OT1}{cmvtt}{\hyphenchar\font45 }
2091 \DeclareFontShape{OT1}{cmvtt}{m}{n}{
2094 \DeclareFontShape{OT1}{cmvtt}{m}{it}{
2099 % \subsubsection{OML and OMS encoded math fonts}
2101 \DeclareFontFamily{OML}{cmm}{\skewchar\font127 }
2102 \DeclareFontShape{OML}{cmm}{m}{it}{
2111 \DeclareFontShape{OML}{cmm}{b}{it}{<-6>cmmib5<6-8>cmmib7<8->cmmib10}{}
2112 \DeclareFontShape{OML}{cmm}{bx}{it}
2113 {<->ssub*cmm/b/it}{}
2116 \DeclareFontFamily{OMS}{cmsy}{\skewchar\font48 }
2117 \DeclareFontShape{OMS}{cmsy}{m}{n}{
2125 \DeclareFontShape{OMS}{cmsy}{b}{n}{<-6>cmbsy5<6-8>cmbsy7<8->cmbsy10}{}
2128 % \subsubsection{\LaTeX{} symbols}
2130 \DeclareFontFamily{U}{lasy}{}
2131 \DeclareFontShape{U}{lasy}{m}{n}{
2139 \DeclareFontShape{U}{lasy}{b}{n}{
2140 <-10> ssub * lasy/m/n
2150 % \subsection{Check the optional argument to floats}
2152 % The default definition of |\@xfloat| allows
2153 % |\begin{figure}[abt23WD]| silently ignoring all but |t|. If you use
2154 % |\begin{figure}[T]| you get no warning but the float is not allowed
2155 % \emph{anywhere} so will go to the end of document (or
2156 % |\clearpage|). This change gives an error message for undefined
2159 % \changes{v1.1n}{2013/12/13}{Check float optional argument.}
2161 \def\@xfloat #1[#2]{%
2163 \def \@captype {#1}%
2165 \@onelevel@sanitize \@fps
2166 \def \reserved@b {!}%
2167 \ifx \reserved@b \@fps
2176 \@floatpenalty -\@Mii
2178 \@floatpenalty-\@Miii
2181 \@parmoderr\@floatpenalty\z@
2183 \@next\@currbox\@freelist
2186 \expandafter \@tfor \expandafter \reserved@a
2187 \expandafter :\expandafter =\@fps
2190 % Start of changes, use a nested if structure, ending in an error.
2196 \advance \@tempcnta \@ne
2198 \else\if \reserved@a t%
2200 \else\if \reserved@a b%
2202 \else\if \reserved@a p%
2204 \else\if \reserved@a !%
2205 \ifnum \@tempcnta>15
2206 \advance\@tempcnta -\sixt@@n\relax
2209 \@latex@error{Unknown float option `\reserved@a'}%
2210 {Option `\reserved@a' ignored and `p' used.}%
2217 \@tempcntb \csname ftype@\@captype \endcsname
2218 \multiply \@tempcntb \@xxxii
2219 \advance \@tempcnta \@tempcntb
2220 \global \count\@currbox \@tempcnta
2224 \global \setbox\@currbox