Debian Codegraph @

texmf-dist/doc/latex/base/ltnews32.tex

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2019-2025
4 % The LaTeX 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 % https://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2008 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
29 % Filename: ltnews32.tex
30 %
31 % This is issue 32 of LaTeX News.
32
33 \NeedsTeXFormat{LaTeX2e}[2020-02-02]
34
35 \documentclass{ltnews}
36 \usepackage[T1]{fontenc}
37
38 \usepackage{lmodern,url,hologo}
39
40 \usepackage{csquotes}
41 \usepackage{multicol}
42
43 \providecommand\meta[1]{$\langle$\textrm{\itshape#1}$\rangle$}
44 \providecommand\option[1]{\texttt{#1}}
45 \providecommand\env[1]{\texttt{#1}}
46 \providecommand\file[1]{\texttt{#1}}
47 \providecommand\Arg[1]{\texttt\{\meta{#1}\texttt\}}
48
49
50 \providecommand\eTeX{\hologo{eTeX}}
51 \providecommand\XeTeX{\hologo{XeTeX}}
52 \providecommand\LuaTeX{\hologo{LuaTeX}}
53 \providecommand\pdfTeX{\hologo{pdfTeX}}
54 \providecommand\MiKTeX{\hologo{MiKTeX}}
55 \providecommand\CTAN{\textsc{ctan}}
56 \providecommand\TL{\TeX\,Live}
57 \providecommand\githubissue[2][]{\ifhmode\unskip\fi
58 \quad\penalty500\strut\nobreak\hfill
59 \mbox{\small\slshape(%
60 \href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}%
61 {github issue#1 #2}%
62 )}%
63 \par\smallskip}
64
65 % simple solution right now (just link to the first issue if there are more)
66 \def\getfirstgithubissue#1 #2\relax{#1}
67
68 \providecommand\sxissue[1]{\ifhmode\unskip\fi
69 \quad\penalty500\strut\nobreak\hfill
70 \mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par}
71
72 \providecommand\gnatsissue[2]{\ifhmode\unskip\fi
73 \quad\penalty500\strut\nobreak\hfill
74 \mbox{\small\slshape(%
75 \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F#2}%
76 {gnats issue #1/#2}%
77 )}%
78 \par}
79
80 \let\cls\pkg
81 \providecommand\env[1]{\texttt{#1}}
82
83 \vbadness=1400 % accept slightly empty columns
84
85
86 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87 \providecommand\tubcommand[1]{}
88 \tubcommand{\input{tubltmac}}
89
90 \publicationmonth{October}
91 \publicationyear{2020}
92
93 \publicationissue{32}
94
95 \begin{document}
96
97 \tubcommand{\addtolength\textheight{4.2pc}} % only for TUB
98
99 \maketitle
100 {\hyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000 \tableofcontents}
101
102 \setlength\rightskip{0pt plus 3em}
103
104
105 \medskip
106
107
108 \section{Introduction}
109
110 The 2020-10-01 release of \LaTeX{} shows that work on improving
111 \LaTeX{} has again intensified. The two most important new features
112 are the kernel support for \pkg{xparse} and the introduction of the
113 new hook management system for \LaTeX{}, but as you can see there are
114 many smaller enhancements and bug fixes added to the kernel and
115 various packages.
116
117
118
119 \section{Providing \pkg{xparse} in the format}
120
121 The official interface in the \LaTeXe{} kernel for creating
122 document-level commands has always been \cs{newcommand}. This was a
123 big step forward from \LaTeX~2.09. However, it was still very limited
124 in the types of command it can create: those taking at most one
125 optional argument in square brackets, then zero or more mandatory
126 arguments. Richer syntaxes required use of the \TeX{} \cs{def}
127 primitive along with appropriate low-level macro programming.
128
129 The \LaTeX{} team started work on a comprehensive document-command
130 parser, \pkg{xparse}, in the late 1990s. In the past decade, the
131 experimental ideas it provides have been carefully worked through and
132 moved to a stable footing. As such, \pkg{xparse} is now used to define
133 a very large number of document and package commands. It does this by
134 providing a rich and self-consistent syntax to describe a wide range of
135 interfaces seen in \LaTeX{} packages.
136
137 The ideas developed in \pkg{xparse} are now sufficiently well tested
138 that the majority can be transferred into the \LaTeX{} kernel. Thus
139 the following commands have been added
140 \begin{itemize}
141 \item \cs{NewDocumentCommand}, \cs{RenewDocumentCommand},
142 \cs{ProvideDocumentCommand}, \cs{DeclareDocumentCommand}
143 \item \cs{NewExpandableDocumentCommand}, \cs{RenewExpandableDocumentCommand},
144 \cs{ProvideExpandableDocumentCommand}, \cs{DeclareExpandableDocumentCommand}
145 \item \cs{NewDocumentEnvironment}, \cs{RenewDocumentEnvironment},
146 \cs{ProvideDocumentEnvironment}, \cs{DeclareDocumentEnvironment}
147 \item \cs{BooleanTrue} \cs{BooleanFalse}
148 \item \cs{IfBooleanTF}, \cs{IfBooleanT}, \cs{IfBooleanF}
149 \item \cs{IfNoValueTF}, \cs{IfNoValueT}, \cs{IfNoValueF}
150 \item \cs{IfValueTF}, \cs{IfValueT}, \cs{IfValueF}
151 \item \cs{SplitArgument}, \cs{SplitList}, \cs{TrimSpaces},
152 \cs{ProcessList}, \cs{ReverseBoolean}
153 \item \cs{GetDocumentCommandArgSpec}
154 \cs{GetDocumentEnvironmentArgSpec}
155 \end{itemize}
156
157 Most, but not all, of the argument types defined by \pkg{xparse} are
158 now supported at the kernel level. In particular, the types
159 \texttt{g}/\texttt{G}, \texttt{l} and \texttt{u} are \emph{not} provided by
160 the kernel code; these are deprecated but still available by
161 explicitly loading \pkg{xparse}. All other argument types \emph{are}
162 now available directly within the \LaTeXe{} kernel.
163
164
165
166
167
168
169 \section{A hook management system for \LaTeX{}}
170
171 With the fall 2020 release of \LaTeX{} we provide a general hook
172 management system for the kernel and for packages. This will allow
173 packages to safely add code to various kernel and package hooks and if
174 necessary define rules to reorder the code in the hooks to resolve
175 typical package loading order issues. This hook system is written in
176 the L3 programming layer and thus forms the first larger application
177 within the kernel that makes use of the \LaTeX3 functionality now
178 available (if we discount \pkg{xparse} which has already been available for
179 a long time as a separate package).
180
181 The file \file{lthooks.dtx} holds the core management code for hooks
182 and defines basic hooks for environments (as previously offered by
183 \pkg{etoolbox}), \file{ltshipout.dtx} provides kernel hooks into the
184 shipout process (making packages like \pkg{atbegshi},
185 etc., unnecessary) and the file \file{ltfilehook.dtx} holds
186 redefinitions for commands like \cs{input} or \cs{usepackage} so that
187 they offer hooks in a similar fashion to what is provided by the
188 \pkg{filehook} package.
189
190 At the moment the integration is lightweight, overwriting definitions
191 made earlier during format generation (though this will change after
192 more thorough testing). For that reason the documentation isn't in its
193 final form either and you have to read through three different
194 documents:
195 \begin{description}
196 \item[\file{lthooks-doc.pdf}] Core management interface and basic
197 hooks for environments provided by the kernel.
198
199 \item[\file{ltshipout-doc.pdf}] Hooks accessible while a page is
200 being shipped out.
201
202 \item[\file{ltfilehook-doc.pdf}] Hooks used when reading a file.
203 \end{description}
204 For those who wish to also study the code, replace \texttt{-doc} with
205 \texttt{-code}, e.g., \file{lthooks-code.pdf}. All documents should
206 be accessible via \texttt{texdoc}, e.g.,
207 \begin{verbatim}
208 texdoc lthooks-doc
209 \end{verbatim}
210 should open the core documentation for you.
211
212
213
214 \section{Other changes to the \LaTeX{} kernel}
215
216
217 \subsection{\cs{symbol} in math mode for large Unicode values}
218
219 The \LaTeXe{} kernel defines the command \cs{symbol}, which allows
220 characters to be typeset by entering their `slot number'. With the
221 \LuaTeX{} and \XeTeX{} engines, these slot numbers can extend to very
222 large values to accommodate Unicode characters in the upper Unicode
223 planes (e.g., bold mathematical capital A is slot number
224 \texttt{"1D400} in hex or \texttt{119808} in decimal). The \XeTeX{}
225 engine did not allow \cs{symbol} in math mode for values above
226 $2^{16}$; this limitation has now been lifted.
227 %
228 \githubissue{124}
229
230
231 \subsection{Correct Unicode value of \cs{=y} (\=y)}
232
233 The Unicode slot for \=y was incorrectly pointing to the slot for
234 \=Y. This has been corrected.
235 %
236 \githubissue{326}
237
238 \subsection{Add support for Unicode soft hyphens}
239
240 For a long time, the UTF-8 option for \pkg{inputenc} made the Unicode
241 soft hyphen character (U+00AD) an alias for the \LaTeX\ soft hyphen
242 \cs{-}. The Unicode engines \XeTeX{} and \LuaTeX{} behaved
243 differently though: They either ignored U+00AD or interpreted it as an
244 unconditional hyphen. This inconsistency is fixed now and \LaTeX{}
245 always treats U+00AD as \cs{-}.
246 %
247 \githubissue{323}
248
249
250
251 \subsection{Fix capital accents in Unicode engines}
252
253 In Unicode engines the capital accents such as \cs{capitalcedilla},
254 etc., have been implemented as trivial shorthands for the normal
255 accents (because other than Computer Modern virtually no fonts support
256 them), but that failed when \pkg{hyperref} got loaded. This has been
257 corrected.
258 %
259 \githubissue{332}
260
261
262
263 \subsection{Support \pkg{calc} in various kernel commands}
264
265 The \cs{hspace}, \cs{vspace}, \cs{addvspace}, \cs{\textbackslash} and
266 other commands simply passed their argument to a \TeX{} primitive to
267 produce the necessary space. As a result it was impossible to specify
268 anything other than a simple dimension value in such arguments. This
269 has been changed, so that now \pkg{calc} syntax is also supported with
270 these commands.
271 %
272 \githubissue{152}
273
274 \subsection{Support \eTeX\ length expressions in \env{picture} coordinates}
275
276 Picture mode coordinates specified with \texttt{(\_,\_)} previously
277 accepted multiples of \cs{unitlength}. They now also allow \eTeX\ length
278 expressions (as used by the \cs{glueexpr} primitive although all uses
279 in \env{picture} mode are non-stretchy).
280
281 So, valid uses include \verb|\put(2,2)| as previously,
282 but now also uses such as\tubcommand\\ \verb|\put(\textwidth-5cm,0.4\textheight)|.
283
284 Note that you can only use expressions with lengths; \verb|\put(1+2,0)| is not
285 supported.
286
287
288 \subsection{Spaces in filenames of included files}
289
290 File names containing spaces lead to unexpected results when used in
291 the commands \cs{include} and \cs{includeonly}. This has now been
292 fixed and the argument to \cs{include} can contain a file name
293 containing spaces. Leading or trailing spaces will be stripped off
294 but spaces within the file name are kept. The argument to
295 \cs{includeonly}, which is a comma-separated list of files to process,
296 can also contain spaces with any leading and trailing spaces stripped
297 from the individual filenames while spaces \emph{in} the file
298 names will remain intact.
299 %
300 \githubissue[s]{217 and 218}
301
302
303 \subsection{Avoid extra line in \cs{centering}, \cs{raggedleft} or \cs{raggedright}}
304
305 If we aren't justifying paragraphs then a very long word (longer than a
306 line) could result in an unnecessary extra line in order to prevent a
307 hyphen in the second-last line of the paragraph. This is now avoided
308 by setting \cs{finalhyphendemerits} to zero in unjustified settings.
309 %
310 \githubissue{247}
311
312 \subsection{Set a non-zero \cs{baselineskip} in text scripts}
313
314 As \cs{textsuperscript} and \cs{textsubscript} usually contain only a
315 few characters on a single line the \cs{baselineskip} was set to
316 zero. However, \pkg{hyperref} uses that value to determine the height
317 of a link box which consequently came out far too small. This has
318 been adjusted.
319 %
320 \githubissue{249}
321
322 \subsection{Spacing issues when using \cs{linethickness}}
323
324 In some circumstances the use of \cs{linethickness} introduced a
325 spurious space that shifted objects in a \env{picture} environment
326 to the right. This has been corrected.
327 %
328 \githubissue{274}
329
330
331 \subsection{Better support for the legacy series default interface}
332
333 In the initial implementation of \LaTeX's font selection scheme (NFSS)
334 changes to any default were carried out by redefining some
335 commands, e.g., \cs{seriesdefault}. In 2019 we introduced various
336 extensions and with it new methods of customizing certain parts of
337 NFSS, e.g., the recommended way for changing the series default(s) is
338 now through \cs{DeclareFontSeriesDefault}~\cite{32:ltnews31}. In this
339 release we improved the support for legacy documents using the old
340 method to cover additional edge cases.
341 %
342 \githubissue[s]{306 and 315}
343
344
345 \subsection{Support for uncommon font series defaults}
346
347 If a font family was set up with fairly unusual font series defaults,
348 e.g.,
349 \begin{verbatim}
350 \renewcommand\ttdefault{lmvtt}
351 \DeclareFontSeriesDefault[tt]{md}{lm}
352 \DeclareFontSeriesDefault[tt]{bf}{bm}
353 \end{verbatim}
354 then a switch between the main document families, e.g.,
355 \verb=\ttfamily...\rmfamily= did not always correctly continue
356 typesetting in medium or bold series if that involved adjusting the
357 values used by \verb=\mdseries= or \verb=\bfseries=. This has now
358 been corrected.
359 %
360 \githubissue{291}
361
362 \tubcommand{\vspace*{-6pt}\break}
363
364 \subsection{Checking the current font series context}
365
366 Sometimes it is necessary to define commands that act differently when
367 used in bold context (e.g., inside \cs{textbf}). Now that it is
368 possible in \LaTeX{} to specify different \enquote{\texttt{bf}}
369 defaults based for each of the three metafamilies (\texttt{rm},
370 \texttt{sf} and \texttt{tt}) via \cs{DeclareFontSeriesDefault}, it is
371 no longer easy to answer the question \enquote{am I typesetting in
372 a bold context?}. To help with this problem a new command was provided:
373 \begin{quote}
374 \cs{IfFontSeriesContextTF}\Arg{context}\\
375 \hspace*{4em} \Arg{true code}\Arg{false code}
376 \end{quote}
377 The \meta{context} can be either \texttt{bf} (bold) or \texttt{md}
378 (medium) and depending on whether or not the current font is
379 recognized as being selected through \cs{bfseries} or \cs{mdseries}
380 the \meta{true code} or \meta{false code} is executed.
381 As an example
382 \begin{verbatim}
383 \usepackage{bm} % (bold math)
384 \newcommand\vbeta{\IfFontSeriesContextTF{bf}%
385 {\ensuremath{\bm{\beta}}}%
386 {\ensuremath{\beta}}}
387 \end{verbatim}
388 This way you can write \cs{vbeta}\texttt{-isotopes} and if used in a
389 heading it comes out in a bolder version.
390 %
391 \githubissue{336}
392
393
394 \subsection{Avoid spurious package option warning}
395
396 When a package is loaded with a number of options, say \texttt{X},
397 \texttt{Y} and \texttt{Z}, and then later another loading attempt was
398 made with a subset of the options or no options, it was possible
399 to get an error message that option \texttt{X} is not known to the
400 package. This obviously incorrect error was due to a timing issue
401 where the list of available options got lost prematurely. This has now
402 been fixed.
403 %
404 \githubissue{22}
405
406
407 \subsection{Adjusting \option{fleqn}}
408
409 In \pkg{amsmath} the \cs{mathindent} parameter used with the
410 \option{fleqn} design is a rubber length parameter allowing for setting
411 it to a value such as \texttt{1em minus 1em}, i.e., so that the normal
412 indentation can be reduced in case of very wide math displays.
413 This is now also supported by the \LaTeX{} standard classes.
414
415 In addition a compressible space between formula and equation number
416 in the \env{equation} environment got added when the \option{fleqn}
417 option is used so that a very wide formula doesn't bump into the
418 equation number.
419 %
420 \githubissue{252}
421
422
423 \subsection{Provide \cs{clap}}
424
425 \LaTeX{} has inherited \cs{llap} and \cs{rlap} from plain \TeX{}
426 (zero-sized boxes whose content sticks out to the left or right,
427 respectively) but there isn't a corresponding \cs{clap} command that
428 centers the material. This missing command was added by several
429 packages, e.g., \pkg{mathtools}, and has now been added to the
430 kernel.
431
432 \subsection{Fix to legacy math alphabet interface}
433
434 When using the \LaTeX{}~2.09 legacy math alphabet interface, e.g.,
435 \verb=$\sf -1$= instead of \verb=$\mathsf{-1}$=, an extra math Ord atom
436 was added to the formula in case the math alphabet was used for the first
437 time. In some cases this math atom would change the spacing, e.g.,
438 change the unary minus sign into a binary minus in the above example. This
439 has finally been fixed.
440 %
441 \gnatsissue{latex}{3357}
442
443
444
445 \subsection{Added tests for format, package and class dates}
446
447 To implement compatibility code or to ensure that certain features are
448 available it is helpful and often necessary to check the date of the
449 format or that of a package or class and execute different code based
450 on the result. For that, \LaTeX\ previously had only internal commands
451 (\cs{@ifpackagelater} and \cs{@ifclasslater}) for testing package or
452 class names, but nothing reasonable for testing the format date. For the
453 latter one had to resort to some obscure command \cs{@ifl@t@r} that,
454 given its cryptic name, was clearly never intended for use even in
455 package or class code. Furthermore, even the existing interface
456 commands were defective as they are testing for \enquote{equal or
457 later} and not for \enquote{later} as their names indicate.
458
459 We have therefore introduced three new CamelCase commands as the
460 official interface for such tests
461 \begin{quote}
462 \cs{IfFormatAtLeastTF}\Arg{date}\\
463 \hspace*{4em} \Arg{true code}\Arg{false code}
464 \end{quote}
465 and for package and class tests
466 \begin{quote}
467 \cs{IfClassAtLeastTF}\Arg{class name}\Arg{date}\\
468 \hspace*{4em} \Arg{true code}\Arg{false code} \\
469 \cs{IfPackageAtLeastTF}\Arg{package~name}\Arg{date}\\
470 \hspace*{4em} \Arg{true code}\Arg{false code}
471 \end{quote}
472 For compatibility reasons the legacy commands remain available, but we
473 suggest to replace them over time and use the new interfaces in new
474 code.
475 %
476 \githubissue{186}
477
478
479 \subsection{Avoid problematic spaces after \cs{verb}}
480
481 If a user typed \verb*=\verb !~! foo= instead of
482 \verb*=\verb!~! foo= by mistake, then surprisingly the result was
483 ``\verb=!~!=foo'' without any warning or error.
484 %
485 What happened was that the
486 \verb*= = became the argument delimiter due to the rather complex
487 processing done by \cs{verb} to render verbatim. This has been
488 fixed and spaces directly following the command \cs{verb} or \cs{verb*}
489 are now ignored as elsewhere.
490 %
491 \githubissue{327}
492
493
494 \subsection{Provide a way to copy robust commands\ldots}
495
496 With the previous \LaTeXe{} release, several user-level commands were
497 made robust, so the need for a way to create copies of these commands
498 (often to redefine them) increased, and the \LaTeXe{} kernel didn't have
499 a way to do so. Previously this functionality was provided in part by
500 Heiko Oberdiek's \pkg{letltxmacro} package, which allows a robust
501 command \verb=\foo= to be copied to \verb=\bar= with
502 \verb=\LetLtxMacro\bar\foo=.
503
504 From this release onwards, the \LaTeXe{} kernel provides
505 \cs{NewCommandCopy} (and \verb=\Renew...= and \verb=\Declare...=
506 variants) which functions almost like
507 \verb=\LetLtxMacro=. To the end user, both should work the same way,
508 and one shouldn't need to worry about the definition of the command:
509 \cs{NewCommandCopy} should do the hard work.
510
511 \cs{NewCommandCopy} knows about the different types of definitions from
512 the \LaTeXe{} kernel, and also from other packages, such as
513 \pkg{xparse}'s command declarations like \cs{NewDocumentCommand}, and
514 \pkg{etoolbox}'s \cs{newrobustcmd}, and it can be extended to cover
515 further packages.
516 %
517 \githubissue{239}
518
519
520 \subsection{\ldots\ and a way to \cs{show} them}
521
522 It is sometimes necessary to look up the definition of a command, and often
523 one not only doesn't know where that command is defined, but doesn't
524 know if it gets redefined by some package, so often enough looking at
525 the source doesn't help. The typical way around this problem is to use
526 \TeX's \cs{show} primitive to look at the definition of a command, which
527 works fine until the command being \cs{show}n is robust. With
528 \verb=\show\frac= one sees
529 \begin{verbatim}
530 >> \frac=macro:
531 ->>\protect \frac .
532 \end{verbatim}
533 which is not very helpful. To show the actual command the user needed to
534 notice that the real definition of \cs{frac} is in the \verb*=\frac = %*
535 macro and do \verb=\expandafter\show\csname frac\space\endcsname=.
536
537 But with the machinery for copying robust commands in place it is
538 already possible to examine a command and detect (as far as a macro
539 expansion language allows) how it was defined. \cs{ShowCommand} knows
540 that and with \verb=\ShowCommand\frac= the terminal will show
541 \begin{verbatim}
542 >> \frac=robust macro:
543 ->>\protect \frac .
544
545 >> \frac =\long macro:
546 #1#2->>{\begingroup #1\endgroup \over #2}.
547 \end{verbatim}
548 %
549 \githubissue{373}
550
551 \subsection{Merge \pkg{l3docstrip} into \pkg{docstrip}}
552
553 The file \pkg{l3docstrip.tex} offered a small extension over the
554 original \pkg{docstrip.tex} file supporting the
555 \texttt{\%\string<@@=\meta{module}\string>} syntax of \pkg{expl3}.
556 This has been merged into \pkg{docstrip} so that it can now be
557 used for both traditional \texttt{.dtx} files and those containing
558 code written in the L3 programming layer language.
559 %
560 \githubissue{337}
561
562
563 \subsection{Support vertical typesetting with \pkg{doc}}
564
565 The \env{macrocode} environment uses a \env{trivlist} internally
566 and as part of this sets up the \cs{@labels} box to contain some
567 horizontal skips, but that box is never used. As a result this
568 generates an issue in some circumstances if the typesetting direction
569 is vertical. This has now been corrected to support such use cases as
570 well.
571 %
572 \githubissue{344}
573
574
575 \subsection{Record the counter name stepped by \cs{refstepcounter}}
576
577 \cs{refstepcounter} now stores the name of the counter in \cs{@currentcounter}.
578 This allows packages like \pkg{zref} and \pkg{hyperref} to store the name without
579 having to patch \cs{refstepcounter}.
580 %
581 \githubissue{300}
582
583
584 \subsection{Native Lua\TeX\ behavior for \cs{-}}
585
586 \LaTeX\ changes \cs{-} to add a discretionary hyphen even if \cs{hyphenchar}
587 is set to $-1$. This change is not necessary under Lua\TeX\ because there
588 \cs{-} is not affected by \cs{hyphenchar} in the first place. Therefore this
589 behavior has been changed to ensure that Lua\TeX's (language specific)
590 hyphenation characters are respected by \cs{-}.
591
592
593
594 \subsection{Allow \cs{par} commands inside \cs{typeout}}
595
596 \cs{typeout} used to choke when seeing an empty line or a \cs{par}
597 command in its argument. However, sometimes it is used to display
598 arbitrary user input or code (wrapped, for example, in
599 \cs{unexpanded}) which may contain explicit \cs{par} commands. This is
600 now allowed.
601 %
602 \githubissue{335}
603
604 \subsection{Spacing commands moved from \pkg{amsmath} to the kernel}
605 Originally \LaTeX{} only provided a small set of spacing commands
606 for use in text and math; some of the commands like \cs{;} were
607 only supported in math mode. \pkg{amsmath} normalized and
608 provided all of them in text and math. This code has now been
609 moved to the kernel so that it is generally available.
610 \begin{center}
611 \begin{tabular}{lll}
612 command name(s) & math & text\\\hline
613 \cs{,} \cs{thinspace} & $x\,x$ & x\,x\\
614 \cs{!} \cs{negthinspace} \; & $x\!x$ & x\!x\\
615 \cs{:} \cs{>} \cs{medspace} & $x\:x$ & x\:x\\
616 \cs{negmedspace} & $x\negmedspace x$ & x\negmedspace x\\
617 \cs{;} \cs{thickspace} & $x\;x$ & x\;x\\
618 \cs{negthickspace} & $x\negthickspace x$ & x\negthickspace x\\
619 \end{tabular}
620 \end{center}
621 %
622 \githubissue{303}
623
624
625 \subsection{Access raw glyphs in \LuaTeX\ without reloading fonts}
626
627 \LaTeX's definitions for \cs{textquotesingle},\tubcommand\\ \cs{textasciigrave}, and
628 \cs{textquotedbl} for the TU encoding in \LuaTeX\ need special handling to
629 stop the shaper from replacing these characters with curly quotes.
630 This used to be done by reloading the current font without the \texttt{tlig}
631 feature, but that came with multiple disadvantages: It behaves differently
632 than the corresponding \XeTeX\ code and it is not very efficient.
633 This code has now been replaced with an implementation which injects a
634 protected glyph node which is not affected by font shaping.
635 %
636 \githubissue{165}
637
638
639 \subsection{Added a fourth empty argument to \cs{contentsline}}
640
641 \LaTeX's \cs{addcontentsline} writes a \cs{contentsline}
642 command with three arguments to the \texttt{.toc} and similar files.
643 \pkg{hyperref} redefines \cs{addcontentsline} to write
644 a fourth argument. The change unifies the number of arguments
645 by writing an additional empty brace group.
646 %
647 \githubissue{370}
648
649
650 \subsection{Lua\TeX\ callback \texttt{new\_graf} made \texttt{exclusive}}
651
652 Corrected an incorrect callback type which caused return values from the
653 \texttt{new\_graf} callback to be ignored and paragraph indentation to be
654 suppressed. In the new version, only one \texttt{new\_graf} callback handler
655 can be active at a time, which allows this handler to take full control of
656 paragraph indentation.
657 %
658 \githubissue{188}
659
660
661
662
663
664 \section{Changes to packages in the \pkg{graphics} category}
665
666 \subsection{Generate a warning if existing color definition is changed}
667
668 If a color is defined twice using \cs{DefineNamedColor}, no
669 info text \texttt{Redefining color ...\ in named color model ...}\ was written
670 to the log file, because of a typo in the check. This has been corrected.
671 %
672 \gnatsissue{graphics}{3635}
673
674 \subsection{Specifying viewport in the \pkg{graphics} package}
675 Specifying a BoundingBox does not really have meaning when including non-EPS graphics in
676 \pdfTeX\ and \LuaTeX. For some years the \pkg{graphicx} package
677 \texttt{bb} key has been interpreted (with a warning) as a
678 \texttt{viewport} key. This feature has been added to the two-argument
679 form of \verb|\includegraphics|, which is mostly used in the
680 \pkg{\mbox{graphics}} package. \verb|\includegraphics[1,2][3,4]{file}| will
681 now be interpreted in \pdfTeX\ and \LuaTeX\ in the same way as
682 \pkg{\mbox{graphicx}}'s\tubcommand\\
683 \verb|\includegraphics[viewport=1 2 3 4]{file}|.
684
685 \subsection{Normalizing \cs{endlinechar}}
686 If \cs{endlinechar} is set to $-1$ so that ends of lines are ignored
687 in special contexts, then a low level \TeX\ error would be generated
688 by code parsing BoundingBox comments. The package now locally sets
689 \cs{endlinechar} to its standard value while reading files.
690 %
691 \githubissue{286}
692
693 \subsection{Files with multiple parts}
694 Sometimes one has a graphics file, say, \file{file.svg}, and converts
695 it to another format to include it in \LaTeX{} and ends up with a file
696 named \file{file.svg.png}. In previous releases, if the user did
697 \verb|\includegraphics{file.svg}|, an error would be raised and the
698 graphics inclusion would fail due to the unknown \verb|.svg| extension.
699 The \pkg{graphics} package now checks if the given extension is known, and if
700 it doesn't, it tries appending the known extensions until it finds a
701 graphics file with a valid extension, otherwise it falls back to the
702 file as requested.
703 %
704 \githubissue{355}
705
706
707 \section{Changes to packages in the \pkg{tools} category}
708
709 \subsection{\pkg{array}: Support stretchable glue in \texttt{w}-columns}
710
711 If stretchable glue, e.g., \cs{dotfill}, is used in \env{tabular}
712 columns made with the \pkg{array} package, it stretches as it would in
713 normal paragraph text. The one exception was \texttt{w}-columns (but
714 not \texttt{W}-columns) where it got forced to its nominal width (which
715 in case of \cs{hfill} or \cs{dotfill} is 0\,pt). This has been
716 corrected and now \texttt{w}-columns behave like all other column
717 types in this respect.
718 %
719 \githubissue{270}
720
721 \subsection{\pkg{array}: Use math mode for \texttt{w} and
722 \texttt{W}-cells in \env{array}}
723
724 The \texttt{w} and \texttt{W}-columns are LR-columns very similar to
725 \texttt{l}, \texttt{c} and \texttt{r}. It is therefore natural to
726 expect their cell content to be typeset in math mode instead of text
727 mode if they are used in an \env{array} environment. This has now
728 been adjusted. Note that this is a breaking change in version v2.5!
729 If you have used \texttt{w} or \texttt{W}-columns in older documents
730 either add \texttt{\detokenize{>{$}...<{$}}} for such columns or
731 remove the \texttt{\$} signs in the cells. Alternatively, you can roll
732 back to the old version by loading \pkg{array} with
733 \begin{verbatim}
734 \usepackage{array}[=v2.4]
735 \end{verbatim}
736 in such documents.
737 %
738 \githubissue{297}
739
740 \subsection{\pkg{array}: Fix for \cs{firsthline} and \cs{lasthline}}
741
742 Replacing \cs{hline} with \cs{firsthline} or \cs{lasthline} could lead
743 in some cases to an increase of the tabular width. This has now been
744 corrected.
745 %
746 \githubissue{322}
747
748 \subsection{\pkg{varioref}: Support Japanese as a language option}
749
750 The package now recognizes \option{japanese} as a language option.
751 The extra complication is that for grammatical reasons \cs{vref},
752 \cs{Vref}, \cs{vrefrange} and \cs{fullref} need a structure different
753 from all other languages currently supported. To accommodate this,
754 \cs{vrefformat}, \cs{Vrefformat}, \cs{vrefrangeformat}, and \cs{fullrefformat}
755 have been added to all languages.
756 %
757 \githubissue{352}
758
759
760 \subsection{\pkg{xr}: Support for spaces in filenames}
761
762 The command \cs{externaldocument}, provided by \pkg{xr}, now also
763 supports filenames with spaces, just like \cs{include} and
764 \cs{includeonly}.
765 %
766 \githubissue{223}
767
768
769
770 \section{Changes to packages in the \pkg{amsmath} category}
771
772 \subsection{Placement corrections for two accent commands}
773
774 The accent commands \cs{dddot} and \cs{ddddot} (producing triple and
775 quadruple dot accents) moved the base character vertically in certain
776 situations if it was a single glyph,
777 e.g., \verb=$Q \dddot{Q}$=
778 were not at the same baseline. This has been corrected.
779 %
780 \githubissue{126}
781
782 \subsection{Fixes to \env{aligned} and \env{gathered}}
783
784 The environments \env{aligned} and \env{gathered} have a
785 trailing optional argument to specify the vertical position of the
786 environment with respect to the rest of the line. Allowed values are
787 \texttt{t}, \texttt{b} and \texttt{c} but the code only tested for
788 \texttt{b} and \texttt{t} and assumed anything else must be
789 \texttt{c}. As a result, a formula starting with a bracket group would
790 get mangled without warning---the group being dropped and interpreted
791 as a request for centering. After more than 25 years this has now been
792 corrected. If such a group is found a warning is given and the data is
793 processed as part of the formula.
794 %
795 \githubissue{5}
796
797 \subsection{Detect Unicode engines when setting \cs{std@minus} and \cs{std@equal}}
798
799 \pkg{amsmath} now detects the Unicode engines and uses their extended
800 commands to define \cs{std@minus} and
801 \tubcommand{\parfillskip=0pt\par\newpage\noindent}%
802 \cs{std@equal}. This avoids a package like
803 \pkg{unicode-math} having to patch the code in the begin document hook to change the commands.
804
805 \subsection{Use Lua\TeX{} primitives where applicable}
806
807 For a number of years \pkg{lualatex-math} patched \cs{frac},
808 \cs{genfrac} and the \env{subarray} environment to make use of new
809 lua\TeX{} primitives. This code has now been integrated into
810 \pkg{amsmath}.
811
812 \section{Changes to the \pkg{babel} package}
813
814 Multilingual typesetting has evolved greatly in recent years, and
815 \pkg{babel}, like \LaTeX{} itself, has followed the footsteps of
816 Unicode and the W3C consortia to produce proper output in many
817 languages.
818
819 Furthermore, the traditional model to define and select languages
820 (which can be called \enquote{vertical}), based on closed files, while
821 still the preferred one in monolingual documents, is being extended
822 with a new model (which can be called \enquote{horizontal}) based on
823 \emph{services} provided by \pkg{babel}, which allows defining and
824 redefining locales with the help of simple \texttt{ini} files based on
825 key\slash value pairs. The \pkg{babel} package provides about 250 of these files, which
826 have been generated with the help of the Unicode Common Language Data
827 Repository.
828
829 Thanks to the recent advances in \texttt{lualatex} and
830 \pkg{luaotfload}, \pkg{babel} currently provides \emph{services} for bidi
831 typesetting, line breaking for Southeast Asian and CJK scripts,
832 nonstandard hyphenation (like ff to ff-f), alphabetic and additive
833 counters, automatic selection of fonts and languages based on the
834 script, etc. This means \pkg{babel} can be used to typeset a wide variety of
835 languages, such as Russian, Arabic, Hindi, Thai, Japanese, Bangla, Amharic,
836 Greek, and many others.
837
838 In addition, since these \texttt{ini} files are easily parsable, they can
839 serve as a source for other packages.
840
841 For further details take a look at the \pkg{babel} package
842 documentation~\cite{32:babel}.
843
844 \medskip
845 \begin{thebibliography}{9}
846
847 \fontsize{9.3}{11.3}\selectfont
848
849 \bibitem{32:ltnews31} \LaTeX{} Project Team:
850 \emph{\LaTeXe{} news 31}.\\
851 \url{https://latex-project.org/news/latex2e-news/ltnews31.pdf}
852
853 \bibitem{32:site-doc}
854 \emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\
855 \url{https://latex-project.org/help/documentation/}
856
857 \bibitem{32:issue-tracker}
858 \emph{\LaTeX{} issue tracker}.
859 \url{https://github.com/latex3/latex2e/issues/}
860
861 \bibitem{32:babel}
862 Javier Bezos and Johannes Braams.
863 \emph{Babel---Localization and internationalization}.\\
864 \url{https://www.ctan.org/pkg/babel}
865
866 \end{thebibliography}
867
868
869
870
871 \end{document}