summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/base/ltnews39.tex
blob: 3af89035153770f975155ccd1d123a5b458ee082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
% \iffalse meta-comment
%
% Copyright 2024
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
% This file is part of the LaTeX base system.
% -——————————————
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
%    https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2008 or later.
%
% This file has the LPPL maintenance status "maintained".
%
% The list of all files belonging to the LaTeX base distribution is
% given in the file `manifest.txt'. See also `legal.txt' for additional
% information.
%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
%
% \fi
% Filename: ltnews39.tex
%
% This is issue 39 of LaTeX News.

\NeedsTeXFormat{LaTeX2e}[2020-02-02]

\documentclass{ltnews}

%% Maybe needed only for Chris' inadequate system:
\providecommand\Dash {\unskip \textemdash}

%% NOTE: Chris' preferred hyphens!
%% \showhyphens{parameters}
%% \hyphenation{because}

\usepackage[T1]{fontenc}

\usepackage{lmodern,url,hologo}

\usepackage{csquotes}
\usepackage{multicol}
\usepackage{color}

\providecommand\hook[1]{\texttt{#1}}

\providecommand\meta[1]{$\langle$\textrm{\itshape#1}$\rangle$}
\providecommand\option[1]{\texttt{#1}}
\providecommand\env[1]{\texttt{#1}}
\providecommand\Arg[1]{\texttt\{\meta{#1}\texttt\}}


\providecommand\eTeX{\hologo{eTeX}}
\providecommand\XeTeX{\hologo{XeTeX}}
\providecommand\LuaTeX{\hologo{LuaTeX}}
\providecommand\pdfTeX{\hologo{pdfTeX}}
\providecommand\MiKTeX{\hologo{MiKTeX}}
\providecommand\CTAN{\textsc{ctan}}
\providecommand\TL{\TeX\,Live}


\providecommand\githubissue[2][]{\ifhmode\unskip\fi
     \quad\penalty500\strut\nobreak\hfill
     \mbox{\small\slshape(%
       \href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}%
          	    {github issue#1 #2}%
           )}%
     \par\smallskip}
%% But Chris has to mostly disable \href for his TEXPAD app:
%% \def\href #1#2{#2} % Only For Chris' deficient TeX engine

% simple solution right now (just link to the first issue if there are more)
\def\getfirstgithubissue#1 #2\relax{#1}

\providecommand\sxissue[1]{\ifhmode\unskip
     \else
       % githubissue preceding
       \vskip-\smallskipamount
       \vskip-\parskip
     \fi
     \quad\penalty500\strut\nobreak\hfill
     \mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par}

\providecommand\gnatsissue[2]{\ifhmode\unskip\fi
     \quad\penalty500\strut\nobreak\hfill
     \mbox{\small\slshape(%
       \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F\getfirstgithubissue#2 \relax}%
          	    {gnats issue #1/#2}%
           )}%
     \par}

\let\cls\pkg
\providecommand\env[1]{\texttt{#1}}
\providecommand\acro[1]{\textsc{#1}}

\vbadness=1400  % accept slightly empty columns


\let\finalpagebreak\pagebreak % for TUB (if they use it)
\let\finalvspace\vspace       % for document layout fixes

\makeatletter
% maybe not the greatest design but normally we wouldn't have subsubsections
\renewcommand{\subsubsection}{%
   \@startsection {subsubsection}{2}{0pt}{1.5ex \@plus 1ex \@minus .2ex}%
                  {-1em}{\@subheadingfont\colonize}%
}
\providecommand\colonize[1]{#1:}
\makeatother


% Undo ltnews's \verbatim@font with active < and >
\makeatletter
\def\verbatim@font{\normalsize\ttfamily}
\makeatother


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\providecommand\tubcommand[1]{}
\tubcommand{\input{tubltmac}}

\publicationmonth{June}
%\publicationyear{2024  --- DRAFT version for upcoming release}
\publicationyear{2024}

\publicationissue{39}

\begin{document}

\tubcommand{\addtolength\textheight{4.2pc}}   % only for TUB

\maketitle
{\hyphenpenalty=10000 \exhyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000
\tableofcontents}

\setlength\rightskip{0pt plus 3em}

\medskip

\section{Introduction}

The \LaTeX{} Project team remains strongly focused on producing
automatically tagged PDF output for accessibility and reuse. At the
beginning of 2024 the ISO PDF/UA-2 and the WTPDF (well-tagged PDF)
standards were released and we are glad to be able to report that it
is now possible to use \LaTeX{} to automatically produce documents
that conform to these new standards.\footnote{At the present time we
are still in a trial/prototype phase in which only a limited set of
document classes and packages are supported.  Over the next releases
we expect to gradually lift these restrictions and eventually provide
the full functionality as part of the core distribution, rather than
through \texttt{latex-lab} modules.}  A sample collection of such
documents ranging from classical texts, such as the Bible, to recent
technical papers submitted to arXiv.org can be found at
\url{https://github.com/latex3/tagging-project/discussions/72}.

In February Ulrike and Frank presented the current project status
during the 5th International Workshop on \enquote{Digitization and
  E-Inclusion in Mathematics and Science 2024} (DEIMS 2024) at Nihon
University, Tokyo, Japan; see~\cite{39:deims}.


\section{News from the \enquote{\LaTeX{} Tagged PDF} project}

In the previous \LaTeX{} News~\cite{39:ltnews38} we announced some prototype
support for tagged tabulars. Some of the necessary code has
now been moved from \texttt{latex-lab} to the corresponding packages
(using sockets and plugs) and to the \LaTeX{} kernel (for those parts
that are also necessary for other aspects of tagging).

The kernel code specific to tagging is implemented in the file
\texttt{lttagging.dtx}. For now it contains \cs{UseTaggingSocket}, a
special invocation command for sockets that are specific to
tagging. This enables us to also provide \cs{SuspendTagging} and
\cs{ResumeTagging}, i.e., a very efficient way to temporarily disable
the whole tagging process. This is, for example, necessary if some
code is doing trial typesetting. In that case the trials should not
generate tagging structures\Dash only the finally-chosen version
should. Thus, \pkg{tabularx}, for example, stops the tagging while
doing its trials to figure out the correct column widths to use, and
then re-enables tagging when the table is finally typeset.

Over time, \texttt{lttagging.dtx} will hold more general tagging code
as appropriate. For now it is only documented as part of
\texttt{source2e.pdf} but long term we will provide a separate guide
for tagging, which will then also include the information currently
found in various other places, e.g., \texttt{tagpdf.pdf}.

We also added support for a few missing commands
described in Leslie Lamport's \emph{\LaTeX{}
Manual}~\cite{39:Lamport}: If \texttt{phase-III} is used
the \cs{marginpar} command will be properly tagged (depending on
the PDF version) as an \texttt{Aside} or a \texttt{Note} structure.
In the standard classes \cs{maketitle} will be tagged if the additional
testphase module \texttt{title} is used.

The \texttt{math} module has been extended and now includes
options to attach MathML files to the structures.
First tests with a PDF reader and screen reader that support
associated files look very promising. Examples of PDF files tagged with the
new method can be found at
\url{https://github.com/latex3/tagging-project/discussions/72}.

At last various small bugs and problems reported at
\url{https://github.com/latex3/tagging-project}
have been fixed.
Such feedback is very valuable,
so we hope to see you there and thank you for
any contribution, whether it is an issue or a post on a discussion
thread.



\section{Enhancements to the new mark mechanism}

In June 2022 we introduced a new mark mechanism~\cite[p.~76]{39:ltnews} that allows keeping track of multiple
independent marks. It also properly supports top marks, something that wasn't
reliably possible with \LaTeX{} before.

There was, however, one limitation: to retrieve the marks from the
page data it was necessary to \cs{vsplit} that data artificially so
that \TeX{} would produce split marks that the mechanism could then
use. Unfortunately, \TeX{} gets very upset if it finds infinite
negative glue (e.g., from \cs{vss}) within this data. This is not
totally surprising because such glue would allow splitting off any
amount of material as such glue would hide its size. \TeX{}
therefore responds with an error message if it find such glue while
doing a \cs{vsplit} operation (and it does so even if a later glue
item cancels the infinite glue).

To account for this, the code in 2022 attempted to detect this
situation beforehand and if so did not do any splitting but, of
course, it would then also not extract any mark information.

In this release the approach has been changed and we always do a
\cs{vsplit} operation and thus always get the right mark data
extracted. While it is not possible to avoid upsetting \TeX{} in case
we have infinite negative glue present, it is possible to hide this
(more or less) from the user.\footnote{A note to \pkg{l3build} users
that make use of its testing capabilities: the new mechanism
temporarily changes \cs{interactionmode} and, for implementation
reasons in \TeX{}, that results in extra newlines in the \texttt{.log}
file, so instead of seeing \texttt{[1] [2]} you will see each on
separate lines. This means that test files might show differences of
that nature, once the code is active, and must therefore be
regenerated as necessary.} With the new code \TeX{} will neither stop
nor show anything on the terminal. What we can't do, though, is
avoid an error being written to the log file, but to make it clear
that this error is harmless and should be ignored we have arranged the
code so that the error message, if it is issued, takes the following
format:
\begingroup
\makeatletter
\def\verbatim@font{%
  \small\ttfamily}
\makeatother
\begin{verbatim}
! Infinite glue shrinkage found in box being split.
<argument> Infinite shrink error above ignored !
l. ... }
\end{verbatim}
Not perfect (especially the somewhat unmotivated \texttt{<argument>}),
but you can only do so much when error messages and their texts are
hard-wired in the engine.

\endgroup

So why all this? There are two reasons: we do not lose marks in edge
cases any more, and perhaps more importantly we are now also reliably
able to extract marks from arbitrarily boxed data, something that
wasn't possible at all before. This is necessary, for example, to
support extended marks in \env{multicols} environments or extract them
from floats, marginpars, etc.\tubcommand{\looseness-1}

Details about the implementation can be found in \texttt{texdoc
  ltmarks-code} or in the shorter \texttt{texdoc ltmarks-doc} (which
only describes the general concepts and  the command interfaces).


\section{Providing \pkg{xtemplate} in the format}

In \LaTeX{} News~32, we described the move of one long-term experimental idea
into the kernel: the package \pkg{xparse}, which was integrated as \pkg{ltcmd}.
With this edition, we move another long-term development idea to stable status:
\emph{templates}.

In this context, templates are a mechanism to abstract out various elements
of a document (such as \enquote{sectioning}) in such a way that different
implementations can be interchanged,
%% CAR added text: ---  FMi: but it is wrong
%% variations of the document markup can be accommodated,
and design decisions can be implemented efficiently and controllably.

In contrast to \pkg{ltcmd}, which provides a mechanism that many document
authors will exploit routinely, templates are a more specialised tool. We
anticipate that they will be used by a small number of programmers, providing
generic ideas that will then be used within document classes. Most document
authors will therefore likely directly encounter templates only rarely.
We anticipate though that they will be \emph{using} templates provided
by the team or others.

%% CAR added this paragraph: FMi: doesn't belong in ltnews
%We shall continue to develop these generic ideas and interfaces in various ways: for example, to support the varied document markup possibilities
%provided in \pkg{ltcmd} and elsewhere.

The template system requires three separate ideas
\begin{itemize}
  \item Template \emph{type}: the \enquote{thing} we are using templates
    for, such as \enquote{sectioning} or \enquote{enumerated-list}
  \item A template: a combination of code and keys that can be used
    to implement a type. Here for example we might have
    \enquote{standard-\LaTeX{}-sectioning} as a template for
    \enquote{sectioning}
  \item One or more \emph{instances}: a specific use case of a template
    where (some) keys are set to known values. We might for example see
    \enquote{\LaTeX{}-section}, \enquote{\LaTeX{}-subsection}, etc.
\end{itemize}

As part of the move from the experimental \pkg{xtemplate} to kernel integration,
the team have revisited the commands provided. The stable set now comprises
\begin{itemize}
\item \cs{NewTemplateType}
\item \cs{DeclareTemplateInterface}
\item \cs{DeclareTemplateCode}
\item \cs{DeclareTemplateCopy}
\item \cs{EditTemplateDefault}
\item \cs{UseTemplate}
\item \cs{DeclareInstance}
\item \cs{DeclareInstanceCopy}
\item \cs{EditInstance}
\item \cs{UseInstance}
\item \cs{IfInstanceExistsTF} and variants
\end{itemize}

To support existing package authors, we have released an updated version of
\pkg{xtemplate} which will work smoothly with the new kernel-level code. The
existing commands provided in \pkg{xtemplate} will continue to work, but
we encourage programmers to move to the set above.


\section{New or improved commands}

\subsection{\pkg{doc}:\ Provide \cs{ProvideDocElement}}

In addition to
\cs{NewDocElement} and \cs{RenewDocElement} we now also offer a
\cs{ProvideDocElement} declaration that does nothing unless the doc
element could be declared with \cs{NewDocElement}. This can be useful
if documentation files are processed both individually and
combined.


\subsection{\pkg{doc}:\ Better support for \pkg{upquote}}

In \LaTeX{} News~37~\cite{39:ltnews37} we wrote that support for the
\pkg{upquote} package was added to the \pkg{doc} package, but back
then this was added only for \cs{verb} and the \env{verbatim}
environments. However,
in a typical \texttt{.dtx} file, most of the code will be in the body
of some \env{macrocode} or \env{macrocode*} environments, and neither
of these was affected by adding \pkg{upquote}.
We have now updated \pkg{doc} so that
\pkg{upquote} alters the quote characters in these environments as
well.
%
\githubissue{1230}

\subsection[\pkg{ifthen}:\ Allow active characters in comparisons]
           {\pkg{ifthen}:\ Guard against active characters in comparisons}
The \cs{ifthenelse} command now ensures that \verb|<|, \verb|=| and
\verb|>| are safe
in numeric tests, even if they have been made active
(typically by \pkg{babel} language shorthands).
%
\githubissue{756}

\subsection%[New conditionals: \cs{IfClassAtLeastT}, etc.]
           {New conditionals:\ \cs{IfClassAtLeastT} and friends}

Around 2020 we added a number of conditionals with CamelCase names, i.e.,
%
\cs{IfClassAtLeastTF},
\cs{IfClassLoadedTF},
\cs{IfClassLoadedWithOptionsFF},
\cs{IfFormatAtLeastTF},
\cs{IfPackageAtLeastTF},
\cs{IfPackageLoadedTF}, and
\cs{IfPackageLoadedWithOptionsTF}
%
to help arranging conditional code that depends on the release of a
particular class, package or format. However, we only provided the
\texttt{TF} commands and not also the \texttt{T} and \texttt{F}
variants. This has now been changed.

In 2023 we introduced \cs{IfFileAtLeastTF} but we did not also provide
\cs{IfFileLoadedTF} at the same time. This conditional and its
\texttt{T} and \texttt{F} variants have now also been added. Remember
that one can only test for files that contain a \cs{ProvidesFile}
line.
%
We did the same for the conditionals \cs{IfLabelExistsTF} and
\cs{IfPropertyExistsTF}, also introduced in 2023.\footnote{By mistake they
were initially introduced under the names \cs{IfLabelExistTF} and
\cs{IfPropertyExistTF}; we corrected that at the same time. This is a
breaking change, but the commands have been used so far only in
kernel code.}
%
\githubissue[s]{1222 1262}


\section{Code improvements}

\subsection{Load packages only at the top level}

Classes and packages must be loaded only by using the commands
\cs{documentclass} and \cs{usepackage} or the class interface commands
such as \cs{LoadClass} or \cs{RequirePackageWithOptions}; moreover,
all of these must always be used at the top level, and not inside a
group of any type (for example, within an environment).
Previously \LaTeX\ did not check this,
which would often lead to low level errors later on if package declarations
were reverted when a group ended.
\LaTeX\ now checks the group level and an error is thrown
if the class or package is loaded in a group.
%
\githubissue{1185}

\subsection{Keep track of lost glyphs}

A while ago we changed the \LaTeX{} default value for
\cs{tracinglostchars} from \texttt{1} to \texttt{2} so that missing
glyphs generate at least a warning, but we forgot to make the same
change to \cs{tracingnone}. Thus, when issuing that command \LaTeX{}
stopped generating warnings about missing glyphs. This has now been
corrected.
%
\githubissue{549}

\subsection{Improve \pkg{fontenc} error message}

If the \pkg{fontenc} package is asked to load a font encoding for which it
doesn't find a suitable \texttt{.def} file then it generates an error
message indicating that the encoding name might be misspelled. That
is, of course, one of the possible causes, but another one is that the
installation is missing a necessary support package, e.g., that no
support for Cyrillic fonts has been installed. The error message text
has therefore been extended to explain the issue more generally.
%
\githubissue{1102}


\subsection{Warn if counter names are problematic}

In the past it was possible to declare, for example,
\verb/\newcounter{index}/ with the side-effect that this defines
\cs{theindex}, even though \LaTeX{} has a \env{theindex} environment
that then got clobbered by the declaration.
%
This has now been changed: if \cs{the}\meta{counter} is already
defined it is not altered, but instead a warning message is displayed.
%
\githubissue{823}

\subsection{Extended information in \cs{listfiles}}

The \cs{listfiles} command provides useful information when finding issues
related to variation in package versions. However, this has to date relied on
the information in the \cs{ProvidesPackage} line, or similar: that can be
misleading if for example a file has been edited locally. We have now extended
\cs{listfiles} to take an optional argument which can include the MD5
hash and size of each file in the \texttt{.log}. Thus for
example you can use
\begin{verbatim}
\listfiles[hashes,sizes]
\end{verbatim}
to get both the file sizes and file hashes in the \texttt{.log} as well as
the standard release information.
%
\githubissue{945}

\subsection{Optimize creation of simple document commands}

Creating document commands using declarations such as \cs{NewDocumentCommand}, etc., provides a very
flexible way of grabbing arguments. When the document command only takes simple
mandatory arguments, this has to-date added an overhead that could be avoided.
We have now refined the internal code path such that \enquote{simple} document
commands avoid almost any overhead at point-of-use, making the results
essentially as efficient as using \cs{newcommand} for low-level \TeX{}
constructs. Note that as \cs{NewDocumentCommand} makes engine-robust commands,
the direct equivalent to \cs{newcommand} is \cs{NewExpandableDocumentCommand}.
%
\githubissue{1189}

\subsection{\texorpdfstring{\raggedright}{}Handling of end-of-lines in \texttt{+v} arguments of \cs{NewDocumentCommand} and friends}

The \texttt{+v} argument type provided by declarations such as \cs{NewDocumentCommand}, etc., allows
grabbing of multiple lines of text in a verbatim-like argument. Almost always,
the result of this grabbing will be used in a typesetting context. Previously,
the end-of-line characters were stored literally as category code~12
(\enquote{other}) \verb|^^M| tokens. However, these are difficult to work with
in general. We have now revised this behavior, such that end-of-line characters
are converted to the \cs{obeyedline} command when parsed by \texttt{+v}-type
arguments.
This change may require adjustments to the source of some documents, but the
enhanced ability of users and programmers to exploit the \texttt{+v}-type
argument means we believe it is necessary.

\subsection{Declaring appropriate sub-encodings for \texttt{TS1} symbol fonts}

In 2020 we incorporated support for the \texttt{TS1} symbol encoding
directly into the kernel and in this way removed the need to load the
\pkg{textcomp} package~\cite{39:ltnews31} to make commands such as
\cs{texteuro} available.

There is, however, a big problem with this \texttt{TS1} symbol
encoding: only very few fonts provide every glyph that is supposed
to be part of \texttt{TS1}. This means that changing font families
might result in certain symbols becoming unavailable. This can be a
major disaster if, for example,
the symbol \cs{texteuro} (\texteuro) or \cs{textohm} (\textohm)
no longer gets printed in your document, just because you altered the
text font family.

To mitigate this problem, in 2020 we also introduced the declaration
\cs{DeclareEncodingSubset}. This declaration is supposed to be used in
font definition files for the \texttt{TS1} encoding to specify which
subset (we have defined 10 common ones) a specific font implements. If
such a declaration is used then missing symbols are automatically
taken from a fallback font.

%% CAR -- this paragraph maybe needs more substantial rewording ??
While this is not perfect, it is the best
you can do other than painstakingly checking that your document
%% CAR: was "painstrickenly" -- should be a word, but!!
uses only glyphs that the font supports
and, if necessary, switching to a different font or avoiding the
missing symbols. See also the discussion in \cite{39:ltnews33}.

To jumpstart the process we also added declarations to the \LaTeX{}
kernel for most of the fonts found in \TL{} at the time\Dash with
the assumption that such declarations would over time be superseded by
declarations in the \texttt{.fd} files. Unfortunately, this hasn't
happened yet (or not often) and so many of the initial declarations
went stale: several fonts got new glyphs added to them (so their
sub-encoding should have been changed but didn't); others (mainly due
to license issues) changed the family name and thus our declarations
became useless and the renamed fonts (now without a declaration) ended
up in the default sub-encoding that offers only a few glyphs;
yet others such as CharisSIL (which triggered the GitHub issue) were
simply not around at the time.

We have, therefore, again attempted to provide the (currently) correct
declarations, but it is obvious that this is not a workable
process. As we do not maintain the fonts we do not have the
information that something has changed, and to regularly check the
ever growing font support bundles is simply not possible. It is
therefore very important that maintainers of font packages not only
provide \texttt{.fd} files but also add such a declaration to every
\texttt{TS1...fd} font definition file that they distribute.

To simplify this process, we now provide a simple \LaTeX{} file
(\texttt{checkencodingsubset.tex}) for determining the correct (safe)
sub-encoding. If run, it asks for a font family and then outputs its
findings, for example, for \texttt{AlgolRevived-TLF} you will get:
\tubcommand{\begin{small}}
\begin{verbatim}
-----------------------------------------
Testing font family AlgolRevived-TLF
(currently TS1-sub-encoding 9)
-----------------------------------------
Some glyphs are missing from sub-encoding 8:
   ==> \textcelsius (137) is missing
   ==> \texttwosuperior (178) is missing
   ==> \textthreesuperior (179) is missing
   ==> \textonesuperior (185) is missing
Some glyphs are missing from sub-encoding 7:
   ==> \texteuro (191) is missing
All glyphs between sub-encoding 6 and 7 exist
All glyphs between sub-encoding 5 and 6 exist
All glyphs between sub-encoding 4 and 5 exist
Some glyphs are missing from sub-encoding 3:
   ==> \textwon (142) is missing
All glyphs between sub-encoding 2 and 3 exist
Some glyphs are missing from sub-encoding 1:
   ==> \textmho (77) is missing
   ==> \textpertenthousand (152) is missing
All glyphs between sub-encoding 0 and 1 exist
All glyphs in core exist
-----------------------------------------
TS1 encoding subset for AlgolRevived-TLF (ok)
Use sub-encoding 9
-----------------------------------------
\end{verbatim}
\tubcommand{\end{small}\noindent}%
This output is meant for human consumption, e.g., you see which glyphs
are missing and why a certain sub-encoding is suggested, but it is not
that hard to use it in a script and extract the suggested sub-encoding
by grepping for the line starting with \texttt{Use sub-encoding}.

Of course, this check will only work if the missing glyphs are really
missing: some fonts placed \enquote{tofu}\footnote{Little squares to
indicate a missing symbol.} into such slots and in this case it looks
to \TeX{} as if the glyph is provided. For example, for the old
Palatino fonts (family \texttt{ppl}) it would report
\begin{verbatim}
-----------------------------------------
TS1 encoding subset for ppl (bad)
Use sub-encoding 0 (not 5)
-----------------------------------------
\end{verbatim}
thus it claims that
all glyphs are provided, while in reality more than twenty are missing
and sub-encoding 5, as declared in the kernel, is in fact correct.
%
\githubissue{1257}


\subsection{Behavior when loading \pkg{textcomp} without options}

When incorporating the \pkg{textcomp} package into the \LaTeX{} kernel, in
the February 2020 release~\cite{39:ltnews31}, the default type of its package messages was changed from package info (\texttt{Package textcomp Info})
to \LaTeX{} kernel info (\texttt{LaTeX Info}). But if \pkg{textcomp}
was loaded without options, the message type got restored to package info.
This restoration has now been canceled.

Note that loading \pkg{textcomp} with one of the options \option{error},
\option{warn}, or \option{info} still changes the message
type to an error, warning, or info message from the \pkg{textcomp} package.
%
\githubissue{1333}


\subsection{Rollback improvements}

When requesting a rollback of the \LaTeX{} kernel and/or packages,
several packages produced the error \enquote{Suspicious rollback date}
because their rollback section contained only data about recent
releases even if the package, such as \pkg{array}, was available since
the first release of \LaTeXe{} in 1994. We now suppress this error and
load the first release that is still part of the distribution (and
hope for the best). This change was implemented for the packages
\pkg{amsmath},
\pkg{array},
\pkg{doc},
\pkg{graphics},
\pkg{longtable},
\pkg{multicol},
\pkg{showkeys},
\pkg{textcomp}, and
\pkg{varioref}.
%
\githubissue{1333}



\section{Documentation improvements}

\subsection{Further updates to the guides}

We reported about the updated versions of \texttt{usrguide} and
\texttt{clsguide} in \LaTeX{} News~37~\cite{39:ltnews37}. We have now
revised \texttt{fntguide} as well to reflect the changes and macros
added to the kernel over the last years of development. Note that the
file name hasn't changed and there is no \texttt{fntguide-historic}.

\section{Bug fixes}

\subsection{Fix inconsistent expansion of the package option list}

\LaTeX{} applies one-step expansion to the raw option list of packages
and classes, so that constructions such as
\begin{verbatim}
  \def\myoptions{opt1,opt2}
  \usepackage[\myoptions]{foo}
\end{verbatim}
are supported.
%% CAR Rewritten sentence:
But if a package declares its options using the new
key/value approach~\cite{39:ltnews35} and it gets loaded a second time,
then its raw option list will not be expanded and so an error might be raised.
This has now been corrected.
%
\githubissue{1298}

\subsection{Fix logic for first mark (page region)}

In the new mark mechanism introduced in June 2022~\cite{39:ltnews35} the result of
\cs{FirstMark} on a two-column page was incorrect if the first column
contained no marks. In that case it should have returned the first
mark of the second column but didn't.
This has now been corrected.

Documents using \cs{leftmark} are not affected, because that command is still
using the old mechanism for now.
%
\githubissue{1359}


\subsection{Struts at the end of footnotes or \texttt{p} columns}

To produce consistent spacing in footnotes and tabular
\texttt{p}-cells \LaTeX{} adds a strut at the beginning and end of
the content.
%%  CAR Rewritten sentences:
%%  It assumed, however, that the footnote or tabular cell ended in
%%  horizontal mode and until now added the struts unconditionally. As a
%%  result, with vertical material at the end of the material this strut
%%  started a new paragraph consisting of a single line with just the
%%  strut inside.
This assumed, however, that the content of the footnote or tabular cell ended in
horizontal mode and so, until now, these struts were unconditionally added;
as a result, if this content ended with vertical material then this strut
started a new paragraph consisting of a single line with just the
strut in it. This has finally been corrected and now the placement
logic for the strut changes when vertical mode is detected.

\emph{(First seen in a bug report for \pkg{footmisc} in combination with
\pkg{bigfoot})}



\section{Changes to packages in the \pkg{amsmath} category}

\subsection{\pkg{amsmath}:\ Correct equation tag placement}

If there is not enough space to place an equation tag on the same line
as the equation then \pkg{amsmath} calculates a suitable offset and it
places the tag above (or below) the equation. In the case of the
\env{gather} environment this offset was not reset at the end, with
the result that it also got applied to any following environment,
resulting in incorrect spacing in certain situations. This has now
been corrected.
%
\githubissue{1289}



%\section{Changes to packages in the \pkg{graphics} category}

\section{Changes to packages in the \pkg{tools} category}

\subsection{\pkg{array}, \pkg{longtable}, \pkg{tabularx}:\ Support tagging}

%% CAR Rewritten sentences
These three packages have been extended so they can now, on request,
produce tagged tabular. This is done by adding a number of sockets (see
\cite{39:ltnews38}) that, by default, do nothing; but when tagged PDF
is requested they get equipped with appropriate plugs.

In the previous \LaTeX{} release this was handled in \texttt{latex-lab}, by
patching the packages when tagging was requested.


\subsection{\pkg{array}:\ No \cs{unskip} in math cells}

Math cells in the standard \env{array} environment of the kernel are
not subject to space removal at the right end of the cell, i.e., explicit
spaces from \cs{hspace} or \verb*|\ |, etc.\ are honored
(normal spaces are automatically ignored in math). In the \pkg{array}
package all spaces got removed by calling \cs{unskip} unconditionally,
regardless of the type of cell.
This difference in behavior has now been removed by correcting the processing of
math cells in \pkg{array}.
%
\githubissue{1323}


\subsection{\pkg{verbatim}:\ \cs{verb} showed visible spaces}

A recent change in the kernel was not reflected in the \pkg{verbatim}
package, with the result that \cs{verb} showed visible spaces
(\verb*/ /) after the package was loaded. This has already been corrected
in a hotfix for the November 2023 release.
%
\githubissue{1160}

\subsection{\pkg{verbatim}:\ Support tabs in \cs{verbatiminput*}}

Mimicking the November 2023 kernel update that allowed \cs{verb*}
to mark tabs as spaces, the \pkg{verbatim} package
has now been updated so that \cs{verbatiminput*} also marks tabs as spaces.
\githubissue{1245}


\subsection{\pkg{multicol}:\ \cs{columnbreak} interferes with mark mechanism}

The \pkg{multicol} package has to keep track of marks (from
\cs{markright} or \cs{markboth}) as part of its output routine code
and can't rely on \LaTeX{} handling that automatically. It does so by
artificially splitting page data with \cs{vsplit} to extract the mark
data. With the introduction of \cs{columnbreak} that code failed
sometimes, because it was not seeing any mark that followed such a
forced column break.

This has now been corrected, but there is further work to do, because
as of now \pkg{multicol} does not yet handle marks using the new mark
mechanism\Dash see the discussion at the beginning of the newsletter.
%
\githubissue{1130}

\subsection{\pkg{showkeys}:\ Allow \cs{newline} in \pkg{amsthm} to work}
%
Previously \pkg{showkeys} added an extra box layer which disabled the \cs{newline}
of \pkg{amsthm} theorem styles. This extra box has now been avoided.
%
\githubissue{1123}

\subsection{\pkg{xr}:\ Support links and properties}
%
The \pkg{xr} package implements a system for eXternal References.
The \pkg{xr-hyper} package (in the \pkg{hyperref} bundle)
extended this to also support links to external documents.
%% CAR: Rewritten sentences:
Using last year's extension of the \cs{label} command, which unified
the label syntax of \LaTeX{} and \pkg{hyperref},
it became possible to merge the two packages and thus make
\pkg{xr-hyper} obsolete.
With this change it is also possible to refer to properties
that are stored in external documents using \cs{RecordProperties}.
%
\githubissue{1180}

\section{Changes to files in the \pkg{cyrillic} category}

\subsection{Correct definition of \cs{k}}

Ages ago, the encoding-specific definitions for various accent
commands were changed to guard against altering some parameter values
non-locally by mistake. For some reason the definition for \cs{k} in
the Cyrillic encodings \texttt{T2A}, \texttt{T2B}, and \texttt{T2C}
didn't get this treatment. This oversight has now been corrected.
%
\githubissue{1148}


\begin{thebibliography}{9}\frenchspacing

%\fontsize{9.3}{11.3}\selectfont


\bibitem{39:Lamport}
Leslie Lamport.
\newblock \emph{{\LaTeX}: {A} Document Preparation System: User's Guide and Reference
  Manual}.
\newblock \mbox{Addison}-Wesley, Reading, MA, USA, 2nd edition, 1994.
\newblock ISBN 0-201-52983-1.
\newblock Reprinted with corrections in 1996.

\bibitem{39:ltnews} \LaTeX{} Project Team.
  \emph{\LaTeXe{} news 1--39}. June, 2024.
  \url{https://latex-project.org/news/latex2e-news/ltnews.pdf}

\bibitem{39:ltnews31} \LaTeX{} Project Team.
  \emph{\LaTeXe{} news 31}. February, 2020.
  \url{https://latex-project.org/news/latex2e-news/ltnews31.pdf}

\bibitem{39:ltnews33} \LaTeX{} Project Team.
  \emph{\LaTeXe{} news 33}. June 2021.\\
  \url{https://latex-project.org/news/latex2e-news/ltnews33.pdf}

\bibitem{39:ltnews35} \LaTeX{} Project Team.
  \emph{\LaTeXe{} news 35}. June 2022.\\
  \url{https://latex-project.org/news/latex2e-news/ltnews35.pdf}

\bibitem{39:ltnews37} \LaTeX{} Project Team.
  \emph{\LaTeXe{} news 37}. June 2023.\\
  \url{https://latex-project.org/news/latex2e-news/ltnews37.pdf}

\bibitem{39:ltnews38} \LaTeX{} Project Team.
  \emph{\LaTeXe{} news 38}. November 2023.
  \url{https://latex-project.org/news/latex2e-news/ltnews38.pdf}

\bibitem{39:deims} Frank Mittelbach and Ulrike Fischer.
  \emph{Enhancing \LaTeX{} to automatically produce
  tagged and accessible PDF}. \textsl{TUGboat} 45:1, 2024.
  \url{https://latex-project.org/publications/indexbyyear/2024/}

  %\bibitem{39:blueprint} Frank Mittelbach and Chris Rowley.
%  \emph{\LaTeX{} Tagged PDF \Dash A blueprint for a large project}.\\
%  \url{https://latex-project.org/publications/indexbyyear/2020/}

\end{thebibliography}

\end{document}