Typos from KB
[latex2e.git] / latex2e-20150101 / doc / latexchanges.tex
blob7d615497459c228ec4c851cacd0096a09f04f086
1 % \iffalse meta-comment
3 % Copyright 2015
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.
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
22 % information.
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.
28 % \fi
29 % Filename: latexchanges.tex
31 \NeedsTeXFormat{LaTeX2e}
33 \documentclass{ltxguide}
35 \title{Changes to the \LaTeXe{} format}
37 \author{\copyright~Copyright 2015, \LaTeX3 Project Team.\\
38 All rights reserved.}
40 \date{13 April 2015}
42 % a few commands from doc
43 \newcommand\Lpack[1]{\textsf{#1}}
44 \newcommand\DescribeMacro[1]{\texttt{\string#1}}
47 \begin{document}
49 \maketitle
51 \tableofcontents
53 \newpage
55 \section{Introduction}
57 This document describes changes that have been made to the \LaTeX\ format since the 2014/05/01 \LaTeX\ release.
58 %This document details all the changes to documented functions since the 2014/05/01 \LaTeX\ release.
60 As announced in \LaTeX\ News~22, the 2015 \LaTeX, release adopts a new
61 policy. Improvements and bug fixes will be made to the format sources,
62 with the \Lpack{latexrelease} package being available to revert
63 changes to use definitions from an earlier format.
66 \section{Changes between \LaTeX\ releases 2015/01/01 and 2015/01/01 Patch Level 1.}
67 This release re-introduces the ``Patch Level'' scheme for identifying
68 releases between main ``dated'' releases. Early \LaTeXe\ releases
69 included a mechanism whereby updates could be provided by a
70 \emph{patch
71 file}. This was mainly intended to allow updates to be made without
72 downloading the full sources again, which was an important
73 consideration with download speeds and costs at the time.
75 The new mechanism incorporates any changes directly into the sources,
76 but having the patch level identified in the banner allows the
77 \LaTeX\ release to be identified, even if (as in this case) most of the
78 changes do not affect the format but affect other base packages such
79 as \Lpack{latexrelease} and \Lpack{inputenc}. The patch level is shown
80 in the banner at the start of the job, but does not affect the date
81 handling of the |\IncludeInRelease| mechanism.
83 Apart from re-arranging the version banner, the only change in the
84 format is that |\newtoks| was accidentally defined twice, using the
85 old and new allocation scheme described in Section \ref{e@alloc}.
86 The old definition is now only in the \Lpack{latexrelease} package,
87 for use when emulating old formats.
92 \section
93 [Changes between \LaTeX\ releases 2014/05/01 and 2015/01/01]
94 {Changes between \LaTeX\ releases 2014/05/01 and 2015/01/01\footnote{Much of this text
95 is taken from \Lpack{fixltx2e} package which was formerly used to make such changes available separately.}}
97 \subsection{Support for \LaTeX\ version changes}
98 \DescribeMacro{\includeInRelease}\arg{date}\oarg{date}\arg{label}\arg{message}\arg{code}
100 \smallskip
102 The |\includeInRelease| command has been added to support backward and forward compatibility for the \LaTeX\ format. It supports the declaration of conditional code that can be loaded based on options given to the \Lpack{latexrelease} package. Its use is described in detail in the
103 \Lpack{latexrelease} package documentation.
105 \subsection{New Allocation Code\label{e@alloc}}
106 Previously |\newcount| and related commands were based on classic
107 TeX and only allocated in the range 0--255. This was extended (in
108 different ways) for e-\TeX\ in the |etex| package and in the
109 |xelatex.ini| and |lualatex.ini| files used in those
110 formats. Related to this the number of boxes allocated to store
111 floats was limited. This was extended to a certain extent in the
112 |morefloats| package (by xx and xx) but the new allocation
113 incorporates float allocation directly and supports much larger
114 float lists using the extended registers.
116 The new code allocates registers in the full extended range (
117 $2^{15}-1$ for etex and xelatex, $2^{16}-1$ for lualatex.
118 In addition a new command |\extrafloats| is provided, to be documented\ldots
120 \DescribeMacro{\extrafloats}\arg{number}
121 \smallskip
123 This allocates additional registers for the \LaTeX\ float system to
124 hold figures and tables etc. Similar functionality has been
125 available via the \Lpack{morefloats} package but this is a different
126 implementation using extended e-\TeX\ registers when available so
127 allows many more registers to be reserved for floats as they are
128 allocated from a pool of 32 or 64 thousand rather than 256 registers,
129 depending on the engine in use.
131 \DescribeMacro{\newmarks}\arg{command}
132 \smallskip
134 e-\TeX\ only, previously available via the \Lpack{etex} package.
135 Allocates commands to use the extended e-\TeX\ mark mechanism.
137 \DescribeMacro{\newXeTeXintercharclass}\arg{command}
138 \smallskip
140 Xe-\TeX\ only, previously in the Xe-\LaTeX\ format, but added via
141 |xelatex.ini| not part of the core release.
142 Allocates commands to use the xe-\TeX\ character class mechanism.
145 \subsection{e-\TeX\ tracing if available}
146 |\loggingall| (Usually used via |\tracingall|) is extended to enable
147 additional e-\TeX\ tracing if e-\TeX\ is available. (|\tracingall|
148 extension has been available as part of the |etex| package previously).
150 Also based on code from the |etex| package, a command |\tracingnone|
151 is added to reverse the effects of |\tracingall| and turn off all primitive
152 \TeX\ tracing. A new command |\hideoutput| has been added which resets the
153 tracing parameters set by |\showoutput|.
158 \subsection{\texttt{\textbackslash textsubscript} not defined in
159 latex.ltx (pr/3492)}
161 \begin{verbatim}
162 >>Number: 3492
163 >>Category: latex
164 >>Synopsis: \textsubscript not defined in latex.ltx
165 >>Arrival-Date: Tue Jan 14 23:01:00 CET 2003
166 >>Originator: Ionel Mugurel Ciobica
168 I use \textsubscript much more often than \textsuperscript, and
169 \textsubscript it is not defined in latex.ltx. Could you please
170 consider including the definition of \textsubscript in the latex.ltx
171 for the next versions of LaTeX. Thank you.
172 \end{verbatim}
174 \subsection{\texttt{\textbackslash @} discards spaces when moving
175 (pr/3039)}
177 \begin{verbatim}
178 >>Number: 3039
179 >>Category: latex
180 >>Synopsis: \@ discards spaces when moving
181 >>Arrival-Date: Sat May 22 09:01:06 1999
182 >>Originator: Donald Arseneau
183 >>Description:
184 The \@ command expands to \spacefactor\@m in auxiliary files,
185 which then ignores following spaces when it is reprocessed.
186 \end{verbatim}
188 \subsection{1-col fig can come before earlier 2-col fig
189 (pr/2346)}
191 \begin{verbatim}
192 >>Number: 2346
193 >>Category: latex
194 >>Synopsis: 2-col: 1-col fig can come before earlier 2-col fig
195 >>Arrival-Date: Wed Dec 18 15:41:07 1996
196 >>Originator: bil kleb
197 >>Description:
198 as documented in Lamport's book, p. 198, concerning figure
199 placement, "a figure will not be printed before an earlier
200 figure, and a table will not be printed before an earlier
201 table." however, there is a footnote stating, "However,
202 in two-column page style, a single-column figure can come before
203 an earlier double-column figure, and vice versa."
205 This twocolumn behavior is undesirable---at least by me and
206 most professional organizations i publish in. ed snyzter developed
207 a hack fix for 2.09 several years ago which links the two
208 counters, but i have not run across a similar "fix" for 2e...
209 \end{verbatim}
211 Originally fixed in package \Lpack{fix2col} which was merged into
212 this package. Documentation and code from this package have been
213 merged into this file.
215 \subsubsection{Notes on the Implementation Strategy}
217 The standard output routine maintains two lists of floats that have
218 been `deferred' for later consideration. One list for single column
219 floats, and one for double column floats (which are always
220 immediately put onto their deferred list). This mechanism means
221 that \LaTeX\ `knows' which type of float is contained in each box
222 by the list that it is processing, but having two lists means
223 that there is no mechanism for preserving the order between the
224 floats in each list.
226 The solution to this problem consists of two small changes to
227 the output routine.
229 Firstly, abandon the `double column float list' |\@dbldeferlist|
230 and change every command where it is used so that instead the
231 same |\@deferlist| is used as for single column floats.
232 That one change ensures that double and single column floats
233 stay in the same sequence, but as \LaTeX\ no longer `knows'
234 whether a float is double or single column, it will happily
235 insert a double float into a single column, overprinting the
236 other column, or the margin.
238 The second change is to provide an alternative mechanism for
239 recording the two column floats. \LaTeX\ already has a compact
240 mechanism for recording float information, an integer count register
241 assigned to each float records information about the `type' of float
242 `figure', `table' and the position information `htp' etc.
244 The type information is stored in the `high' bits, one bit position
245 (above `32') allocated to each float type. The `low' bits store
246 information about the allowed positions, one bit each allocated for
247 |h t b p|. In the \LaTeX2.09 system, the bit corresponding to `16'
248 formed a `boundary' between these two sets of information, and it
249 was never actually used by the system. Ed Sznyter's
250 \Lpack{fixfloats} package not unreasonably used this position to
251 store the double column information, setting the bit for double
252 column floats. Then at each point in the output routine at which a
253 float is committed to a certain region, an additional check must be
254 made to check that the float is (or is not) double column. If it
255 spans the wrong number of columns it is deferred rather than being
256 added.
258 Unfortunately the bit `16' is not available in \LaTeXe. It is used
259 to encode the extra float position possibility `|!|' that was added
260 in that system. It would be possible to use position `32' and to
261 move the flags for `table', `figure',\ldots\ up one position, to
262 start at 64, but this would mean that in principle one less float
263 type would be supported, and more importantly is likely to break
264 any other packages that assume anything about the output routine
265 internals. So here I instead use another mechanism for flagging
266 double column floats: By default all floats have depth 0pt.
267 This package arranges that double column ones have depth 1sp.
268 This information may then be used in the same manner as in
269 the \Lpack{fixfloats} package, to defer any floats that are not of
270 the correct column spanning type.
274 \subsection{Infinite glue found (pr/4023 and pr/2346)}
276 The fix for pr/2346 did not work as intended when used in conjunction
277 with |\enlargethispage| as the latter introduced an infinite negative
278 glue at the bottom of the page. That in turn make a |\vsplit|
279 operation to get at the column marks invalid.
281 \subsection{Wrong header for twocolumn (pr/2613)}
283 \begin{verbatim}
284 >>Number: 2613
285 >>Category: latex
286 >>Synopsis: wrong headline for twocolumn
287 >>Arrival-Date: Mon Sep 22 16:41:09 1997
288 >>Originator: Daniel Reischert
289 >>Description:
290 When setting the document in two columns
291 the headline shows the top mark of the second column,
292 but it should show the top mark of the first column.
293 \end{verbatim}
295 Originally fixed in package \Lpack{fix2col} which was merged into
296 this package. Documentation and code from this package have been
297 merged into this file.
299 \subsubsection{Notes on the Implementation Strategy}
301 The standard \LaTeX\ twocolumn system works internally by making
302 each column a separate `page' that is passed independently to \TeX's
303 page breaker. (Unlike say the \Lpack{multicol} package, where all
304 columns are gathered together and then split into columns later,
305 using |\vsplit|.) This means that the primitive \TeX\ marks that are
306 normally used for header information, are globally reset after the
307 first column. By default \LaTeX\ does nothing about this.
308 A good solution is provided by Piet van Oostrum (building on earlier
309 work of Joe Pallas) in his \Lpack{fixmarks} package.
311 After the first column box has been collected the mark information
312 for that box is saved, so that any |\firstmark| can be
313 `artificially' used to set the page-level marks after the second
314 column has been collected. (The second column |\firstmark| is not
315 normally required.) Unfortunately \TeX\ does not provide a direct
316 way of knowing if any marks are in the page, |\firstmark| always has a
317 value from previous pages, even if there is no mark in this page.
318 The solution is to make a copy of the box and then |\vsplit| it
319 so that any marks show up as |\splitfirstmark|.
321 The use of |\vsplit| does mean that the output routine will globally
322 change the value of |\splitfirstmark| and
323 |\splitbotmark|. The \Lpack{fixmarks} package goes to some trouble
324 to save and restore these values so that the output routine does
325 \emph{not} change the values. This part of \Lpack{fixmarks} is not
326 copied here as it is quite costly (having to be run on every page) and
327 there is no reason why anyone writing code using |\vsplit| should
328 allow the output routine to be triggered before the split marks have
329 been accessed.
333 \subsection{\texttt{\textbackslash setlength} produces error if
334 used with registers like \texttt{\textbackslash dimen0} (pr/3066)}
336 \begin{verbatim}
337 >>Number: 3066
338 >>Category: latex
339 >>Synopsis: \setlength{\dimen0}{10pt}
340 >>Arrival-Date: Tue Jul 6 15:01:06 1999
341 >>Originator: Heiko Oberdiek
342 >>Description:
343 The current implementation of \setlength causes an error,
344 because the length specification isn't terminated properly.
345 More safe:
346 \def\setlength#1#2{#1=#2\relax}
347 \end{verbatim}
349 \subsection{Fewer fragile commands}
351 \begin{verbatim}
352 >>Number: 3816
353 >>Category: latex
354 >>Synopsis: Argument of \@sect has an extra }.
355 >>Arrival-Date: Sat Oct 22 23:11:01 +0200 2005
356 >>Originator: Susanne Wunsch
358 Use of a \raisebox in \section{} produces the error message
359 mentioned in the subject.
361 PR latex/1738 described a similar problem, which has been solved
362 10 years ago. Protecting the \raisebox with \protect solved my
363 problem as well, but wouldn't it make sense to have a similar fix
364 as in the PR?
366 It is particularly confusing, that an unprotected \raisebox in a
367 \section*-environment works fine, while in a \section-environment
368 produces error.
369 \end{verbatim}
371 While not technically a bug, in this day and age there are few
372 reasons why commands taking optional arguments should not be robust.
374 \subsubsection{Notes on the implementation strategy}
376 Rather than changing the kernel macros to be robust, we have decided
377 to add the macro \DescribeMacro{\MakeRobust}|\MakeRobust| in
378 \Lpack{fixltx2e} so that users can easily turn fragile macros into
379 robust ones. A macro |\foo| is made robust by doing the simple
380 |\MakeRobust{\foo}|. \Lpack{fixltx2e} makes the following kernel
381 macros robust: |\(|, |\)|, |\[|, |\]|,
382 |\makebox|, |\savebox|,
383 |\framebox|, |\parbox|, |\rule| and |\raisebox|.
385 \ldots TODO \ldots fleqn vesion of |\[\]|
387 \subsection{\texttt{\textbackslash addpenalty} ruins flush-bottom (pr/3073)}
389 \begin{verbatim}
390 >>Number: 3073
391 >>Category: latex
392 >>Synopsis: \addpenalty ruins flush-bottom
393 >>Arrival-Date: Sat Jul 17 05:11:05 1999
394 >>Originator: Donald Arseneau
395 >>Description:
396 Just to keep in mind for further development eh?
397 A page break at an \addpenalty after \vspace does *not*
398 give a flush-bottom page. (The intent of \addpenalty is
399 apparently just to preserve the flush bottom by putting
400 the breakpoint `above' the skip.)
401 \end{verbatim}
403 \subsection{Within counters only reset next level down (pr4393)}
405 This is actually implicitly documented behavior in the \LaTeX{}
406 Manual that states that |\stepcounter| resets all counters marked
407 ``within''. However it means that if, for example, theorems are
408 numbered within sections and you start a new chapter in a book, the
409 section counter is reset to zero but the theorem counter is not
410 until the first section appears. Thus a theorem directly within the
411 chapter body (without a new section) would show an incremented
412 number relative to the last theorem of the previous chapter.
415 For this reason we are now resetting all levels of within in one go
416 even if that means that some of these resets may happen several times
417 unnecessarily.
420 \subsection{Check the optional arguments of floats}
422 By default LaTeX silently ignores unknown letters in the optional
423 arguments of floats. |\begin{figure}[tB]| the |B| is ignored so it
424 acts like |\begin{figure}[t]| However |\begin{figure}[B]| does
425 \emph{not} act like |\begin{figure}[]| as the check for an empty
426 argument, or unsupplied argument, is earlier. |[]| causes the
427 default float placement to be used, but |[B]| means that \emph{no}
428 float area is allowed and so the float will not be placed until the
429 next |\clearpage| or end of document, no warning is given.
431 This package adds a check on each letter, and if it not one of
432 |!tbhp| then an error is given and the code acts as if |p| had been
433 used, so that the float may be placed somewhere.
435 \subsection{\texttt{\textbackslash DeclareMathSizes} only take pts.
436 (pr/3693)}
438 \begin{verbatim}
439 >>Number: 3693
440 >>Category: latex
441 >>Synopsis: \DeclareMathSizes only take pts.
442 >>Arrival-Date: Fri Jun 11 16:21:00 CEST 2004
443 >>Originator: Morten Hoegholm
445 The last three arguments of \@DeclareMathSizes cannot take a dimension
446 as argument, making it inconsistent with the rest of the font changing
447 commands and itself, as the second argument can take a dimension
448 specification.
449 \end{verbatim}
451 \subsection{No hyphenation in first word after float environment (pr/3498)}
453 \begin{verbatim}
454 >>Number: 3498
455 >>Category: latex
456 >>Synopsis: No hyphenation in first word after float environment
457 >>Arrival-Date: Thu Jan 30 13:21:00 CET 2003
458 >>Originator: Harald Harders
460 If a float environment (figure, table) is written within a paragraph,
461 the first word after the environment is not hyphenated.
462 \end{verbatim}
464 \subsection{\texttt{\textbackslash fnsymbol} should use text symbols
465 (pr/3400)}
467 \begin{verbatim}
468 >>Number: 3400
469 >>Category: latex
470 >>Synopsis: \fnsymbol should use text symbols if possible
471 >>Arrival-Date: Fri Jan 04 20:41:00 CET 2002
472 >>Originator: Walter Schmidt
474 The \fnsymbol command can be used in both text and math
475 mode. The symbols produced are, however, always taken from
476 the math fonts. As a result, they may not match the text
477 fonts, even if the symbols are actually available, for
478 instance from the TS1 encoding. Since \fnsymbol is
479 primarily used for footnotes in text, this should be fixed,
480 IMO.
481 \end{verbatim}
487 \subsection{\texttt{\textbackslash footnotemark[x]} crashes with fixltx2e.sty
488 (pr/3752)}
490 \begin{verbatim}
491 >>Number: 3752
492 >>Category: tools
493 >>Synopsis: feature \footnotemark[x] crashes with fixltx2e.sty
494 >>Arrival-Date: Fri Dec 17 10:11:00 +0100 2004
495 >>Originator: Stefan Pofahl
497 If I use /fnsymbol together with fixltx2e.sty I can not use
498 optional parameter [num]
499 \footnotemark[1] is not showing the mark number 1 but
500 the mark \value{footnote}.
501 \end{verbatim}
502 This bug was related to pr/3400, where |\@fnsymbol| was made robust.
504 \subsubsection{Notes on the implementation strategy}
506 Pr/3400 made |\@fnsymbol| decide between text-mode and math-mode,
507 which requires a certain level of robustness somewhere as the
508 decision between text and math must be made at typesetting time and
509 not when inside |\protected@edef| or similar commands. One way of
510 dealing with this is to make sure the value seen by |\@fnsymbol| is
511 a fully expanded number, which could be handled by code such as
512 \begin{verbatim}
513 \def\fnsymbol#1{\expandafter\@fnsymbol
514 \expandafter{\the\csname c@#1\endcsname}}
515 \end{verbatim}
516 This would be a good solution if everybody used the high level
517 commands only by writing code like |\fnsymbol{footnote}|. Unfortunately
518 many classes (including the standard classes) and packages use the
519 internal forms directly as in |\@fnsymbol\c@footnote| so the easy
520 solution of changing |\fnsymbol| would break code that had worked for
521 the past 20~years.
523 Therefore the implementation here makes |\@fnsymbol| itself a
524 non-robust command again and instead uses a new robust command
525 \DescribeMacro{\TextOrMath}|\TextOrMath|, which will take care of
526 typesetting either the math or the text symbol. In order to do so,
527 we face an age old problem and unsolvable problem in \TeX: A
528 reliable test for math mode that doesn't destroy
529 kerning. Fortunately this problem can be solved when using e\TeX\ so
530 if you use this as engine for your \LaTeX\ format, as recommended by
531 the \LaTeX3 Project, you will get a fully functioning |\TextOrMath|
532 command with no side effects. If you use regular \TeX\ as engine for
533 your \LaTeX\ format then we have to choose between the lesser of two
534 evils: 1)~breaking ligatures and preventing kerning or 2)~face the
535 risk of choosing text-mode at the beginning of an alignment cell,
536 which was supposed to be math-mode. We have decided upon 1) as is
537 customary for regular robust commands in \LaTeX.
541 \end{document}