updated
[latex2e.git] / base / fixltx2e.dtx
blobf5a58f20645c24c57231475551f65af3e3630315
1 % \iffalse meta-comment
3 % Copyright 1993-2014
4 % The LaTeX3 Project and any individual authors listed elsewhere
5 % in this file. 
6
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
9
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.
17
18 % This file has the LPPL maintenance status "maintained".
19
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
22 % information.
23
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.
27
28 % \fi
30 % \iffalse
31
32 %<*dtx>
33           \ProvidesFile{fixltx2e.dtx}
34 %</dtx>
35 %<fixltx2e,fix-cm>\NeedsTeXFormat{LaTeX2e}
36 %<fixltx2e>\ProvidesPackage{fixltx2e}
37 %<fix-cm>\ProvidesPackage{fix-cm}
38 %<driver>\ProvidesFile{fixltx2e.drv}
39 % \fi
40 %         \ProvidesFile{fixltx2e.dtx}
41           [2014/04/18 v1.1o fixes to LaTeX]
43 % \iffalse
44 %<*driver>
45  \documentclass{ltxdoc}
46  \newcommand\Lopt[1]{\textsf{#1}}
47  \let\Lpack\Lopt
48  \providecommand{\file}[1]{\texttt{#1}}
49  \providecommand{\MF}{\textsf{Metafont}}
50  \providecommand{\danger}{\marginpar[\hfill\protect\Huge!!]{\protect\Huge!!\hfill}}
51  \begin{document}
52  \DocInput{fixltx2e.dtx}
53  \end{document}
54 %</driver>
55 % \fi
57 % \CheckSum{1201}
59 %% \CharacterTable
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         \~}
77 % \let\package\textsf
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}}}
87 % \date{\filedate}
88 %  \maketitle
90 % \begin{abstract}
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 
95 %    functionality).
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.
102 % \end{abstract}
104 % \tableofcontents
106 % \newpage
108 % \section{Introduction}
110 % In the newsletter \texttt{ltnews07.tex}, which accompanied the
111 % \LaTeXe{} maintenance release of June 1997, we wrote:
112 % \begin{quote}
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.
117 %    
118 %    There are several reasons why we have decided not to make such
119 %    changes to these files.
120 %    \begin{itemize}
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.
125 %    \end{itemize}
126 %    
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.
133 % \end{quote}
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
148 % \begin{quote}
149 % |\NeedsTeXFormat{latex2e}[|\meta{date}|]| 
150 % \end{quote}
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
157 % of life).
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 
168 % subjects:
169 % \Lpack{fixltx2e} provides general changes to the \LaTeX{} kernel,
170 % while \Lpack{fix-cm} improves the definitions of the Computer Modern 
171 % font families.
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
188 % \begin{quote}
189 %   |\usepackage{fixltx2e}[|\meta{date}|]|
190 % \end{quote}
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}}
198 % \begin{sloppypar}
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}:
203 % \end{sloppypar}
204 % \begin{verse}
205 %   |\RequirePackage{fix-cm}|\\
206 %   |\documentclass| \dots
207 % \end{verse}
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 
223 %            (pr/2346)}
225 %\begin{verbatim}
226 % >Number:         2346
227 % >Category:       latex
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)
231 % >Description:
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...
243 % \end{verbatim}
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
290 % added. 
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)}
310 %\begin{verbatim}
311 % >Number:         2613
312 % >Category:       latex
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)
316 % >Description:
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.
320 % \end{verbatim}
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
356 % been accessed.
359 % \subsection{\texttt{\textbackslash @} discards spaces when moving
360 %             (pr/3039)}
362 %\begin{verbatim}
363 % >Number:         3039
364 % >Category:       latex
365 % >Synopsis:       \@ discards spaces when moving
366 % >Arrival-Date:   Sat May 22 09:01:06 1999
367 % >Originator:     asnd@triumf.ca (Donald Arseneau)
368 % >Description:
369 % The \@ command expands to \spacefactor\@m in auxiliary files,
370 % which then ignores following spaces when it is reprocessed.
371 %\end{verbatim}
373 % \subsection{\texttt{\textbackslash setlength} produces error if
374 %   used with registers like \texttt{\textbackslash dimen0} (pr/3066)}
376 %\begin{verbatim}
377 % >Number:         3066
378 % >Category:       latex
379 % >Synopsis:       \setlength{\dimen0}{10pt}
380 % >Arrival-Date:   Tue Jul  6 15:01:06 1999
381 % >Originator:     oberdiek@ruf.uni-freiburg.de (Heiko Oberdiek)
382 % >Description:
383 % The current implementation of \setlength causes an error,
384 % because the length specification isn't terminated properly.
385 % More safe:
386 % \def\setlength#1#2{#1=#2\relax}
387 %\end{verbatim}
389 % \subsection{\texttt{\textbackslash addpenalty} ruins flush-bottom (pr/3073)}
391 %\begin{verbatim}
392 % >Number:         3073
393 % >Category:       latex
394 % >Synopsis:       \addpenalty ruins flush-bottom
395 % >Arrival-Date:   Sat Jul 17 05:11:05 1999
396 % >Originator:     asnd@triumf.ca (Donald Arseneau)
397 % >Description:
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.)
403 %\end{verbatim}
407 % \section{Fixes added for 2003/06/01}
409 % \subsection{\texttt{\textbackslash fnsymbol} should use text symbols 
410 %    if possible (pr/3400)}
412 %\begin{verbatim}
413 % >Number:         3400
414 % >Category:       latex
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,
425 % IMO.
426 %\end{verbatim}
429 % \subsection{No hyphenation in first word after float environment (pr/3498)}
431 %\begin{verbatim}
432 % >Number:         3498
433 % >Category:       latex
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.
440 %\end{verbatim}
444 % \subsection{Allowing \texttt{\textbackslash emph} to produce small
445 %             caps, etc}
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.,
451 %\begin{verbatim}
452 %\renewcommand\eminnershape{\scshape}
453 %\end{verbatim}
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
462 %\begin{verbatim}
463 %\usepackage[T1]{fontenc}
464 %\end{verbatim}
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
472 % feel.
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:
496 % \begin{itemize}
497 %   \item
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.
506 %   \item
507 %   The Computer Modern fonts are made available with arbitrary sizes.
508 %   \item
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.
512 % \end{itemize}
513 % The package acts on the following font families:
514 % \begin{itemize}
515 %   \item
516 %   The text font families \file{cmr}, \file{cmss}, \file{cmtt} and 
517 %   \file{cmvtt} with OT1, T1 and TS1 encoding.
518 %   \item 
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.
521 %   \item
522 %   The symbols used by the package \Lpack{latexsym}, i.e., the font
523 %   family \file{lasy}.
524 % \end{itemize}
525 % Note that the package does \emph{not} act on:
526 % \begin{itemize}
527 % \item Font families such as CM~Fibonacci, CM~Dunhill etc.,
528 %   which are provided for experimental purposes or for fun only.
529 % \item
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.
535 % \item
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!
542 % \item
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
546 %   take care of it.
547 % \end{itemize}
549 % \subsubsection{How to load the package}
550 % \begin{sloppypar}
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}.
554 % Rationale:  
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.
559 % \end{sloppypar}
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
574 % problems.
575 %   
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)}
589 %\begin{verbatim}
590 % >Number:         3492
591 % >Category:       latex
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.
600 %\end{verbatim}
602 % \subsection{\texttt{\textbackslash DeclareMathSizes} only take pts.
603 %     (pr/3693)}
605 %\begin{verbatim}
606 % >Number:         3693
607 % >Category:       latex
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 
615 % specification. 
616 %\end{verbatim}
618 % \subsection{\texttt{\textbackslash addpenalty} ruins flush-bottom (pr/3073)}
620 %\begin{verbatim}
621 % >Number:         3073
622 % >Category:       latex
623 % >Synopsis:       \addpenalty ruins flush-bottom
624 % >Arrival-Date:   20 Oct 2005 14:46:35 -0700
625 % >Originator:     asnd@triumf.ca (Donald Arseneau)
626 % >Description:
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
631 %  the \vskip.
632 %\end{verbatim}
634 % \subsection{\texttt{\textbackslash footnotemark[x]} crashes with fixltx2e.sty 
635 %    (pr/3752)}
637 %\begin{verbatim}
638 % >Number:         3752
639 % >Category:       tools
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}.
648 %\end{verbatim}
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
659 % \begin{verbatim}
660 % \def\fnsymbol#1{\expandafter\@fnsymbol
661 %   \expandafter{\the\csname c@#1\endcsname}}
662 % \end{verbatim}
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
668 % the past 20~years.
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}
689 %\begin{verbatim}
690 % >Number:         3816
691 % >Category:       latex
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
702 % as in the PR?
704 % It is particulary confusing, that an unprotected \raisebox in a
705 % \section*-environment works fine, while in a \section-environment
706 % produces error.
707 %\end{verbatim}
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.
748 % \StopEventually{}
750 % \section{Implementation}
752 % We require at least a somewhat sane version of \LaTeXe{}. Earlier
753 % ones where really quite different from one another.
754 %    \begin{macrocode}
755 %<*fixltx2e>
756 \NeedsTeXFormat{LaTeX2e}[1996/06/01]
757 %    \end{macrocode}
761 % \subsection{2-col: 1-col fig can come before earlier 2-col fig 
762 %              (pr/2346) \\
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
767 % package.
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.
774 %    \begin{macrocode}
775 \def\@outputdblcol{%
776   \if@firstcolumn
777     \global\@firstcolumnfalse
778 %    \end{macrocode}
779 % Save the left column
780 %    \begin{macrocode}
781     \global\setbox\@leftcolumn\copy\@outputbox
782 %    \end{macrocode}
784 % Remember the marks from the first column
785 %    \begin{macrocode}
786     \splitmaxdepth\maxdimen
787     \vbadness\maxdimen
788 %    \end{macrocode} 
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)}
796 %    \begin{macrocode}
797      \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
798      \setbox\@outputbox\vsplit\@outputbox to\maxdimen
799 %    \end{macrocode}
801 % One minor difference from the current \package{fixmarks}, pass the 
802 % marks through a token register to stop any |#| tokens causing an
803 % error in a |\def|.
804 %    \begin{macrocode}
805     \toks@\expandafter{\topmark}%
806     \xdef\@firstcoltopmark{\the\toks@}%
807     \toks@\expandafter{\splitfirstmark}%
808     \xdef\@firstcolfirstmark{\the\toks@}%
809 %    \end{macrocode}
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.)
815 %    \begin{macrocode}
816     \ifx\@firstcolfirstmark\@empty
817       \global\let\@setmarks\relax
818     \else
819       \gdef\@setmarks{%
820         \let\firstmark\@firstcolfirstmark
821         \let\topmark\@firstcoltopmark}%
822     \fi
823 %    \end{macrocode}
825 % End of change
826 %    \begin{macrocode}
827   \else
828     \global\@firstcolumntrue
829     \setbox\@outputbox\vbox{%
830      \hb@xt@\textwidth{%
831         \hb@xt@\columnwidth{\box\@leftcolumn \hss}%
832         \hfil
833 %    \end{macrocode}
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.
837 %    \begin{macrocode}
838         {\normalcolor\vrule \@width\columnseprule}%
839         \hfil
840        \hb@xt@\columnwidth{\box\@outputbox \hss}}}%
841   \@combinedblfloats
842 %    \end{macrocode}
843 % Override current first and top with those of first column if necessary
844 %    \begin{macrocode}
845     \@setmarks
846 %    \end{macrocode}
847 % End of change
848 %    \begin{macrocode}
849     \@outputpage
850     \begingroup
851       \@dblfloatplacement
852       \@startdblcolumn
853       \@whilesw\if@fcolmade \fi{\@outputpage\@startdblcolumn}%
854     \endgroup
855   \fi}
856 %    \end{macrocode}
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.
864 %    \begin{macrocode}
865 \def\end@dblfloat{%
866 \if@twocolumn
867   \@endfloatbox
868   \ifnum\@floatpenalty <\z@
869     \@largefloatcheck
870 %    \end{macrocode}
872 %  Force the depth of two column float boxes.
873 %    \begin{macrocode}
874     \global\dp\@currbox1sp %
875 %    \end{macrocode}
877 % \changes{v1.1d}{2000/09/24}{FMi: use output routine to
878 %    defer float}
879 %    Next line assumes that first token of |\end@float| is
880 %    |\@endfloatbox| so we gobble that.
881 %    \begin{macrocode}
882 %    \@cons\@deferlist\@currbox
883      \expandafter\@gobble\end@float
884 %    \end{macrocode}
885 %    |\@Esphack| is then added by |\@endfloat| above.
886 %    \begin{macrocode}
887   \fi
888 %    \ifnum \@floatpenalty =-\@Mii \@Esphack\fi
889 \else
890   \end@float
893 %    \end{macrocode}
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).
898 %    \begin{macrocode}
899 \def\@testwrongwidth #1{%
900   \ifdim\dp#1=\f@depth 
901   \else
902     \global\@testtrue
903   \fi}
904 %    \end{macrocode}
906 % Normally looking for single column floats, which have zero depth.
907 %    \begin{macrocode}
908 \let\f@depth\z@
909 %    \end{macrocode}
911 % but when making two column float area, look for floats with 1sp
912 % depth.
913 %    \begin{macrocode}
914 \def\@dblfloatplacement{\global\@dbltopnum\c@dbltopnumber
915    \global\@dbltoproom \dbltopfraction\@colht
916    \@textmin \@colht
917    \advance \@textmin -\@dbltoproom
918    \@fpmin \dblfloatpagefraction\textheight
919    \@fptop \@dblfptop
920    \@fpsep \@dblfpsep
921    \@fpbot \@dblfpbot
922 %    \end{macrocode}
924 %    \begin{macrocode}
925    \def\f@depth{1sp}}
926 %    \end{macrocode}
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.
931 %    \begin{macrocode}
932 \def \@doclearpage {%
933      \ifvoid\footins
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
941        \else
942           \@latexerr{Float(s) lost}\@ehb
943           \global \let \@currlist \@empty
944        \fi
945        \@makefcolumn\@deferlist
946        \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
947        \if@twocolumn
948          \if@firstcolumn
949 %    \end{macrocode}
951 %    \begin{macrocode}
952            \xdef\@deferlist{\@dbltoplist\@deferlist}%
953 %    \end{macrocode}
955 %    \begin{macrocode}
956            \global \let \@dbltoplist \@empty
957            \global \@colht \textheight
958            \begingroup
959               \@dblfloatplacement
960 %    \end{macrocode}
962 %    \begin{macrocode}
963               \@makefcolumn\@deferlist
964               \@whilesw\if@fcolmade \fi{\@outputpage
965                                         \@makefcolumn\@deferlist}%
966 %    \end{macrocode}
968 %    \begin{macrocode}
969            \endgroup
970          \else
971            \vbox{}\clearpage
972          \fi
973        \fi
974 %    \end{macrocode}
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.}
980 %    \begin{macrocode}
981        \ifx\@deferlist\@empty \else\clearpage \fi
982      \else
983        \setbox\@cclv\vbox{\box\@cclv\vfil}%
984        \@makecol\@opcol
985        \clearpage
986      \fi
988 %    \end{macrocode}
990 %    \begin{macrocode}
991 \def \@startdblcolumn {%
992   \@tryfcolumn \@deferlist
993   \if@fcolmade
994   \else
995     \begingroup
996       \let \reserved@b \@deferlist
997       \global \let \@deferlist \@empty
998       \let \@elt \@sdblcolelt
999       \reserved@b
1000     \endgroup
1001   \fi
1003 %    \end{macrocode}
1005 %    \begin{macrocode}
1006 \def\@addtonextcol{%
1007   \begingroup
1008    \@insertfalse
1009    \@setfloattypecounts
1010    \ifnum \@fpstype=8
1011    \else
1012      \ifnum \@fpstype=24
1013      \else
1014        \@flsettextmin
1015        \@reqcolroom \ht\@currbox
1016        \advance \@reqcolroom \@textmin
1017        \ifdim \@colroom>\@reqcolroom
1018          \@flsetnum \@colnum
1019          \ifnum\@colnum>\z@
1020             \@bitor\@currtype\@deferlist
1021             \@testwrongwidth\@currbox
1022             \if@test
1023             \else
1024               \@addtotoporbot
1025             \fi
1026          \fi
1027        \fi
1028      \fi
1029    \fi
1030    \if@insert
1031    \else
1032      \@cons\@deferlist\@currbox
1033    \fi
1034   \endgroup
1036 %    \end{macrocode}
1038 %    \begin{macrocode}
1039 \def\@addtodblcol{%
1040   \begingroup
1041    \@insertfalse
1042    \@setfloattypecounts
1043    \@getfpsbit \tw@
1044    \ifodd\@tempcnta
1045      \@flsetnum \@dbltopnum
1046      \ifnum \@dbltopnum>\z@
1047        \@tempswafalse
1048        \ifdim \@dbltoproom>\ht\@currbox
1049          \@tempswatrue
1050        \else
1051          \ifnum \@fpstype<\sixt@@n
1052            \advance \@dbltoproom \@textmin
1053            \ifdim \@dbltoproom>\ht\@currbox
1054              \@tempswatrue
1055            \fi
1056            \advance \@dbltoproom -\@textmin
1057          \fi
1058        \fi
1059        \if@tempswa
1060            \@bitor \@currtype \@deferlist
1061 %    \end{macrocode}
1063 % not in fixfloats?
1064 %    \begin{macrocode}
1065           \@testwrongwidth\@currbox
1066 %    \end{macrocode}
1068 %    \begin{macrocode}
1069            \if@test
1070            \else
1071               \@tempdima -\ht\@currbox
1072               \advance\@tempdima
1073                 -\ifx \@dbltoplist\@empty \dbltextfloatsep \else
1074                                           \dblfloatsep \fi
1075               \global \advance \@dbltoproom \@tempdima
1076               \global \advance \@colht \@tempdima
1077               \global \advance \@dbltopnum \m@ne
1078               \@cons \@dbltoplist \@currbox
1079               \@inserttrue
1080            \fi
1081        \fi
1082      \fi
1083    \fi
1084    \if@insert
1085    \else
1086      \@cons\@deferlist\@currbox
1087    \fi
1088   \endgroup
1090 %    \end{macrocode}
1092 %    \begin{macrocode}
1093 \def \@addtocurcol {%
1094    \@insertfalse
1095    \@setfloattypecounts
1096    \ifnum \@fpstype=8
1097    \else
1098      \ifnum \@fpstype=24
1099      \else
1100        \@flsettextmin
1101        \advance \@textmin \@textfloatsheight
1102        \@reqcolroom \@pageht
1103        \ifdim \@textmin>\@reqcolroom
1104          \@reqcolroom \@textmin
1105        \fi
1106        \advance \@reqcolroom \ht\@currbox
1107        \ifdim \@colroom>\@reqcolroom
1108          \@flsetnum \@colnum
1109          \ifnum \@colnum>\z@
1110            \@bitor\@currtype\@deferlist
1111 %    \end{macrocode}
1112 %    We need to defer the float also if its width
1113 %    doesn't fit.
1114 % \changes{v1.1d}{2000/09/24}{FMi: test for wide float was
1115 %    in wrong place}
1116 %    \begin{macrocode}
1117           \@testwrongwidth\@currbox
1118 %    \end{macrocode}
1120 %    \begin{macrocode}
1121            \if@test
1122            \else
1123              \@bitor\@currtype\@botlist
1124              \if@test
1125                \@addtobot
1126              \else
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
1134                    \if@nobreak
1135                      \nobreak
1136                      \@nobreakfalse
1137                      \everypar{}%
1138                    \else
1139                      \addpenalty \interlinepenalty
1140                    \fi
1141                    \vskip \intextsep
1142                    \box\@currbox
1143                    \penalty\interlinepenalty
1144                    \vskip\intextsep
1145                    \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
1146                    \outputpenalty \z@
1147                    \@inserttrue
1148                  \fi
1149                \fi
1150                \if@insert
1151                \else
1152                  \@addtotoporbot
1153                \fi
1154              \fi
1155            \fi
1156          \fi
1157        \fi
1158      \fi
1159    \fi
1160    \if@insert
1161    \else
1162      \@resethfps
1163      \@cons\@deferlist\@currbox
1164    \fi
1166 %    \end{macrocode}
1168 %    \begin{macrocode}
1169 \def\@xtryfc #1{%
1170   \@next\reserved@a\@trylist{}{}%
1171   \@currtype \count #1%
1172   \divide\@currtype\@xxxii
1173   \multiply\@currtype\@xxxii
1174   \@bitor \@currtype \@failedlist
1175   \@testfp #1%
1176 %    \end{macrocode}
1178 %    \begin{macrocode}
1179   \@testwrongwidth #1%
1180 %    \end{macrocode}
1182 %    \begin{macrocode}
1183   \ifdim \ht #1>\@colht
1184      \@testtrue
1185   \fi
1186   \if@test 
1187     \@cons\@failedlist #1%
1188   \else
1189     \@ytryfc #1%
1190   \fi}
1191 %    \end{macrocode}
1193 %    \begin{macrocode}
1194 \def\@ztryfc #1{%
1195   \@tempcnta\count #1%
1196   \divide\@tempcnta\@xxxii
1197   \multiply\@tempcnta\@xxxii 
1198   \@bitor \@tempcnta {\@failedlist \@flfail}%
1199   \@testfp #1%
1200 %    \end{macrocode}
1202 % not in fixfloats?
1203 %    \begin{macrocode}
1204   \@testwrongwidth #1%
1205 %    \end{macrocode}
1207 %    \begin{macrocode}
1208   \@tempdimb\@tempdima
1209   \advance\@tempdimb\ht #1%
1210   \advance\@tempdimb\@fpsep
1211   \ifdim \@tempdimb >\@colht
1212     \@testtrue
1213   \fi
1214   \if@test
1215     \@cons\@flfail #1%
1216   \else
1217     \@cons\@flsucceed #1%
1218     \@tempdima\@tempdimb
1219   \fi}
1220 %    \end{macrocode}
1227 % \subsection{\texttt{\textbackslash @} discards spaces when moving
1228 %             (pr3039)}
1230 % \begin{macro}{\@}
1231 % Ensure that |\@m| can't eat spaces. Alternative would be to make
1232 % |\@| robust but that takes more space.
1233 %    \begin{macrocode}
1234 \def\@{\spacefactor\@m{}}
1235 %    \end{macrocode}
1236 % \end{macro}
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
1247 %    modified already}
1248 %    \begin{macrocode}
1249 \def\@tempa#1#2{#1#2\relax}
1250 \ifx\setlength\@tempa
1251   \def\setlength#1#2{#1 #2\relax}
1253 %    \end{macrocode}
1254 % \end{macro}
1257 % \subsection{\texttt{\textbackslash addpenalty} ruins flush-bottom
1258 % (pr/3073)}
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.
1266 %    \begin{macrocode}
1267 \def\addpenalty#1{%
1268   \ifvmode
1269     \if@minipage
1270     \else
1271       \if@nobreak
1272       \else
1273         \ifdim\lastskip=\z@
1274           \penalty#1\relax
1275         \else
1276           \@tempskipb\lastskip
1277 %    \end{macrocode}
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.
1283 %    \begin{macrocode}
1284           \begingroup
1285             \advance \@tempskipb
1286               \ifdim\prevdepth>\maxdepth\maxdepth\else
1287 %    \end{macrocode}
1288 %    If |\prevdepth| is -1000pt due to |\nointerlineskip| we better
1289 %    not add it!
1290 %  \changes{v1.0c}{2000/09/21}{Don't add \cs{prevdepth} if it is a
1291 %    senile  value!}
1292 %    \begin{macrocode}
1293                  \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
1294                \fi
1295              \vskip -\@tempskipb
1296              \penalty#1%
1297              \vskip\@tempskipb
1298           \endgroup
1299           \vskip -\@tempskipb
1300           \vskip \@tempskipb
1301         \fi
1302       \fi
1303     \fi
1304   \else
1305     \@noitemerr
1306   \fi}
1307 %    \end{macrocode}
1308 % \end{macro}
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.
1333 %    \begin{macrocode}
1334 \def\@fnsymbol#1{%
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
1344    \@ctrerr \fi
1346 %    \end{macrocode}
1347 %  \end{macro}
1348 %  \begin{macro}{\TextOrMath}
1349 %    \changes{v1.1m}{2006/01/08}{Add command to solve robustness
1350 %      issues (pr/3752)}
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
1359 %    side effects.
1361 %    First some code for checking if we are running e\TeX\ but making
1362 %    sure not to permanently turn |\eTeXversion| into |\relax|.
1363 %    \begin{macrocode}
1364 \begingroup\expandafter\expandafter\expandafter\endgroup
1365 \expandafter\ifx\csname eTeXversion\endcsname\relax 
1366 %    \end{macrocode}
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.
1370 %    \begin{macrocode}
1371 \DeclareRobustCommand\TextOrMath{%
1372   \ifmmode  \expandafter\@secondoftwo
1373   \else     \expandafter\@firstoftwo  \fi}
1374 \protected@edef\TextOrMath#1#2{\TextOrMath{#1}{#2}}
1375 \else
1376 %    \end{macrocode}
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.
1379 %    \begin{macrocode}
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
1385   {#1}{#2}}
1387 %    \end{macrocode}
1388 %  \end{macro}
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)}
1397 %    \begin{macrocode}
1398 \def\@esphack{%
1399   \relax
1400   \ifhmode
1401     \spacefactor\@savsf
1402     \ifdim\@savsk>\z@
1403       \nobreak \hskip\z@skip  % <------
1404       \ignorespaces
1405     \fi
1406   \fi}
1407 %    \end{macrocode}
1409 %    \begin{macrocode}
1410 \def\@Esphack{%
1411   \relax
1412   \ifhmode
1413     \spacefactor\@savsf
1414     \ifdim\@savsk>\z@
1415       \nobreak \hskip\z@skip  % <------
1416       \@ignoretrue
1417       \ignorespaces
1418     \fi
1419    \fi}
1420 %    \end{macrocode}
1421 %  \end{macro}
1422 %  \end{macro}
1424 % \subsection{Allowing \texttt{\textbackslash emph} to produce small
1425 %             caps, etc}
1426 %  \begin{macro}{\em}
1427 %  \begin{macro}{\eminnershape}
1428 % \changes{v1.1g}{2003/09/19}{Allow \cs{emph} to produce small caps}
1429 %    \begin{macrocode}
1430 \DeclareRobustCommand\em
1431         {\@nomath\em \ifdim \fontdimen\@ne\font >\z@
1432                        \eminnershape \else \itshape \fi}
1433 \def\eminnershape{\upshape}
1434 %    \end{macrocode}
1435 %  \end{macro}
1436 %  \end{macro}
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
1445 % kernel.
1446 %    \begin{macrocode}
1447 \DeclareRobustCommand*\textsubscript[1]{%
1448   \@textsubscript{\selectfont#1}}
1449 \def\@textsubscript#1{%
1450   {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
1451 %    \end{macrocode}
1452 %  \end{macro}
1454 % \subsection{\texttt{\textbackslash DeclareMathSizes} only take pts.
1455 %     (pr/3693)}
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}=.
1462 %    \begin{macrocode}
1463 \def\@DeclareMathSizes #1#2#3#4#5{%
1464   \@defaultunits\dimen@ #2pt\relax\@nnil
1465   \if $#3$%
1466     \expandafter\let\csname S@\strip@pt\dimen@\endcsname\math@fontsfalse
1467   \else
1468     \@defaultunits\dimen@ii #3pt\relax\@nnil
1469     \@defaultunits\@tempdima #4pt\relax\@nnil
1470     \@defaultunits\@tempdimb #5pt\relax\@nnil
1471     \toks@{#1}%
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}%
1476       \the\toks@
1477     }%
1478   \fi
1480 %    \end{macrocode}
1481 % \end{macro}
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
1489 % at all.
1490 %    \begin{macrocode}
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}%
1495     \@eha
1496   }%
1497 %    \end{macrocode}
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=.
1503 %    \begin{macrocode}
1504   {% 
1505     \@ifundefined{\expandafter\@gobble\string#1\space}%
1506     {% 
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}%
1512       \edef#1{%
1513         \ifx\reserved@a\reserved@b
1514           \noexpand\x@protect\noexpand#1%
1515         \fi
1516         \noexpand\protect\expandafter\noexpand
1517         \csname\expandafter\@gobble\string#1\space\endcsname}%
1518     }%
1519     {\@latex@info{The control sequence `\string#1' is already robust}}%
1520    }%
1522 %    \end{macrocode}
1523 % \end{macro}
1524 % Here we make some kernel macros robust.
1525 %    \begin{macrocode}
1526 \MakeRobust\(
1527 \MakeRobust\) 
1528 \MakeRobust\[ 
1529 \MakeRobust\]
1530 \MakeRobust\makebox 
1531 \MakeRobust\savebox 
1532 \MakeRobust\framebox 
1533 \MakeRobust\parbox 
1534 \MakeRobust\rule
1535 \MakeRobust\raisebox
1536 %    \end{macrocode}
1538 %    \begin{macrocode}
1539 %</fixltx2e>
1540 %    \end{macrocode}
1542 % \subsection{Using EC fonts (T1 encoding) makes my documents look
1543 %             bl**dy horrible}
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.
1549 %    \begin{macrocode}
1550 %<*fix-cm>
1551 \input{ts1enc.def}
1552 %    \end{macrocode}
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:
1559 %    \begin{macrocode}
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
1564 %    \end{macrocode}
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.
1572 %    \begin{macrocode}
1573 \begingroup
1574 \nfss@catcodes
1575 %    \end{macrocode}
1577 % \subsubsection{T1 encoding}
1579 % \paragraph{CM Roman}
1580 %    \begin{macrocode}
1581 \DeclareFontFamily{T1}{cmr}{}
1582 \DeclareFontShape{T1}{cmr}{m}{n}{
1583         <-6>    ecrm0500
1584         <6-7>   ecrm0600
1585         <7-8>   ecrm0700
1586         <8-9>   ecrm0800
1587         <9-10>  ecrm0900
1588         <10-12> ecrm1000
1589         <12-17> ecrm1200
1590         <17->   ecrm1728
1591       }{}
1592 \DeclareFontShape{T1}{cmr}{m}{sl}{
1593         <-6>    ecsl0500
1594         <6-7>   ecsl0600
1595         <7-8>   ecsl0700
1596         <8-9>   ecsl0800
1597         <9-10>  ecsl0900
1598         <10-12> ecsl1000
1599         <12-17> ecsl1200
1600         <17->   ecsl1728
1601       }{}
1602 \DeclareFontShape{T1}{cmr}{m}{it}{
1603         <-8>    ecti0700
1604         <8-9>   ecti0800
1605         <9-10>  ecti0900
1606         <10-12> ecti1000
1607         <12-17> ecti1200
1608         <17->   ecti1728
1609       }{}
1610 \DeclareFontShape{T1}{cmr}{m}{sc}{
1611         <-6>    eccc0500
1612         <6-7>   eccc0600
1613         <7-8>   eccc0700
1614         <8-9>   eccc0800
1615         <9-10>  eccc0900
1616         <10-12> eccc1000
1617         <12-17> eccc1200
1618         <17->   eccc1728
1619                }{}
1620 \DeclareFontShape{T1}{cmr}{m}{ui}{
1621         <-8>    ecui0700
1622         <8-9>   ecui0800
1623         <9-10>  ecui0900
1624         <10-12> ecui1000
1625         <12-17> ecui1200
1626         <17->   ecui1728
1627       }{}
1628 \DeclareFontShape{T1}{cmr}{b}{n}{
1629         <-6>    ecrb0500
1630         <6-7>   ecrb0600
1631         <7-8>   ecrb0700
1632         <8-9>   ecrb0800
1633         <9-10>  ecrb0900
1634         <10-12> ecrb1000
1635         <12-17> ecrb1200
1636         <17->   ecrb1728
1637       }{}
1638 \DeclareFontShape{T1}{cmr}{bx}{n}{
1639         <-6>    ecbx0500
1640         <6-7>   ecbx0600
1641         <7-8>   ecbx0700
1642         <8-9>   ecbx0800
1643         <9-10>  ecbx0900
1644         <10-12> ecbx1000
1645         <12->   ecbx1200
1646       }{}
1647 \DeclareFontShape{T1}{cmr}{bx}{sl}{
1648         <-6>    ecbl0500
1649         <6-7>   ecbl0600
1650         <7-8>   ecbl0700
1651         <8-9>   ecbl0800
1652         <9-10>  ecbl0900
1653         <10-12> ecbl1000
1654         <12->   ecbl1200
1655       }{}
1656 \DeclareFontShape{T1}{cmr}{bx}{it}{
1657         <-8>    ecbi0700
1658         <8-9>   ecbi0800
1659         <9-10>  ecbi0900
1660         <10-12> ecbi1000
1661         <12->   ecbi1200
1662       }{}
1663 \DeclareFontShape{T1}{cmr}{bx}{sc}{
1664         <-6>    ecxc0500
1665         <6-7>   ecxc0600
1666         <7-8>   ecxc0700
1667         <8-9>   ecxc0800
1668         <9-10>  ecxc0900
1669         <10-12> ecxc1000
1670         <12->   ecxc1200
1671       }{}
1673 %    \end{macrocode}
1675 % \paragraph{CM Sans}
1676 %    \begin{macrocode}
1677 \DeclareFontFamily{T1}{cmss}{}
1678 \DeclareFontShape{T1}{cmss}{m}{n}{
1679         <-9>    ecss0800
1680         <9-10>  ecss0900
1681         <10-12> ecss1000
1682         <12-17> ecss1200
1683         <17->   ecss1728
1684       }{}
1685 \DeclareFontShape{T1}{cmss}{m}{sl}{
1686         <-9>    ecsi0800
1687         <9-10>  ecsi0900
1688         <10-12> ecsi1000
1689         <12-17> ecsi1200
1690         <17->   ecsi1728
1691       }{}
1692 \DeclareFontShape{T1}{cmss}{m}{it}
1693        {<->ssub*cmss/m/sl}{}
1694 \DeclareFontShape{T1}{cmss}{m}{sc}
1695        {<->sub*cmr/m/sc}{}
1696 \DeclareFontShape{T1}{cmss}{sbc}{n}{
1697         <->     ecssdc10
1698        }{}
1699 \DeclareFontShape{T1}{cmss}{bx}{n}{
1700         <-10>   ecsx0900
1701         <10->   ecsx1000
1702       }{}
1703 \DeclareFontShape{T1}{cmss}{bx}{sl}{
1704         <-10>   ecso0900
1705         <10->   ecso1000
1706       }{}
1707 \DeclareFontShape{T1}{cmss}{bx}{it}
1708        {<->ssub*cmss/bx/sl}{}
1709 %    \end{macrocode}
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}.
1714 %    \begin{macrocode}
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}{}
1721 %    \end{macrocode}
1723 % \paragraph{CM Typewriter}
1724 %    \begin{macrocode}
1725 \DeclareFontFamily{T1}{cmtt}{\hyphenchar \font\m@ne}
1726 \DeclareFontShape{T1}{cmtt}{m}{n}{
1727         <-9>    ectt0800
1728         <9-10>  ectt0900
1729         <10-12> ectt1000
1730         <12-17> ectt1200
1731         <17->   ectt1728
1732       }{}
1733 \DeclareFontShape{T1}{cmtt}{m}{it}{
1734         <-9>    ecit0800
1735         <9-10>  ecit0900
1736         <10-12> ecit1000
1737         <12-17> ecit1200
1738         <17->   ecit1728
1739       }{}
1740 \DeclareFontShape{T1}{cmtt}{m}{sl}{
1741         <-9>    ecst0800
1742         <9-10>  ecst0900
1743         <10-12> ecst1000
1744         <12-17> ecst1200
1745         <17->   ecst1728
1746       }{}
1747 \DeclareFontShape{T1}{cmtt}{m}{sc}{
1748         <-9>    ectc0800
1749         <9-10>  ectc0900
1750         <10-12> ectc1000
1751         <12-17> ectc1200
1752         <17->   ectc1728
1753       }{}
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}{}
1760 %    \end{macrocode}
1761 % Substitutions not provided in the default \file{.fd} files:
1762 %    \begin{macrocode}
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}{}
1769 %    \end{macrocode}
1771 % \paragraph{CM Typewiter (var.)}
1772 %    \begin{macrocode}
1773 \DeclareFontFamily{T1}{cmvtt}{}
1774 \DeclareFontShape{T1}{cmvtt}{m}{n}{
1775         <-9>    ecvt0800
1776         <9-10>  ecvt0900
1777         <10-12> ecvt1000
1778         <12-17> ecvt1200
1779         <17->   ecvt1728
1780       }{}
1781 \DeclareFontShape{T1}{cmvtt}{m}{it}{
1782         <-9>    ecvi0800
1783         <9-10>  ecvi0900
1784         <10-12> ecvi1000
1785         <12-17> ecvi1200
1786         <17->   ecvi1728
1787       }{}
1788 %    \end{macrocode}
1790 % \subsubsection{TS1 encoding}
1792 % \paragraph{CM Roman}
1793 %    \begin{macrocode}
1794 \DeclareFontFamily{TS1}{cmr}{\hyphenchar\font\m@ne}
1795 \DeclareFontShape{TS1}{cmr}{m}{n}{
1796         <-6>    tcrm0500
1797         <6-7>   tcrm0600
1798         <7-8>   tcrm0700
1799         <8-9>   tcrm0800
1800         <9-10>  tcrm0900
1801         <10-12> tcrm1000
1802         <12-17> tcrm1200
1803         <17->   tcrm1728
1804       }{}
1805 \DeclareFontShape{TS1}{cmr}{m}{sl}{
1806         <-6>    tcsl0500
1807         <6-7>   tcsl0600
1808         <7-8>   tcsl0700
1809         <8-9>   tcsl0800
1810         <9-10>  tcsl0900
1811         <10-12> tcsl1000
1812         <12-17> tcsl1200
1813         <17->   tcsl1728
1814       }{}
1815 \DeclareFontShape{TS1}{cmr}{m}{it}{
1816         <-8>    tcti0700
1817         <8-9>   tcti0800
1818         <9-10>  tcti0900
1819         <10-12> tcti1000
1820         <12-17> tcti1200
1821         <17->   tcti1728
1822       }{}
1823 \DeclareFontShape{TS1}{cmr}{m}{ui}{
1824         <-8>    tcui0700
1825         <8-9>   tcui0800
1826         <9-10>  tcui0900
1827         <10-12> tcui1000
1828         <12-17> tcui1200
1829         <17->   tcui1728
1830       }{}
1831 \DeclareFontShape{TS1}{cmr}{b}{n}{
1832         <-6>    tcrb0500
1833         <6-7>   tcrb0600
1834         <7-8>   tcrb0700
1835         <8-9>   tcrb0800
1836         <9-10>  tcrb0900
1837         <10-12> tcrb1000
1838         <12-17> tcrb1200
1839         <17->   tcrb1728
1840       }{}
1841 \DeclareFontShape{TS1}{cmr}{bx}{n}{
1842         <-6>    tcbx0500
1843         <6-7>   tcbx0600
1844         <7-8>   tcbx0700
1845         <8-9>   tcbx0800
1846         <9-10>  tcbx0900
1847         <10-12> tcbx1000
1848         <12->   tcbx1200
1849       }{}
1850 \DeclareFontShape{TS1}{cmr}{bx}{sl}{
1851         <-6>    tcbl0500
1852         <6-7>   tcbl0600
1853         <7-8>   tcbl0700
1854         <8-9>   tcbl0800
1855         <9-10>  tcbl0900
1856         <10-12> tcbl1000
1857         <12->   tcbl1200
1858       }{}
1859 \DeclareFontShape{TS1}{cmr}{bx}{it}{
1860         <-8>    tcbi0700
1861         <8-9>   tcbi0800
1862         <9-10>  tcbi0900
1863         <10-12> tcbi1000
1864         <12->   tcbi1200
1865       }{}
1866 %    \end{macrocode}
1868 % \paragraph{CM Sans}
1869 %    \begin{macrocode}
1870 \DeclareFontFamily{TS1}{cmss}{\hyphenchar\font\m@ne}
1871 \DeclareFontShape{TS1}{cmss}{m}{n}{
1872         <-9>    tcss0800
1873         <9-10>  tcss0900
1874         <10-12> tcss1000
1875         <12-17> tcss1200
1876         <17->   tcss1728
1877       }{}
1878 \DeclareFontShape{TS1}{cmss}{m}{it}
1879        {<->ssub*cmss/m/sl}{}
1880 \DeclareFontShape{TS1}{cmss}{m}{sl}{
1881         <-9>    tcsi0800
1882         <9-10>  tcsi0900
1883         <10-12> tcsi1000
1884         <12-17> tcsi1200
1885         <17->   tcsi1728
1886       }{}
1887 \DeclareFontShape{TS1}{cmss}{sbc}{n}{
1888         <->     tcssdc10
1889        }{}
1890 \DeclareFontShape{TS1}{cmss}{bx}{n}{
1891         <-10>   tcsx0900
1892         <10->   tcsx1000
1893       }{}
1894 \DeclareFontShape{TS1}{cmss}{bx}{sl}{
1895         <-10>   tcso0900
1896         <10->   tcso1000
1897       }{}
1898 \DeclareFontShape{TS1}{cmss}{bx}{it}
1899        {<->ssub*cmss/bx/sl}{}
1900 %    \end{macrocode}
1901 % Substitutions not provided in the default \file{.fd} files:
1902 %    \begin{macrocode}
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}{}
1909 %    \end{macrocode}
1911 % \paragraph{CM Typewriter}
1912 %    \begin{macrocode}
1913 \DeclareFontFamily{TS1}{cmtt}{\hyphenchar \font\m@ne}
1914 \DeclareFontShape{TS1}{cmtt}{m}{n}{
1915         <-9>    tctt0800
1916         <9-10>  tctt0900
1917         <10-12> tctt1000
1918         <12-17> tctt1200
1919         <17->   tctt1728
1920       }{}
1921 \DeclareFontShape{TS1}{cmtt}{m}{it}{
1922         <-9>    tcit0800
1923         <9-10>  tcit0900
1924         <10-12> tcit1000
1925         <12-17> tcit1200
1926         <17->   tcit1728
1927       }{}
1928 \DeclareFontShape{TS1}{cmtt}{m}{sl}{
1929         <-9>    tcst0800
1930         <9-10>  tcst0900
1931         <10-12> tcst1000
1932         <12-17> tcst1200
1933         <17->   tcst1728
1934       }{}
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}{}
1941 %    \end{macrocode}
1942 % Substitutions not provided in the default \file{.fd} files:
1943 %    \begin{macrocode}
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}{}
1950 %    \end{macrocode}
1952 % \paragraph{CM Typewriter (var.)}
1953 %    \begin{macrocode}
1954 \DeclareFontFamily{TS1}{cmvtt}{}
1955 \DeclareFontShape{TS1}{cmvtt}{m}{n}{
1956         <-9>    tcvt0800
1957         <9-10>  tcvt0900
1958         <10-12> tcvt1000
1959         <12-17> tcvt1200
1960         <17->   tcvi1728
1961       }{}
1962 \DeclareFontShape{TS1}{cmvtt}{m}{it}{
1963         <-9>    tcvi0800
1964         <9-10>  tcvi0900
1965         <10-12> tcvi1000
1966         <12-17> tcvi1200
1967         <17->   tcvi1728
1968       }{}
1969 %    \end{macrocode}
1971 % \subsubsection{OT1 encoding}
1973 % \paragraph{CM Roman}
1974 %    \begin{macrocode}
1975 \DeclareFontFamily{OT1}{cmr}{\hyphenchar\font45 }
1976 \DeclareFontShape{OT1}{cmr}{m}{n}{
1977         <-6>    cmr5
1978         <6-7>   cmr6
1979         <7-8>   cmr7
1980         <8-9>   cmr8
1981         <9-10>  cmr9
1982         <10-12> cmr10
1983         <12-17> cmr12
1984         <17->   cmr17
1985       }{}
1986 \DeclareFontShape{OT1}{cmr}{m}{sl}{
1987         <-9>    cmsl8
1988         <9-10>  cmsl9
1989         <10-12> cmsl10
1990         <12->   cmsl12
1991       }{}
1992 \DeclareFontShape{OT1}{cmr}{m}{it}{
1993         <-8>    cmti7
1994         <8-9>   cmti8
1995         <9-10>  cmti9
1996         <10-12> cmti10
1997         <12->   cmti12
1998       }{}
1999 \DeclareFontShape{OT1}{cmr}{m}{sc}{
2000         <->     cmcsc10
2001       }{}
2002 \DeclareFontShape{OT1}{cmr}{m}{ui}{
2003         <->     cmu10
2004       }{}
2005 \DeclareFontShape{OT1}{cmr}{b}{n}{
2006         <->     cmb10
2007       }{}
2008 \DeclareFontShape{OT1}{cmr}{bx}{n}{
2009         <-6>    cmbx5
2010         <6-7>   cmbx6
2011         <7-8>   cmbx7
2012         <8-9>   cmbx8
2013         <9-10>  cmbx9
2014         <10-12> cmbx10
2015         <12->   cmbx12
2016       }{}
2017 \DeclareFontShape{OT1}{cmr}{bx}{sl}{
2018         <->     cmbxsl10
2019       }{}
2020 \DeclareFontShape{OT1}{cmr}{bx}{it}{
2021         <->     cmbxti10
2022       }{}
2023 \DeclareFontShape{OT1}{cmr}{bx}{ui}
2024       {<->sub*cmr/m/ui}{}
2025 %    \end{macrocode}
2027 % \paragraph{CM Sans}
2028 %    \begin{macrocode}
2029 \DeclareFontFamily{OT1}{cmss}{\hyphenchar\font45 }
2030 \DeclareFontShape{OT1}{cmss}{m}{n}{
2031         <-9>    cmss8
2032         <9-10>  cmss9
2033         <10-12> cmss10
2034         <12-17> cmss12
2035         <17->   cmss17
2036       }{}
2037 \DeclareFontShape{OT1}{cmss}{m}{it}
2038       {<->sub*cmss/m/sl}{}
2039 \DeclareFontShape{OT1}{cmss}{m}{sl}{
2040         <-9>    cmssi8
2041         <9-10>  cmssi9
2042         <10-12> cmssi10
2043         <12-17> cmssi12
2044         <17->   cmssi17
2045       }{}
2046 \DeclareFontShape{OT1}{cmss}{m}{sc}
2047        {<->sub*cmr/m/sc}{}
2048 \DeclareFontShape{OT1}{cmss}{m}{ui}
2049        {<->sub*cmr/m/ui}{}
2050 \DeclareFontShape{OT1}{cmss}{sbc}{n}{
2051         <->     cmssdc10
2052       }{}
2053 \DeclareFontShape{OT1}{cmss}{bx}{n}{
2054         <->     cmssbx10
2055       }{}
2056 \DeclareFontShape{OT1}{cmss}{bx}{ui}
2057        {<->sub*cmr/bx/ui}{}
2058 %    \end{macrocode}
2060 % \paragraph{CM Typewriter}
2061 %    \begin{macrocode}
2062 \DeclareFontFamily{OT1}{cmtt}{\hyphenchar \font\m@ne}
2063 \DeclareFontShape{OT1}{cmtt}{m}{n}{
2064         <-9>    cmtt8
2065         <9-10>  cmtt9
2066         <10-12> cmtt10
2067         <12->   cmtt12
2068       }{}
2069 \DeclareFontShape{OT1}{cmtt}{m}{it}{
2070         <->     cmitt10
2071       }{}
2072 \DeclareFontShape{OT1}{cmtt}{m}{sl}{
2073         <->     cmsltt10
2074       }{}
2075 \DeclareFontShape{OT1}{cmtt}{m}{sc}{
2076         <->     cmtcsc10
2077       }{}
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}{}
2086 %    \end{macrocode}
2088 % \paragraph{CM Typewriter (var.)}
2089 %    \begin{macrocode}
2090 \DeclareFontFamily{OT1}{cmvtt}{\hyphenchar\font45 }
2091 \DeclareFontShape{OT1}{cmvtt}{m}{n}{
2092         <->     cmvtt10
2093       }{}
2094 \DeclareFontShape{OT1}{cmvtt}{m}{it}{
2095         <->     cmvtti10
2096       }{}
2097 %    \end{macrocode}
2099 % \subsubsection{OML and OMS encoded math fonts}
2100 %    \begin{macrocode}
2101 \DeclareFontFamily{OML}{cmm}{\skewchar\font127 }
2102 \DeclareFontShape{OML}{cmm}{m}{it}{
2103         <-6>    cmmi5
2104         <6-7>   cmmi6
2105         <7-8>   cmmi7
2106         <8-9>   cmmi8
2107         <9-10>  cmmi9
2108         <10-12> cmmi10
2109         <12->   cmmi12
2110       }{}
2111 \DeclareFontShape{OML}{cmm}{b}{it}{<-6>cmmib5<6-8>cmmib7<8->cmmib10}{}
2112 \DeclareFontShape{OML}{cmm}{bx}{it}
2113        {<->ssub*cmm/b/it}{}
2114 %    \end{macrocode}
2115 %    \begin{macrocode}
2116 \DeclareFontFamily{OMS}{cmsy}{\skewchar\font48 }
2117 \DeclareFontShape{OMS}{cmsy}{m}{n}{
2118         <-6>    cmsy5
2119         <6-7>   cmsy6
2120         <7-8>   cmsy7
2121         <8-9>   cmsy8
2122         <9-10>  cmsy9
2123         <10->   cmsy10
2124       }{}
2125 \DeclareFontShape{OMS}{cmsy}{b}{n}{<-6>cmbsy5<6-8>cmbsy7<8->cmbsy10}{}
2126 %    \end{macrocode}
2128 % \subsubsection{\LaTeX{} symbols}
2129 %    \begin{macrocode}
2130 \DeclareFontFamily{U}{lasy}{}
2131 \DeclareFontShape{U}{lasy}{m}{n}{ 
2132         <-6>    lasy5 
2133         <6-7>   lasy6
2134         <7-8>   lasy7
2135         <8-9>   lasy8
2136         <9-10>  lasy9 
2137         <10->   lasy10  
2138       }{}
2139 \DeclareFontShape{U}{lasy}{b}{n}{
2140         <-10>   ssub * lasy/m/n
2141         <10->   lasyb10  
2142       }{}
2143 %    \end{macrocode}
2144 %    \begin{macrocode}
2145 \endgroup
2146 %</fix-cm>
2147 %    \end{macrocode}
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
2157 % options.  
2159 % \changes{v1.1n}{2013/12/13}{Check float optional argument.}
2160 %    \begin{macrocode}
2161 \def\@xfloat #1[#2]{%
2162   \@nodocument
2163   \def \@captype {#1}%
2164    \def \@fps {#2}%
2165    \@onelevel@sanitize \@fps
2166    \def \reserved@b {!}%
2167    \ifx \reserved@b \@fps
2168      \@fpsadddefault
2169    \else
2170      \ifx \@fps \@empty
2171        \@fpsadddefault
2172      \fi
2173    \fi
2174    \ifhmode
2175      \@bsphack
2176      \@floatpenalty -\@Mii
2177    \else
2178      \@floatpenalty-\@Miii
2179    \fi
2180   \ifinner
2181      \@parmoderr\@floatpenalty\z@
2182   \else
2183     \@next\@currbox\@freelist
2184       {%
2185        \@tempcnta \sixt@@n
2186        \expandafter \@tfor \expandafter \reserved@a
2187          \expandafter :\expandafter =\@fps
2188          \do
2189 %    \end{macrocode}
2190 % Start of changes, use a nested if structure, ending in an error.
2191 %    \begin{macrocode}
2192           {%
2193            \if \reserved@a h%
2194              \ifodd \@tempcnta
2195              \else
2196                \advance \@tempcnta \@ne
2197              \fi
2198            \else\if \reserved@a t%
2199              \@setfpsbit \tw@
2200            \else\if \reserved@a b%
2201              \@setfpsbit 4%
2202            \else\if \reserved@a p%
2203              \@setfpsbit 8%
2204            \else\if \reserved@a !%
2205              \ifnum \@tempcnta>15
2206                \advance\@tempcnta -\sixt@@n\relax
2207              \fi
2208            \else
2209              \@latex@error{Unknown float option `\reserved@a'}%
2210              {Option `\reserved@a' ignored and `p' used.}%
2211              \@setfpsbit 8%
2212            \fi\fi\fi\fi\fi
2213            }%
2214 %    \end{macrocode}
2215 % End of changes
2216 %    \begin{macrocode}
2217        \@tempcntb \csname ftype@\@captype \endcsname
2218        \multiply \@tempcntb \@xxxii
2219        \advance \@tempcnta \@tempcntb
2220        \global \count\@currbox \@tempcnta
2221        }%
2222     \@fltovf
2223   \fi
2224   \global \setbox\@currbox
2225     \color@vbox
2226       \normalcolor
2227       \vbox \bgroup
2228         \hsize\columnwidth
2229         \@parboxrestore
2230         \@floatboxreset
2232 %    \end{macrocode}
2233 % \Finale
2235 \endinput