Debian Codegraph @

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

raw
1 % \iffalse meta-comment
2 %
3 % Copyright 2024
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: ltnews39.tex
30 %
31 % This is issue 39 of LaTeX News.
32
33 \NeedsTeXFormat{LaTeX2e}[2020-02-02]
34
35 \documentclass{ltnews}
36
37 %% Maybe needed only for Chris' inadequate system:
38 \providecommand\Dash {\unskip \textemdash}
39
40 %% NOTE: Chris' preferred hyphens!
41 %% \showhyphens{parameters}
42 %% \hyphenation{because}
43
44 \usepackage[T1]{fontenc}
45
46 \usepackage{lmodern,url,hologo}
47
48 \usepackage{csquotes}
49 \usepackage{multicol}
50 \usepackage{color}
51
52 \providecommand\hook[1]{\texttt{#1}}
53
54 \providecommand\meta[1]{$\langle$\textrm{\itshape#1}$\rangle$}
55 \providecommand\option[1]{\texttt{#1}}
56 \providecommand\env[1]{\texttt{#1}}
57 \providecommand\Arg[1]{\texttt\{\meta{#1}\texttt\}}
58
59
60 \providecommand\eTeX{\hologo{eTeX}}
61 \providecommand\XeTeX{\hologo{XeTeX}}
62 \providecommand\LuaTeX{\hologo{LuaTeX}}
63 \providecommand\pdfTeX{\hologo{pdfTeX}}
64 \providecommand\MiKTeX{\hologo{MiKTeX}}
65 \providecommand\CTAN{\textsc{ctan}}
66 \providecommand\TL{\TeX\,Live}
67
68
69 \providecommand\githubissue[2][]{\ifhmode\unskip\fi
70 \quad\penalty500\strut\nobreak\hfill
71 \mbox{\small\slshape(%
72 \href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}%
73 {github issue#1 #2}%
74 )}%
75 \par\smallskip}
76 %% But Chris has to mostly disable \href for his TEXPAD app:
77 %% \def\href #1#2{#2} % Only For Chris' deficient TeX engine
78
79 % simple solution right now (just link to the first issue if there are more)
80 \def\getfirstgithubissue#1 #2\relax{#1}
81
82 \providecommand\sxissue[1]{\ifhmode\unskip
83 \else
84 % githubissue preceding
85 \vskip-\smallskipamount
86 \vskip-\parskip
87 \fi
88 \quad\penalty500\strut\nobreak\hfill
89 \mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par}
90
91 \providecommand\gnatsissue[2]{\ifhmode\unskip\fi
92 \quad\penalty500\strut\nobreak\hfill
93 \mbox{\small\slshape(%
94 \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F\getfirstgithubissue#2 \relax}%
95 {gnats issue #1/#2}%
96 )}%
97 \par}
98
99 \let\cls\pkg
100 \providecommand\env[1]{\texttt{#1}}
101 \providecommand\acro[1]{\textsc{#1}}
102
103 \vbadness=1400 % accept slightly empty columns
104
105
106 \let\finalpagebreak\pagebreak % for TUB (if they use it)
107 \let\finalvspace\vspace % for document layout fixes
108
109 \makeatletter
110 % maybe not the greatest design but normally we wouldn't have subsubsections
111 \renewcommand{\subsubsection}{%
112 \@startsection {subsubsection}{2}{0pt}{1.5ex \@plus 1ex \@minus .2ex}%
113 {-1em}{\@subheadingfont\colonize}%
114 }
115 \providecommand\colonize[1]{#1:}
116 \makeatother
117
118
119 % Undo ltnews's \verbatim@font with active < and >
120 \makeatletter
121 \def\verbatim@font{\normalsize\ttfamily}
122 \makeatother
123
124
125 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
126 \providecommand\tubcommand[1]{}
127 \tubcommand{\input{tubltmac}}
128
129 \publicationmonth{June}
130 %\publicationyear{2024 --- DRAFT version for upcoming release}
131 \publicationyear{2024}
132
133 \publicationissue{39}
134
135 \begin{document}
136
137 \tubcommand{\addtolength\textheight{4.2pc}} % only for TUB
138
139 \maketitle
140 {\hyphenpenalty=10000 \exhyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000
141 \tableofcontents}
142
143 \setlength\rightskip{0pt plus 3em}
144
145 \medskip
146
147 \section{Introduction}
148
149 The \LaTeX{} Project team remains strongly focused on producing
150 automatically tagged PDF output for accessibility and reuse. At the
151 beginning of 2024 the ISO PDF/UA-2 and the WTPDF (well-tagged PDF)
152 standards were released and we are glad to be able to report that it
153 is now possible to use \LaTeX{} to automatically produce documents
154 that conform to these new standards.\footnote{At the present time we
155 are still in a trial/prototype phase in which only a limited set of
156 document classes and packages are supported. Over the next releases
157 we expect to gradually lift these restrictions and eventually provide
158 the full functionality as part of the core distribution, rather than
159 through \texttt{latex-lab} modules.} A sample collection of such
160 documents ranging from classical texts, such as the Bible, to recent
161 technical papers submitted to arXiv.org can be found at
162 \url{https://github.com/latex3/tagging-project/discussions/72}.
163
164 In February Ulrike and Frank presented the current project status
165 during the 5th International Workshop on \enquote{Digitization and
166 E-Inclusion in Mathematics and Science 2024} (DEIMS 2024) at Nihon
167 University, Tokyo, Japan; see~\cite{39:deims}.
168
169
170 \section{News from the \enquote{\LaTeX{} Tagged PDF} project}
171
172 In the previous \LaTeX{} News~\cite{39:ltnews38} we announced some prototype
173 support for tagged tabulars. Some of the necessary code has
174 now been moved from \texttt{latex-lab} to the corresponding packages
175 (using sockets and plugs) and to the \LaTeX{} kernel (for those parts
176 that are also necessary for other aspects of tagging).
177
178 The kernel code specific to tagging is implemented in the file
179 \texttt{lttagging.dtx}. For now it contains \cs{UseTaggingSocket}, a
180 special invocation command for sockets that are specific to
181 tagging. This enables us to also provide \cs{SuspendTagging} and
182 \cs{ResumeTagging}, i.e., a very efficient way to temporarily disable
183 the whole tagging process. This is, for example, necessary if some
184 code is doing trial typesetting. In that case the trials should not
185 generate tagging structures\Dash only the finally-chosen version
186 should. Thus, \pkg{tabularx}, for example, stops the tagging while
187 doing its trials to figure out the correct column widths to use, and
188 then re-enables tagging when the table is finally typeset.
189
190 Over time, \texttt{lttagging.dtx} will hold more general tagging code
191 as appropriate. For now it is only documented as part of
192 \texttt{source2e.pdf} but long term we will provide a separate guide
193 for tagging, which will then also include the information currently
194 found in various other places, e.g., \texttt{tagpdf.pdf}.
195
196 We also added support for a few missing commands
197 described in Leslie Lamport's \emph{\LaTeX{}
198 Manual}~\cite{39:Lamport}: If \texttt{phase-III} is used
199 the \cs{marginpar} command will be properly tagged (depending on
200 the PDF version) as an \texttt{Aside} or a \texttt{Note} structure.
201 In the standard classes \cs{maketitle} will be tagged if the additional
202 testphase module \texttt{title} is used.
203
204 The \texttt{math} module has been extended and now includes
205 options to attach MathML files to the structures.
206 First tests with a PDF reader and screen reader that support
207 associated files look very promising. Examples of PDF files tagged with the
208 new method can be found at
209 \url{https://github.com/latex3/tagging-project/discussions/72}.
210
211 At last various small bugs and problems reported at
212 \url{https://github.com/latex3/tagging-project}
213 have been fixed.
214 Such feedback is very valuable,
215 so we hope to see you there and thank you for
216 any contribution, whether it is an issue or a post on a discussion
217 thread.
218
219
220
221 \section{Enhancements to the new mark mechanism}
222
223 In June 2022 we introduced a new mark mechanism~\cite[p.~76]{39:ltnews} that allows keeping track of multiple
224 independent marks. It also properly supports top marks, something that wasn't
225 reliably possible with \LaTeX{} before.
226
227 There was, however, one limitation: to retrieve the marks from the
228 page data it was necessary to \cs{vsplit} that data artificially so
229 that \TeX{} would produce split marks that the mechanism could then
230 use. Unfortunately, \TeX{} gets very upset if it finds infinite
231 negative glue (e.g., from \cs{vss}) within this data. This is not
232 totally surprising because such glue would allow splitting off any
233 amount of material as such glue would hide its size. \TeX{}
234 therefore responds with an error message if it find such glue while
235 doing a \cs{vsplit} operation (and it does so even if a later glue
236 item cancels the infinite glue).
237
238 To account for this, the code in 2022 attempted to detect this
239 situation beforehand and if so did not do any splitting but, of
240 course, it would then also not extract any mark information.
241
242 In this release the approach has been changed and we always do a
243 \cs{vsplit} operation and thus always get the right mark data
244 extracted. While it is not possible to avoid upsetting \TeX{} in case
245 we have infinite negative glue present, it is possible to hide this
246 (more or less) from the user.\footnote{A note to \pkg{l3build} users
247 that make use of its testing capabilities: the new mechanism
248 temporarily changes \cs{interactionmode} and, for implementation
249 reasons in \TeX{}, that results in extra newlines in the \texttt{.log}
250 file, so instead of seeing \texttt{[1] [2]} you will see each on
251 separate lines. This means that test files might show differences of
252 that nature, once the code is active, and must therefore be
253 regenerated as necessary.} With the new code \TeX{} will neither stop
254 nor show anything on the terminal. What we can't do, though, is
255 avoid an error being written to the log file, but to make it clear
256 that this error is harmless and should be ignored we have arranged the
257 code so that the error message, if it is issued, takes the following
258 format:
259 \begingroup
260 \makeatletter
261 \def\verbatim@font{%
262 \small\ttfamily}
263 \makeatother
264 \begin{verbatim}
265 ! Infinite glue shrinkage found in box being split.
266 <argument> Infinite shrink error above ignored !
267 l. ... }
268 \end{verbatim}
269 Not perfect (especially the somewhat unmotivated \texttt{<argument>}),
270 but you can only do so much when error messages and their texts are
271 hard-wired in the engine.
272
273 \endgroup
274
275 So why all this? There are two reasons: we do not lose marks in edge
276 cases any more, and perhaps more importantly we are now also reliably
277 able to extract marks from arbitrarily boxed data, something that
278 wasn't possible at all before. This is necessary, for example, to
279 support extended marks in \env{multicols} environments or extract them
280 from floats, marginpars, etc.\tubcommand{\looseness-1}
281
282 Details about the implementation can be found in \texttt{texdoc
283 ltmarks-code} or in the shorter \texttt{texdoc ltmarks-doc} (which
284 only describes the general concepts and the command interfaces).
285
286
287 \section{Providing \pkg{xtemplate} in the format}
288
289 In \LaTeX{} News~32, we described the move of one long-term experimental idea
290 into the kernel: the package \pkg{xparse}, which was integrated as \pkg{ltcmd}.
291 With this edition, we move another long-term development idea to stable status:
292 \emph{templates}.
293
294 In this context, templates are a mechanism to abstract out various elements
295 of a document (such as \enquote{sectioning}) in such a way that different
296 implementations can be interchanged,
297 %% CAR added text: --- FMi: but it is wrong
298 %% variations of the document markup can be accommodated,
299 and design decisions can be implemented efficiently and controllably.
300
301 In contrast to \pkg{ltcmd}, which provides a mechanism that many document
302 authors will exploit routinely, templates are a more specialised tool. We
303 anticipate that they will be used by a small number of programmers, providing
304 generic ideas that will then be used within document classes. Most document
305 authors will therefore likely directly encounter templates only rarely.
306 We anticipate though that they will be \emph{using} templates provided
307 by the team or others.
308
309 %% CAR added this paragraph: FMi: doesn't belong in ltnews
310 %We shall continue to develop these generic ideas and interfaces in various ways: for example, to support the varied document markup possibilities
311 %provided in \pkg{ltcmd} and elsewhere.
312
313 The template system requires three separate ideas
314 \begin{itemize}
315 \item Template \emph{type}: the \enquote{thing} we are using templates
316 for, such as \enquote{sectioning} or \enquote{enumerated-list}
317 \item A template: a combination of code and keys that can be used
318 to implement a type. Here for example we might have
319 \enquote{standard-\LaTeX{}-sectioning} as a template for
320 \enquote{sectioning}
321 \item One or more \emph{instances}: a specific use case of a template
322 where (some) keys are set to known values. We might for example see
323 \enquote{\LaTeX{}-section}, \enquote{\LaTeX{}-subsection}, etc.
324 \end{itemize}
325
326 As part of the move from the experimental \pkg{xtemplate} to kernel integration,
327 the team have revisited the commands provided. The stable set now comprises
328 \begin{itemize}
329 \item \cs{NewTemplateType}
330 \item \cs{DeclareTemplateInterface}
331 \item \cs{DeclareTemplateCode}
332 \item \cs{DeclareTemplateCopy}
333 \item \cs{EditTemplateDefault}
334 \item \cs{UseTemplate}
335 \item \cs{DeclareInstance}
336 \item \cs{DeclareInstanceCopy}
337 \item \cs{EditInstance}
338 \item \cs{UseInstance}
339 \item \cs{IfInstanceExistsTF} and variants
340 \end{itemize}
341
342 To support existing package authors, we have released an updated version of
343 \pkg{xtemplate} which will work smoothly with the new kernel-level code. The
344 existing commands provided in \pkg{xtemplate} will continue to work, but
345 we encourage programmers to move to the set above.
346
347
348 \section{New or improved commands}
349
350 \subsection{\pkg{doc}:\ Provide \cs{ProvideDocElement}}
351
352 In addition to
353 \cs{NewDocElement} and \cs{RenewDocElement} we now also offer a
354 \cs{ProvideDocElement} declaration that does nothing unless the doc
355 element could be declared with \cs{NewDocElement}. This can be useful
356 if documentation files are processed both individually and
357 combined.
358
359
360 \subsection{\pkg{doc}:\ Better support for \pkg{upquote}}
361
362 In \LaTeX{} News~37~\cite{39:ltnews37} we wrote that support for the
363 \pkg{upquote} package was added to the \pkg{doc} package, but back
364 then this was added only for \cs{verb} and the \env{verbatim}
365 environments. However,
366 in a typical \texttt{.dtx} file, most of the code will be in the body
367 of some \env{macrocode} or \env{macrocode*} environments, and neither
368 of these was affected by adding \pkg{upquote}.
369 We have now updated \pkg{doc} so that
370 \pkg{upquote} alters the quote characters in these environments as
371 well.
372 %
373 \githubissue{1230}
374
375 \subsection[\pkg{ifthen}:\ Allow active characters in comparisons]
376 {\pkg{ifthen}:\ Guard against active characters in comparisons}
377 The \cs{ifthenelse} command now ensures that \verb|<|, \verb|=| and
378 \verb|>| are safe
379 in numeric tests, even if they have been made active
380 (typically by \pkg{babel} language shorthands).
381 %
382 \githubissue{756}
383
384 \subsection%[New conditionals: \cs{IfClassAtLeastT}, etc.]
385 {New conditionals:\ \cs{IfClassAtLeastT} and friends}
386
387 Around 2020 we added a number of conditionals with CamelCase names, i.e.,
388 %
389 \cs{IfClassAtLeastTF},
390 \cs{IfClassLoadedTF},
391 \cs{IfClassLoadedWithOptionsTF},
392 \cs{IfFormatAtLeastTF},
393 \cs{IfPackageAtLeastTF},
394 \cs{IfPackageLoadedTF}, and
395 \cs{IfPackageLoadedWithOptionsTF}
396 %
397 to help arranging conditional code that depends on the release of a
398 particular class, package or format. However, we only provided the
399 \texttt{TF} commands and not also the \texttt{T} and \texttt{F}
400 variants. This has now been changed.
401
402 In 2023 we introduced \cs{IfFileAtLeastTF} but we did not also provide
403 \cs{IfFileLoadedTF} at the same time. This conditional and its
404 \texttt{T} and \texttt{F} variants have now also been added. Remember
405 that one can only test for files that contain a \cs{ProvidesFile}
406 line.
407 %
408 We did the same for the conditionals \cs{IfLabelExistsTF} and
409 \cs{IfPropertyExistsTF}, also introduced in 2023.\footnote{By mistake they
410 were initially introduced under the names \cs{IfLabelExistTF} and
411 \cs{IfPropertyExistTF}; we corrected that at the same time. This is a
412 breaking change, but the commands have been used so far only in
413 kernel code.}
414 %
415 \githubissue[s]{1222 1262}
416
417
418 \section{Code improvements}
419
420 \subsection{Load packages only at the top level}
421
422 Classes and packages must be loaded only by using the commands
423 \cs{documentclass} and \cs{usepackage} or the class interface commands
424 such as \cs{LoadClass} or \cs{RequirePackageWithOptions}; moreover,
425 all of these must always be used at the top level, and not inside a
426 group of any type (for example, within an environment).
427 Previously \LaTeX\ did not check this,
428 which would often lead to low level errors later on if package declarations
429 were reverted when a group ended.
430 \LaTeX\ now checks the group level and an error is thrown
431 if the class or package is loaded in a group.
432 %
433 \githubissue{1185}
434
435 \subsection{Keep track of lost glyphs}
436
437 A while ago we changed the \LaTeX{} default value for
438 \cs{tracinglostchars} from \texttt{1} to \texttt{2} so that missing
439 glyphs generate at least a warning, but we forgot to make the same
440 change to \cs{tracingnone}. Thus, when issuing that command \LaTeX{}
441 stopped generating warnings about missing glyphs. This has now been
442 corrected.
443 %
444 \githubissue{549}
445
446 \subsection{Improve \pkg{fontenc} error message}
447
448 If the \pkg{fontenc} package is asked to load a font encoding for which it
449 doesn't find a suitable \texttt{.def} file then it generates an error
450 message indicating that the encoding name might be misspelled. That
451 is, of course, one of the possible causes, but another one is that the
452 installation is missing a necessary support package, e.g., that no
453 support for Cyrillic fonts has been installed. The error message text
454 has therefore been extended to explain the issue more generally.
455 %
456 \githubissue{1102}
457
458
459 \subsection{Warn if counter names are problematic}
460
461 In the past it was possible to declare, for example,
462 \verb/\newcounter{index}/ with the side-effect that this defines
463 \cs{theindex}, even though \LaTeX{} has a \env{theindex} environment
464 that then got clobbered by the declaration.
465 %
466 This has now been changed: if \cs{the}\meta{counter} is already
467 defined it is not altered, but instead a warning message is displayed.
468 %
469 \githubissue{823}
470
471 \subsection{Extended information in \cs{listfiles}}
472
473 The \cs{listfiles} command provides useful information when finding issues
474 related to variation in package versions. However, this has to date relied on
475 the information in the \cs{ProvidesPackage} line, or similar: that can be
476 misleading if for example a file has been edited locally. We have now extended
477 \cs{listfiles} to take an optional argument which can include the MD5
478 hash and size of each file in the \texttt{.log}. Thus for
479 example you can use
480 \begin{verbatim}
481 \listfiles[hashes,sizes]
482 \end{verbatim}
483 to get both the file sizes and file hashes in the \texttt{.log} as well as
484 the standard release information.
485 %
486 \githubissue{945}
487
488 \subsection{Optimize creation of simple document commands}
489
490 Creating document commands using declarations such as \cs{NewDocumentCommand}, etc., provides a very
491 flexible way of grabbing arguments. When the document command only takes simple
492 mandatory arguments, this has to-date added an overhead that could be avoided.
493 We have now refined the internal code path such that \enquote{simple} document
494 commands avoid almost any overhead at point-of-use, making the results
495 essentially as efficient as using \cs{newcommand} for low-level \TeX{}
496 constructs. Note that as \cs{NewDocumentCommand} makes engine-robust commands,
497 the direct equivalent to \cs{newcommand} is \cs{NewExpandableDocumentCommand}.
498 %
499 \githubissue{1189}
500
501 \subsection{\texorpdfstring{\raggedright}{}Handling of end-of-lines in \texttt{+v} arguments of \cs{NewDocumentCommand} and friends}
502
503 The \texttt{+v} argument type provided by declarations such as \cs{NewDocumentCommand}, etc., allows
504 grabbing of multiple lines of text in a verbatim-like argument. Almost always,
505 the result of this grabbing will be used in a typesetting context. Previously,
506 the end-of-line characters were stored literally as category code~12
507 (\enquote{other}) \verb|^^M| tokens. However, these are difficult to work with
508 in general. We have now revised this behavior, such that end-of-line characters
509 are converted to the \cs{obeyedline} command when parsed by \texttt{+v}-type
510 arguments.
511 This change may require adjustments to the source of some documents, but the
512 enhanced ability of users and programmers to exploit the \texttt{+v}-type
513 argument means we believe it is necessary.
514
515 \subsection{Declaring appropriate sub-encodings for \texttt{TS1} symbol fonts}
516
517 In 2020 we incorporated support for the \texttt{TS1} symbol encoding
518 directly into the kernel and in this way removed the need to load the
519 \pkg{textcomp} package~\cite{39:ltnews31} to make commands such as
520 \cs{texteuro} available.
521
522 There is, however, a big problem with this \texttt{TS1} symbol
523 encoding: only very few fonts provide every glyph that is supposed
524 to be part of \texttt{TS1}. This means that changing font families
525 might result in certain symbols becoming unavailable. This can be a
526 major disaster if, for example,
527 the symbol \cs{texteuro} (\texteuro) or \cs{textohm} (\textohm)
528 no longer gets printed in your document, just because you altered the
529 text font family.
530
531 To mitigate this problem, in 2020 we also introduced the declaration
532 \cs{DeclareEncodingSubset}. This declaration is supposed to be used in
533 font definition files for the \texttt{TS1} encoding to specify which
534 subset (we have defined 10 common ones) a specific font implements. If
535 such a declaration is used then missing symbols are automatically
536 taken from a fallback font.
537
538 %% CAR -- this paragraph maybe needs more substantial rewording ??
539 While this is not perfect, it is the best
540 you can do other than painstakingly checking that your document
541 %% CAR: was "painstrickenly" -- should be a word, but!!
542 uses only glyphs that the font supports
543 and, if necessary, switching to a different font or avoiding the
544 missing symbols. See also the discussion in \cite{39:ltnews33}.
545
546 To jumpstart the process we also added declarations to the \LaTeX{}
547 kernel for most of the fonts found in \TL{} at the time\Dash with
548 the assumption that such declarations would over time be superseded by
549 declarations in the \texttt{.fd} files. Unfortunately, this hasn't
550 happened yet (or not often) and so many of the initial declarations
551 went stale: several fonts got new glyphs added to them (so their
552 sub-encoding should have been changed but didn't); others (mainly due
553 to license issues) changed the family name and thus our declarations
554 became useless and the renamed fonts (now without a declaration) ended
555 up in the default sub-encoding that offers only a few glyphs;
556 yet others such as CharisSIL (which triggered the GitHub issue) were
557 simply not around at the time.
558
559 We have, therefore, again attempted to provide the (currently) correct
560 declarations, but it is obvious that this is not a workable
561 process. As we do not maintain the fonts we do not have the
562 information that something has changed, and to regularly check the
563 ever growing font support bundles is simply not possible. It is
564 therefore very important that maintainers of font packages not only
565 provide \texttt{.fd} files but also add such a declaration to every
566 \texttt{TS1...fd} font definition file that they distribute.
567
568 To simplify this process, we now provide a simple \LaTeX{} file
569 (\texttt{checkencodingsubset.tex}) for determining the correct (safe)
570 sub-encoding. If run, it asks for a font family and then outputs its
571 findings, for example, for \texttt{AlgolRevived-TLF} you will get:
572 \tubcommand{\begin{small}}
573 \begin{verbatim}
574 -----------------------------------------
575 Testing font family AlgolRevived-TLF
576 (currently TS1-sub-encoding 9)
577 -----------------------------------------
578 Some glyphs are missing from sub-encoding 8:
579 ==> \textcelsius (137) is missing
580 ==> \texttwosuperior (178) is missing
581 ==> \textthreesuperior (179) is missing
582 ==> \textonesuperior (185) is missing
583 Some glyphs are missing from sub-encoding 7:
584 ==> \texteuro (191) is missing
585 All glyphs between sub-encoding 6 and 7 exist
586 All glyphs between sub-encoding 5 and 6 exist
587 All glyphs between sub-encoding 4 and 5 exist
588 Some glyphs are missing from sub-encoding 3:
589 ==> \textwon (142) is missing
590 All glyphs between sub-encoding 2 and 3 exist
591 Some glyphs are missing from sub-encoding 1:
592 ==> \textmho (77) is missing
593 ==> \textpertenthousand (152) is missing
594 All glyphs between sub-encoding 0 and 1 exist
595 All glyphs in core exist
596 -----------------------------------------
597 TS1 encoding subset for AlgolRevived-TLF (ok)
598 Use sub-encoding 9
599 -----------------------------------------
600 \end{verbatim}
601 \tubcommand{\end{small}\noindent}%
602 This output is meant for human consumption, e.g., you see which glyphs
603 are missing and why a certain sub-encoding is suggested, but it is not
604 that hard to use it in a script and extract the suggested sub-encoding
605 by grepping for the line starting with \texttt{Use sub-encoding}.
606
607 Of course, this check will only work if the missing glyphs are really
608 missing: some fonts placed \enquote{tofu}\footnote{Little squares to
609 indicate a missing symbol.} into such slots and in this case it looks
610 to \TeX{} as if the glyph is provided. For example, for the old
611 Palatino fonts (family \texttt{ppl}) it would report
612 \begin{verbatim}
613 -----------------------------------------
614 TS1 encoding subset for ppl (bad)
615 Use sub-encoding 0 (not 5)
616 -----------------------------------------
617 \end{verbatim}
618 thus it claims that
619 all glyphs are provided, while in reality more than twenty are missing
620 and sub-encoding 5, as declared in the kernel, is in fact correct.
621 %
622 \githubissue{1257}
623
624
625 \subsection{Behavior when loading \pkg{textcomp} without options}
626
627 When incorporating the \pkg{textcomp} package into the \LaTeX{} kernel, in
628 the February 2020 release~\cite{39:ltnews31}, the default type of its package messages was changed from package info (\texttt{Package textcomp Info})
629 to \LaTeX{} kernel info (\texttt{LaTeX Info}). But if \pkg{textcomp}
630 was loaded without options, the message type got restored to package info.
631 This restoration has now been canceled.
632
633 Note that loading \pkg{textcomp} with one of the options \option{error},
634 \option{warn}, or \option{info} still changes the message
635 type to an error, warning, or info message from the \pkg{textcomp} package.
636 %
637 \githubissue{1333}
638
639
640 \subsection{Rollback improvements}
641
642 When requesting a rollback of the \LaTeX{} kernel and/or packages,
643 several packages produced the error \enquote{Suspicious rollback date}
644 because their rollback section contained only data about recent
645 releases even if the package, such as \pkg{array}, was available since
646 the first release of \LaTeXe{} in 1994. We now suppress this error and
647 load the first release that is still part of the distribution (and
648 hope for the best). This change was implemented for the packages
649 \pkg{amsmath},
650 \pkg{array},
651 \pkg{doc},
652 \pkg{graphics},
653 \pkg{longtable},
654 \pkg{multicol},
655 \pkg{showkeys},
656 \pkg{textcomp}, and
657 \pkg{varioref}.
658 %
659 \githubissue{1333}
660
661
662
663 \section{Documentation improvements}
664
665 \subsection{Further updates to the guides}
666
667 We reported about the updated versions of \texttt{usrguide} and
668 \texttt{clsguide} in \LaTeX{} News~37~\cite{39:ltnews37}. We have now
669 revised \texttt{fntguide} as well to reflect the changes and macros
670 added to the kernel over the last years of development. Note that the
671 file name hasn't changed and there is no \texttt{fntguide-historic}.
672
673 \section{Bug fixes}
674
675 \subsection{Fix inconsistent expansion of the package option list}
676
677 \LaTeX{} applies one-step expansion to the raw option list of packages
678 and classes, so that constructions such as
679 \begin{verbatim}
680 \def\myoptions{opt1,opt2}
681 \usepackage[\myoptions]{foo}
682 \end{verbatim}
683 are supported.
684 %% CAR Rewritten sentence:
685 But if a package declares its options using the new
686 key/value approach~\cite{39:ltnews35} and it gets loaded a second time,
687 then its raw option list will not be expanded and so an error might be raised.
688 This has now been corrected.
689 %
690 \githubissue{1298}
691
692 \subsection{Fix logic for first mark (page region)}
693
694 In the new mark mechanism introduced in June 2022~\cite{39:ltnews35} the result of
695 \cs{FirstMark} on a two-column page was incorrect if the first column
696 contained no marks. In that case it should have returned the first
697 mark of the second column but didn't.
698 This has now been corrected.
699
700 Documents using \cs{leftmark} are not affected, because that command is still
701 using the old mechanism for now.
702 %
703 \githubissue{1359}
704
705
706 \subsection{Struts at the end of footnotes or \texttt{p} columns}
707
708 To produce consistent spacing in footnotes and tabular
709 \texttt{p}-cells \LaTeX{} adds a strut at the beginning and end of
710 the content.
711 %% CAR Rewritten sentences:
712 %% It assumed, however, that the footnote or tabular cell ended in
713 %% horizontal mode and until now added the struts unconditionally. As a
714 %% result, with vertical material at the end of the material this strut
715 %% started a new paragraph consisting of a single line with just the
716 %% strut inside.
717 This assumed, however, that the content of the footnote or tabular cell ended in
718 horizontal mode and so, until now, these struts were unconditionally added;
719 as a result, if this content ended with vertical material then this strut
720 started a new paragraph consisting of a single line with just the
721 strut in it. This has finally been corrected and now the placement
722 logic for the strut changes when vertical mode is detected.
723
724 \emph{(First seen in a bug report for \pkg{footmisc} in combination with
725 \pkg{bigfoot})}
726
727
728 \subsection{Fix a ``missing \cs{item}'' rollback error}
729
730 If \LaTeX{} is rolled back to a date between 2023/06/01 (inclusive) and
731 2024/06/01 (exclusive), any list-based environment would raise an
732 error:
733 %(shown on two lines for \textsl{TUGboat}):
734 \begin{verbatim}
735 ! LaTeX Error: Something's wrong--perhaps
736 a missing \item.
737 \end{verbatim}
738 This has now been corrected as a hotfix in patch level 2, by enhancing
739 the 2023/06/01 version rollback code of the new paragraph mechanism.
740 %
741 \githubissue{1386}
742
743
744
745 \section{Changes to packages in the \pkg{amsmath} category}
746
747 \subsection{\pkg{amsmath}:\ Correct equation tag placement}
748
749 If there is not enough space to place an equation tag on the same line
750 as the equation then \pkg{amsmath} calculates a suitable offset and it
751 places the tag above (or below) the equation. In the case of the
752 \env{gather} environment this offset was not reset at the end, with
753 the result that it also got applied to any following environment,
754 resulting in incorrect spacing in certain situations. This has now
755 been corrected.
756 %
757 \githubissue{1289}
758
759
760
761 %\section{Changes to packages in the \pkg{graphics} category}
762
763 \section{Changes to packages in the \pkg{tools} category}
764
765 \subsection{\pkg{array}, \pkg{longtable}, \pkg{tabularx}:\ Support tagging}
766
767 %% CAR Rewritten sentences
768 These three packages have been extended so they can now, on request,
769 produce tagged tabular. This is done by adding a number of sockets (see
770 \cite{39:ltnews38}) that, by default, do nothing; but when tagged PDF
771 is requested they get equipped with appropriate plugs.
772
773 In the previous \LaTeX{} release this was handled in \texttt{latex-lab}, by
774 patching the packages when tagging was requested.
775
776
777 \subsection{\pkg{array}:\ No \cs{unskip} in math cells}
778
779 Math cells in the standard \env{array} environment of the kernel are
780 not subject to space removal at the right end of the cell, i.e., explicit
781 spaces from \cs{hspace} or \verb*|\ |, etc.\ are honored
782 (normal spaces are automatically ignored in math). In the \pkg{array}
783 package all spaces got removed by calling \cs{unskip} unconditionally,
784 regardless of the type of cell.
785 This difference in behavior has now been removed by correcting the processing of
786 math cells in \pkg{array}.
787 %
788 \githubissue{1323}
789
790
791 \subsection{\pkg{verbatim}:\ \cs{verb} showed visible spaces}
792
793 A recent change in the kernel was not reflected in the \pkg{verbatim}
794 package, with the result that \cs{verb} showed visible spaces
795 (\verb*/ /) after the package was loaded. This has already been corrected
796 in a hotfix for the November 2023 release.
797 %
798 \githubissue{1160}
799
800 \subsection{\pkg{verbatim}:\ Support tabs in \cs{verbatiminput*}}
801
802 Mimicking the November 2023 kernel update that allowed \cs{verb*}
803 to mark tabs as spaces, the \pkg{verbatim} package
804 has now been updated so that \cs{verbatiminput*} also marks tabs as spaces.
805 \githubissue{1245}
806
807
808 \subsection{\pkg{multicol}:\ \cs{columnbreak} interferes with mark mechanism}
809
810 The \pkg{multicol} package has to keep track of marks (from
811 \cs{markright} or \cs{markboth}) as part of its output routine code
812 and can't rely on \LaTeX{} handling that automatically. It does so by
813 artificially splitting page data with \cs{vsplit} to extract the mark
814 data. With the introduction of \cs{columnbreak} that code failed
815 sometimes, because it was not seeing any mark that followed such a
816 forced column break.
817
818 This has now been corrected, but there is further work to do, because
819 as of now \pkg{multicol} does not yet handle marks using the new mark
820 mechanism\Dash see the discussion at the beginning of the newsletter.
821 %
822 \githubissue{1130}
823
824 \subsection{\pkg{showkeys}:\ Allow \cs{newline} in \pkg{amsthm} to work}
825 %
826 Previously \pkg{showkeys} added an extra box layer which disabled the \cs{newline}
827 of \pkg{amsthm} theorem styles. This extra box has now been avoided.
828 %
829 \githubissue{1123}
830
831 \tubcommand{\newpage}
832 \subsection{\pkg{xr}:\ Support links and properties}
833 %
834 The \pkg{xr} package implements a system for eXternal References.
835 The \pkg{xr-hyper} package (in the \pkg{hyperref} bundle)
836 extended this to also support links to external documents.
837 %% CAR: Rewritten sentences:
838 Using last year's extension of the \cs{label} command, which unified
839 the label syntax of \LaTeX{} and \pkg{hyperref},
840 it became possible to merge the two packages and thus make
841 \pkg{xr-hyper} obsolete.
842 With this change it is also possible to refer to properties
843 that are stored in external documents using \cs{RecordProperties}.
844 %
845 \githubissue{1180}
846
847 \section{Changes to files in the \pkg{cyrillic} category}
848
849 \subsection{Correct definition of \cs{k}}
850
851 Ages ago, the encoding-specific definitions for various accent
852 commands were changed to guard against altering some parameter values
853 non-locally by mistake. For some reason the definition for \cs{k} in
854 the Cyrillic encodings \texttt{T2A}, \texttt{T2B}, and \texttt{T2C}
855 didn't get this treatment. This oversight has now been corrected.
856 %
857 \githubissue{1148}
858
859
860 \begin{thebibliography}{9}\frenchspacing
861
862 %\fontsize{9.3}{11.3}\selectfont
863
864
865 \bibitem{39:Lamport}
866 Leslie Lamport.
867 \newblock \emph{{\LaTeX}: {A} Document Preparation System: User's Guide and Reference
868 Manual}.
869 \newblock \mbox{Addison}-Wesley, Reading, MA, USA, 2nd edition, 1994.
870 \newblock ISBN 0-201-52983-1.
871 \newblock Reprinted with corrections in 1996.
872
873 \bibitem{39:ltnews} \LaTeX{} Project Team.
874 \emph{\LaTeXe{} news 1--39}. June, 2024.
875 \url{https://latex-project.org/news/latex2e-news/ltnews.pdf}
876
877 \bibitem{39:ltnews31} \LaTeX{} Project Team.
878 \emph{\LaTeXe{} news 31}. February, 2020.
879 \url{https://latex-project.org/news/latex2e-news/ltnews31.pdf}
880
881 \bibitem{39:ltnews33} \LaTeX{} Project Team.
882 \emph{\LaTeXe{} news 33}. June 2021.\\
883 \url{https://latex-project.org/news/latex2e-news/ltnews33.pdf}
884
885 \bibitem{39:ltnews35} \LaTeX{} Project Team.
886 \emph{\LaTeXe{} news 35}. June 2022.\\
887 \url{https://latex-project.org/news/latex2e-news/ltnews35.pdf}
888
889 \bibitem{39:ltnews37} \LaTeX{} Project Team.
890 \emph{\LaTeXe{} news 37}. June 2023.\\
891 \url{https://latex-project.org/news/latex2e-news/ltnews37.pdf}
892
893 \bibitem{39:ltnews38} \LaTeX{} Project Team.
894 \emph{\LaTeXe{} news 38}. November 2023.
895 \url{https://latex-project.org/news/latex2e-news/ltnews38.pdf}
896
897 \bibitem{39:deims} Frank Mittelbach and Ulrike Fischer.
898 \emph{Enhancing \LaTeX{} to automatically produce
899 tagged and accessible PDF}. \textsl{TUGboat} 45:1, 2024.
900 \url{https://latex-project.org/publications/indexbyyear/2024/}
901
902 %\bibitem{39:blueprint} Frank Mittelbach and Chris Rowley.
903 % \emph{\LaTeX{} Tagged PDF \Dash A blueprint for a large project}.\\
904 % \url{https://latex-project.org/publications/indexbyyear/2020/}
905
906 \end{thebibliography}
907
908 \end{document}
909