| 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: ltnews33.tex |
| 30 |
% |
| 31 |
% This is issue 33 of LaTeX News. |
| 32 |
|
| 33 |
\NeedsTeXFormat{LaTeX2e}[2020-02-02] |
| 34 |
|
| 35 |
\documentclass{ltnews} |
| 36 |
|
| 37 |
%%CCC Temporary definitions: |
| 38 |
\providecommand\Dash {\unskip ---} |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
%% NOTE: Chris' preferred hyphens! |
| 43 |
%%\showhyphens{parameters} |
| 44 |
\hyphenation{because para-me-ters} |
| 45 |
|
| 46 |
\usepackage[T1]{fontenc} |
| 47 |
|
| 48 |
\usepackage{lmodern,url,hologo} |
| 49 |
|
| 50 |
\usepackage{csquotes} |
| 51 |
\usepackage{multicol} |
| 52 |
|
| 53 |
\providecommand\hook[1]{\texttt{#1}} |
| 54 |
|
| 55 |
\providecommand\meta[1]{$\langle$\textrm{\itshape#1}$\rangle$} |
| 56 |
\providecommand\option[1]{\texttt{#1}} |
| 57 |
\providecommand\env[1]{\texttt{#1}} |
| 58 |
\providecommand\Arg[1]{\texttt\{\meta{#1}\texttt\}} |
| 59 |
|
| 60 |
|
| 61 |
\providecommand\eTeX{\hologo{eTeX}} |
| 62 |
\providecommand\XeTeX{\hologo{XeTeX}} |
| 63 |
\providecommand\LuaTeX{\hologo{LuaTeX}} |
| 64 |
\providecommand\pdfTeX{\hologo{pdfTeX}} |
| 65 |
\providecommand\MiKTeX{\hologo{MiKTeX}} |
| 66 |
\providecommand\CTAN{\textsc{ctan}} |
| 67 |
\providecommand\TL{\TeX\,Live} |
| 68 |
\providecommand\githubissue[2][]{\ifhmode\unskip\fi |
| 69 |
\quad\penalty500\strut\nobreak\hfill |
| 70 |
\mbox{\small\slshape(% |
| 71 |
\href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}% |
| 72 |
{github issue#1 #2}% |
| 73 |
)}% |
| 74 |
\par\smallskip} |
| 75 |
|
| 76 |
% simple solution right now (just link to the first issue if there are more) |
| 77 |
\def\getfirstgithubissue#1 #2\relax{#1} |
| 78 |
|
| 79 |
\providecommand\sxissue[1]{\ifhmode\unskip\fi |
| 80 |
\quad\penalty500\strut\nobreak\hfill |
| 81 |
\mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par} |
| 82 |
|
| 83 |
\providecommand\gnatsissue[2]{\ifhmode\unskip\fi |
| 84 |
\quad\penalty500\strut\nobreak\hfill |
| 85 |
\mbox{\small\slshape(% |
| 86 |
\href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F\getfirstgithubissue#2 \relax}% |
| 87 |
{gnats issue #1/#2}% |
| 88 |
)}% |
| 89 |
\par} |
| 90 |
|
| 91 |
\let\cls\pkg |
| 92 |
\providecommand\env[1]{\texttt{#1}} |
| 93 |
\providecommand\acro[1]{\textsc{#1}} |
| 94 |
|
| 95 |
\vbadness=1400 % accept slightly empty columns |
| 96 |
|
| 97 |
|
| 98 |
\makeatletter |
| 99 |
% maybe not the greatest design but normally we wouldn't have subsubsections |
| 100 |
\renewcommand{\subsubsection}{% |
| 101 |
\@startsection {subsubsection}{2}{0pt}{1.5ex \@plus 1ex \@minus .2ex}% |
| 102 |
{-1em}{\@subheadingfont\colonize}% |
| 103 |
} |
| 104 |
\providecommand\colonize[1]{#1:} |
| 105 |
\makeatother |
| 106 |
|
| 107 |
\let\finalvspace\vspace % for document layout fixes |
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 112 |
\providecommand\tubcommand[1]{} |
| 113 |
\tubcommand{\input{tubltmac}} |
| 114 |
|
| 115 |
\publicationmonth{June} |
| 116 |
\publicationyear{2021} %% --- Draft Version 3p |
| 117 |
|
| 118 |
\publicationissue{33} |
| 119 |
|
| 120 |
\begin{document} |
| 121 |
|
| 122 |
\tubcommand{\addtolength\textheight{4.2pc}} % only for TUB |
| 123 |
|
| 124 |
\maketitle |
| 125 |
{\hyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000 \tableofcontents} |
| 126 |
|
| 127 |
\setlength\rightskip{0pt plus 3em} |
| 128 |
|
| 129 |
|
| 130 |
\medskip |
| 131 |
|
| 132 |
|
| 133 |
\section{Introduction} |
| 134 |
|
| 135 |
The focus of the June 2021 release is to provide further important |
| 136 |
building blocks for the future production of |
| 137 |
reliable tagged PDF output |
| 138 |
(see \cite{33:blueprint}); these enhancements |
| 139 |
are discussed in the next two |
| 140 |
sections. |
| 141 |
|
| 142 |
Subsequent sections describe quite a number of recent smaller |
| 143 |
enhancements and fixes. As usual, more detail on individual changes |
| 144 |
can be found in the \file{changes.txt} files in the distribution |
| 145 |
and, of course, in the documented sources~\cite{33:source2e}. |
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
\section{Extending the hook concept to paragraphs} |
| 150 |
|
| 151 |
Largely triggered by the need for better control of paragraph text |
| 152 |
processing, in particular when producing tagged PDF output, we have |
| 153 |
changed \LaTeX{} so that the kernel gains control both at the start |
| 154 |
and at the end of each paragraph. This is done in a manner that is (or |
| 155 |
should be) transparent to both packages and documents. |
| 156 |
|
| 157 |
Besides the addition of internal control points for the exclusive use |
| 158 |
of the \LaTeX{} kernel, we also implemented four public hooks that can |
| 159 |
be used in packages or documents (via the normal hook management |
| 160 |
declarations) to achieve special effects, etc. Until now, such |
| 161 |
enhancements required redefinitions of \cs{everypar} or \cs{par}, |
| 162 |
which led to the usual issues since such changes can easily conflict |
| 163 |
with changes made by other packages. |
| 164 |
|
| 165 |
The documentation of these new \enquote{paragraph hooks}, together |
| 166 |
with a few examples, is in \file{ltpara-doc.pdf} and, for those who |
| 167 |
want to study it, the (quite interesting) code can be found in |
| 168 |
\file{ltpara-code.pdf}. Additionally, both of these files are included |
| 169 |
as part of the full kernel documentation in \file{source2e.pdf}. |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
\section{Extending the hook concept to commands} |
| 174 |
|
| 175 |
Up to now, hook management covered hooks for only a few core areas, |
| 176 |
such as the hooks for the \cs{shipout} process or those in the |
| 177 |
\env{document} environment, as well as some \enquote {generic} hooks, |
| 178 |
both for file loading (helpful for patching such files) and for |
| 179 |
arbitrary environments (the hooks executed within \cs{begin} and |
| 180 |
\cs{end}). This concept of \enquote{generic hooks} has now been |
| 181 |
extended to provide \hook{/before} and \hook{/after} hooks for any |
| 182 |
(document-level) command\Dash in theory at least. |
| 183 |
|
| 184 |
|
| 185 |
In practice, these new generic \hook{cmd} hooks, especially the |
| 186 |
\hook{cmd/.../after}, hooks may fail with commands that are too |
| 187 |
complex to be automatically patched, breaking if the hook contains any |
| 188 |
code. These restrictions are documented in |
| 189 |
\file{ltcmdhooks-doc.pdf}. |
| 190 |
% |
| 191 |
However, given that these hooks are mainly meant for developers who |
| 192 |
wish to provide better interoperability between different packages, |
| 193 |
and between packages and the \LaTeX{} kernel, these restrictions are, |
| 194 |
we hope, of minor importance. Indeed, for commands where this |
| 195 |
mechanism can't be applied, one is in the same situation as before; |
| 196 |
and for all others there will be a noticeable improvement. |
| 197 |
|
| 198 |
These hooks will be especially important for our current project to |
| 199 |
provide accessible and tagged PDF output~\cite{33:blueprint} because |
| 200 |
we will eventually have to patch many third-party packages, and this |
| 201 |
must be done in controlled and standardized ways. |
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
\section{Other hook business} |
| 207 |
|
| 208 |
|
| 209 |
\subsection{Shipping out a page while bypassing hooks} |
| 210 |
|
| 211 |
In the 2020 October release, several hooks were added to control the |
| 212 |
process of constructing and shipping out a page box: these support, |
| 213 |
for example, the addition of background or foreground material |
| 214 |
to some or all pages. |
| 215 |
|
| 216 |
|
| 217 |
We have now added a command, called \cs{RawShipout}, which does not do |
| 218 |
any rebuilding of the page box and so does not run most of these |
| 219 |
hooks. When using this new command, essential internal book-keeping |
| 220 |
is still carried out, such as updating the \texttt{totalpages} counter |
| 221 |
and adding \texttt{shipout/firstpage} or \texttt{shipout/lastpage} |
| 222 |
material when appropriate. |
| 223 |
|
| 224 |
|
| 225 |
\subsection{A new Lua callback in \pkg{ltshipout}, |
| 226 |
for custom attributes} |
| 227 |
|
| 228 |
For use just before shipping out a page, there is now a \LuaTeX{} |
| 229 |
callback \texttt{pre\_shipout\_filter} to contain final adjustments to |
| 230 |
the box being shipped out. This is particularly useful for |
| 231 |
Lua\TeX\ packages which flag (using, for example, attributes or |
| 232 |
properties) elements on a page in order to apply effects (such as the |
| 233 |
insertion of \enquote{color commands}) to these elements at shipout. |
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
\section{Improved handling of file names} |
| 238 |
|
| 239 |
\subsection[File names with spaces, multiple dots or\\ |
| 240 |
\acro{utf-8} characters] |
| 241 |
{File names with spaces, multiple dots or \acro{utf-8} characters} |
| 242 |
|
| 243 |
In one of the recent \LaTeX{} releases we improved the interface |
| 244 |
for specifying file names so that they can now safely contain spaces |
| 245 |
(as is common these days), |
| 246 |
more than one dot character, and also \acro{utf-8} characters |
| 247 |
outside the \acro{ascii} range. |
| 248 |
In the past this was only possible by applying a special syntax |
| 249 |
in the case of spaces, |
| 250 |
while file names with several dots often failed, |
| 251 |
as did most \acro{utf-8} characters. |
| 252 |
|
| 253 |
|
| 254 |
\subsubsection{Consequences for file names in \cs{include}} |
| 255 |
|
| 256 |
\TeX{} has a built-in rule saying that you can normally leave out the |
| 257 |
extension if it is \texttt{.tex}. Thus \verb=\input{file}= and |
| 258 |
\verb=\input{file.tex}= both load \file{file.tex} (if it exists). |
| 259 |
While this is convenient most of the time, it is a little awkward in |
| 260 |
some scenarios (for example, when both \file{file} and \file{file.tex} |
| 261 |
exist) and also when you manually try to implement the rule. |
| 262 |
|
| 263 |
\LaTeX{} therefore had one special syntax for \cs{include} and |
| 264 |
\cs{includeonly}: they always expected that |
| 265 |
their arguments contain a |
| 266 |
file name\footnote{In the case of \cs{includeonly}, a comma-separated list of such names.} |
| 267 |
with no extension given, |
| 268 |
so that it had to be \texttt{.tex}. Thus, |
| 269 |
when you mistakenly wrote |
| 270 |
\verb=\include{mychap.tex}= (for example, |
| 271 |
because you changed from \cs{input} |
| 272 |
to \cs{include}), |
| 273 |
\LaTeX{} went ahead and looked for the |
| 274 |
file \file{mychap.tex.tex} for inclusion and tried to |
| 275 |
use the file \file{mychap.tex.aux} for internal (auxiliary) information. The reason was that |
| 276 |
\cs{include} had to construct both |
| 277 |
of these file names from the given |
| 278 |
argument and it didn't bother to do |
| 279 |
anything special |
| 280 |
with the supplied |
| 281 |
extension \texttt{.tex}. |
| 282 |
|
| 283 |
With the new implementation this has |
| 284 |
changed: |
| 285 |
the extension \texttt{.tex} |
| 286 |
now gets removed/ignored if it was |
| 287 |
supplied. |
| 288 |
Thus \verb=\include{mychap.tex}= now |
| 289 |
no longer looks for \file{mychap.tex.tex} |
| 290 |
but loads |
| 291 |
\file{mychap.tex} |
| 292 |
and uses \file{mychap.aux}. |
| 293 |
% |
| 294 |
\githubissue{486} |
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
\subsection{Normalization of robust commands in file names} |
| 299 |
|
| 300 |
The handling of file names has been modified so that \verb|\string| is |
| 301 |
applied to normalize robust commands within the file name. |
| 302 |
Previously, for example, \verb|\input{\sqrt{2}}| would cause |
| 303 |
\LaTeX\ to loop indefinitely whereas with |
| 304 |
the new normalization |
| 305 |
it looks for the file named \verb|sqrt {2}.tex| |
| 306 |
(and therefore very likely reports ``file not found''). |
| 307 |
% |
| 308 |
\githubissue{481} |
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
\subsection{Fix for \env{filecontents} with \acro{utf-8} |
| 314 |
chars in the file name} |
| 315 |
|
| 316 |
Since a few releases back, the \env{filecontents} environment has |
| 317 |
allowed \acro{utf-8} characters in the file name. There was, however, |
| 318 |
a bug that would not allow \emph{over}writing a file with \acro{utf-8} |
| 319 |
characters in its name. This has been fixed and now |
| 320 |
\env{filecontents} allows any characters in the file name. |
| 321 |
% |
| 322 |
\githubissue{415} |
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
\section{Updates to the font selection scheme} |
| 327 |
|
| 328 |
|
| 329 |
\subsection{A new hook in \cs{selectfont}} |
| 330 |
|
| 331 |
After \cs{selectfont} has changed the font, we now run a hook (\hook{selectfont}) |
| 332 |
so that packages can make final \mbox{adjustments}. This functionality was |
| 333 |
originally provided by the \pkg{everysel} package but our |
| 334 |
implementation is slightly different and uses the standard hook |
| 335 |
management. |
| 336 |
% |
| 337 |
\githubissue{444} |
| 338 |
|
| 339 |
|
| 340 |
\subsection{Change of font series/shape delayed until \cs{selectfont}} |
| 341 |
|
| 342 |
With the NFSS extensions introduced in 2020, the font series and shape |
| 343 |
settings can be influenced by changes to the font family. The |
| 344 |
settings of these two are now therefore delayed until \cs{selectfont} |
| 345 |
is executed; this avoids unnecessary or incorrect substitutions that |
| 346 |
may otherwise happen due to the order of declarations. |
| 347 |
% |
| 348 |
\githubissue{444} |
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
\section{Glyphs, characters \& encodings} |
| 353 |
|
| 354 |
\subsection{Improved copy\,\&\,paste for \pdfTeX{} documents} |
| 355 |
|
| 356 |
When compiling with \pdfTeX{}, additional information |
| 357 |
(from the file \file{glyphtounicode.tex}) is now added automatically |
| 358 |
to the PDF file in order to improve copying from, and searching in, |
| 359 |
text. |
| 360 |
|
| 361 |
In particular, this allows the most common ligatures to be copied as |
| 362 |
intended from all generated PDF files without the need to explicitly |
| 363 |
load the package \pkg{cmap}. |
| 364 |
% |
| 365 |
\githubissue{465} |
| 366 |
|
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
\subsection{Support for more Unicode characters} |
| 372 |
|
| 373 |
|
| 374 |
\LaTeX\ is quite capable of typesetting characters such as |
| 375 |
\enquote{\d{m}}, but until now it could not access some Unicode |
| 376 |
characters from the Latin Extended Additional block. This meant that, |
| 377 |
for example, there were no Unicode mappings for some characters that |
| 378 |
are used to write Sanskrit words in Latin transliteration (as seen in |
| 379 |
books about yoga, Buddhist philosophy, etc.). |
| 380 |
% |
| 381 |
These characters have now been added so that they can be entered |
| 382 |
directly instead of using \verb=\d{m}=, etc. |
| 383 |
% |
| 384 |
\githubissue{484} |
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
\subsection{More ``dashes'' in encodings \texttt{OT1}, |
| 391 |
\texttt{T1} and \texttt{TU}} |
| 392 |
|
| 393 |
When pasting in text from external sources, one can encounter these |
| 394 |
three Unicode characters |
| 395 |
% |
| 396 |
\texttt{"2011} (non-breaking hyphen), |
| 397 |
\texttt{"2012} (figure dash) and |
| 398 |
\texttt{"2015} (horizontal bar), |
| 399 |
% |
| 400 |
in addition to the more common |
| 401 |
% |
| 402 |
\texttt{"2013} (en-dash) and \texttt{"2014} (em-dash). |
| 403 |
% |
| 404 |
In the past, these first three produced an error message when used |
| 405 |
with \pdfTeX{} (since they are not available in \texttt{OT1} or |
| 406 |
\texttt{T1} encoded fonts). They now typeset an approximation to the |
| 407 |
glyph: e.g., the ``figure dash'' is approximated by an en-dash. |
| 408 |
|
| 409 |
With Unicode engines they either work (when the glyph is contained in |
| 410 |
the selected Unicode font) or they typeset nothing, producing a |
| 411 |
``Missing character'' warning in the log file. |
| 412 |
|
| 413 |
With all engines these characters can also now be accessed using the |
| 414 |
command names \cs{textnonbreakinghyphen}, \cs{textfiguredash} and |
| 415 |
\cs{texthorizontalbar}, respectively. |
| 416 |
% |
| 417 |
\githubissue{404} |
| 418 |
|
| 419 |
|
| 420 |
\subsection{Poor man's \cs{textasteriskcentered}} |
| 421 |
|
| 422 |
The \cs{textasteriskcentered} symbol, used as part of the set of |
| 423 |
footnote symbols in \LaTeX{}, is assumed to be implemented by every |
| 424 |
font with the \texttt{TS1} encoding (when \pdfTeX{} is used) or with |
| 425 |
the \texttt{TU} encoding for the Unicode engines. That assumption is |
| 426 |
unfortunately not correct for all fonts since, for example, the |
| 427 |
\texttt{stix2} fonts don't provide this glyph. A result is that one |
| 428 |
gets missing glyph messages when using \cs{thanks}, etc. |
| 429 |
|
| 430 |
Therefore \cs{textasteriskcentered} now checks whether there is such a |
| 431 |
glyph and, if not, uses a normal \enquote{*}, but slightly enlarged |
| 432 |
and lowered. This may not be perfect in all cases, but it is |
| 433 |
certainly better than no glyph showing up. |
| 434 |
% |
| 435 |
\githubissue{502} |
| 436 |
|
| 437 |
\subsection {The characters from \pkg{textcomp} are in the kernel} |
| 438 |
|
| 439 |
A couple of releases back, the functionality of the \pkg{textcomp} |
| 440 |
package was integrated into the \LaTeX{} kernel. Thus it is no longer |
| 441 |
necessary to load this package in order to access glyphs such as |
| 442 |
\cs{textcopyright}, \cs{texteuro} or \cs{textyen}. |
| 443 |
|
| 444 |
|
| 445 |
At this time the opportunity was also taken to bring some order to the |
| 446 |
chaos surrounding the question: \enquote{which glyphs from the |
| 447 |
\texttt{TS1} encoding are available in a given font?}. This was |
| 448 |
done using an approach based on font families and collections, with |
| 449 |
the differing glyph coverage of the \enquote*{text symbols} being |
| 450 |
indicated by assigning to a font family or collection a ``sub-encoding |
| 451 |
number'' that indicates which glyphs from the \texttt{TS1} encoding are |
| 452 |
guaranteed to be available when using a font from that family or |
| 453 |
collection. This assignment ensures that \LaTeX{} always errs on the |
| 454 |
side of caution, possibly claiming that a glyph is not available even |
| 455 |
when it in fact is. |
| 456 |
|
| 457 |
\iffalse %%FMi but drop that |
| 458 |
|
| 459 |
The documented code for this can be found now in the file |
| 460 |
\file{lttextcomp.dtx} but we hope to publish a full explanation of |
| 461 |
the approach very soon now. |
| 462 |
|
| 463 |
\fi %% FMi potential drop |
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
\subsubsection |
| 468 |
[A note on the history of ``text symbols''] |
| 469 |
{A note on the history of ``text symbols'' and |
| 470 |
the \texttt{TS1} encoding} |
| 471 |
|
| 472 |
|
| 473 |
The \enquote{text symbol encoding} (\texttt{TS1}) was originally |
| 474 |
designed at the Cork Conference as a companion to the \texttt{T1} |
| 475 |
encoding. In it various symbols that are not subject to hyphenation |
| 476 |
got assembled and the \pkg{textcomp} package was developed to make |
| 477 |
them accessible. Unfortunately the \TeX{} community was a bit too |
| 478 |
enthusiastic and included several symbols only available in a few |
| 479 |
\TeX{} fonts and some, such as the capital accents, not available at |
| 480 |
all but developed as part of the reference font implementation. |
| 481 |
|
| 482 |
In hindsight that was a very bad idea because it meant that other |
| 483 |
existing fonts (at the time) and later new fonts that got developed |
| 484 |
were unable to provide the full set of glyphs that made up the |
| 485 |
\texttt{TS1} encoding. For existing free PostScript fonts people |
| 486 |
took the extra effort and produced virtual fonts that faked (some) of |
| 487 |
the missing glyphs. But this was and is a time-consuming effort so it |
| 488 |
was done for only a few basic fonts. But even then, only some fonts |
| 489 |
included all glyphs from \texttt{TS1} so the \pkg{textcomp} already |
| 490 |
back then contained a long list, dividing fonts into 5 categories |
| 491 |
according to which glyphs were implemented and which were missing. |
| 492 |
|
| 493 |
|
| 494 |
When we recently integrated the functionality of the \pkg{textcomp} |
| 495 |
into the \LaTeX{} kernel |
| 496 |
many new free fonts had appeared and |
| 497 |
unfortunately the chaos around the question \enquote{which glyphs of |
| 498 |
the \texttt{TS1} encoding are implemented by which font} had |
| 499 |
increased with it. Not only did one find many new holes, it was next to |
| 500 |
impossible to order the set of fonts into a reasonable set of |
| 501 |
sub-encodings that are contained in each other in a single sequence. |
| 502 |
|
| 503 |
In the end we decided on nine or ten sub-encodings with a reasonable |
| 504 |
number of fonts in each so that all fonts implemented all glyphs of the |
| 505 |
sub-encoding they got mapped to. Thus when typesetting with a font one |
| 506 |
could be sure that a command like \cs{textcopyleft} would either |
| 507 |
typeset the requested character (if the glyph was part of the |
| 508 |
sub-encoding the font belonged to) or it would raise an error, saying |
| 509 |
that the glyph is unavailable in that font. The mapping would ensure |
| 510 |
that \LaTeX{} always errs on the side of caution, because it might |
| 511 |
claim a glyph is unavailable even though in fact it is.\looseness-1 |
| 512 |
|
| 513 |
For example, the old \texttt{pcr} (PostScript Courier) font (as well |
| 514 |
as most other older PS fonts) is mapped to sub-encoding 5 and |
| 515 |
therefore claims that \cs{textasciigrave} is unavailable even though |
| 516 |
in fact for Courier this is not true. If one uses such a font and this |
| 517 |
becomes an issue then there are a couple (suboptimal) possibilities. |
| 518 |
For one, one can alter the mapping of Courier and pretend that belongs |
| 519 |
to a fuller sub-encoding, e.g. |
| 520 |
\begin{verbatim} |
| 521 |
\DeclareEncodingSubset{TS1}{pcr}{2} |
| 522 |
\end{verbatim} |
| 523 |
The downside is, that \LaTeX{} then believes other glyphs that are in fact |
| 524 |
unavailable are also there, so that it is important to check that the |
| 525 |
final document doesn't have some missing glyphs. |
| 526 |
|
| 527 |
An alternative is to pretend that \cs{textasciigrave} can always be |
| 528 |
taken from the \texttt{TS1} encoding (no questions asked): |
| 529 |
\begin{verbatim} |
| 530 |
\DeclareTextSymbolDefault{\textasciigrave}{TS1} |
| 531 |
\end{verbatim} |
| 532 |
Again there is a danger that this is not true when it is used with a |
| 533 |
different font and would then generate a missing glyph. |
| 534 |
|
| 535 |
Finally, and possibly the best solution, if not impossible for other |
| 536 |
reasons, is to simply use a different font, for example, to use the |
| 537 |
\TeX{} Gyre Cursor font (a reimplementation of Courier with a |
| 538 |
much more complete glyph set). |
| 539 |
|
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
\section{New or improved commands} |
| 544 |
|
| 545 |
\subsection{Adjusting \env{itemize} labels with \cs{labelitemfont}} |
| 546 |
|
| 547 |
The command \cs{labelitemfont} was introduced already with the |
| 548 |
\LaTeX\ release 2020-02-02, but back then we forgot to describe it, so |
| 549 |
we do this now. Its purpose is to resolve some bad formatting issues |
| 550 |
with the \env{itemize} environment and also to make it easier to |
| 551 |
adjust the layout when necessary. What could happen in the past was |
| 552 |
that the \env{itemize} labels (e.g., the \textbullet{}) would |
| 553 |
sometimes react to surrounding font changes and could then suddenly |
| 554 |
change shape, for example to \textit{\textbullet}. |
| 555 |
|
| 556 |
This new command \cs{labelitemfont}, which defaults to \cs{normalfont}, |
| 557 |
can be used to provide additional control in the typesetting of |
| 558 |
each label. Thus by choosing |
| 559 |
different settings other effects can be achieved. Here are two |
| 560 |
examples: |
| 561 |
\begin{verbatim} |
| 562 |
\renewcommand\labelitemfont |
| 563 |
{\normalfont\fontfamily{lmss}\selectfont} |
| 564 |
\renewcommand\labelitemfont |
| 565 |
{\rmfamily\normalshape} |
| 566 |
\end{verbatim} |
| 567 |
The first definition will take the symbols from the font Latin Modern |
| 568 |
Sans, so that you get |
| 569 |
% |
| 570 |
\def\myfont#1{{\let\labelitemfont\empty\fontfamily{lmss}\selectfont#1}}% |
| 571 |
% |
| 572 |
\myfont\labelitemi, \myfont\labelitemii, \myfont\labelitemiii\ and |
| 573 |
\!\!\myfont\labelitemiv\,; while the second variant freezes the font family |
| 574 |
and shape, but leaves the series as a variable quantity, so that an |
| 575 |
\env{itemize} in a bold context would show bolder symbols. Making |
| 576 |
\cs{labelitemfont} empty would give you back the buggy old behavior. |
| 577 |
% |
| 578 |
\githubissue{497} |
| 579 |
|
| 580 |
|
| 581 |
\subsection{Producing several marks for one footnote} |
| 582 |
|
| 583 |
It is sometimes necessary to reference the same footnote several |
| 584 |
times: i.e., to produce several footnote marks using the same number |
| 585 |
or symbol. This is now easily possible by placing a \cs{label} within |
| 586 |
the referenced \cs{footnote} and referencing this label by using the |
| 587 |
new command \cs{footref}. This means that footnote marks can be |
| 588 |
generated to refer to arbitrary footnotes (including those in |
| 589 |
\env{minipage}s). |
| 590 |
|
| 591 |
This \cs{footref} command has previously been available, but only when |
| 592 |
using certain classes or the \pkg{footmisc} package. |
| 593 |
% |
| 594 |
\githubissue{482} |
| 595 |
|
| 596 |
|
| 597 |
\subsection{Allow \cs{nocite} in the preamble} |
| 598 |
|
| 599 |
A natural place for \verb=\nocite{*}= would be the preamble of the |
| 600 |
document, but for historical reasons \LaTeX{} issued an error message |
| 601 |
if it was placed there. This command is now allowed in the preamble. |
| 602 |
% |
| 603 |
\githubissue{424} |
| 604 |
|
| 605 |
|
| 606 |
\subsection{Made \cs{\textbackslash} generally robust} |
| 607 |
|
| 608 |
In 2018 most \LaTeX{} user-level commands were made robust, including |
| 609 |
the \cs{\textbackslash} command. However, \cs{\textbackslash} gets |
| 610 |
redefined in various environments and not all these cases were caught: |
| 611 |
such as, in particular, its use as the row delimiter in \env{tabular} |
| 612 |
structures. This has been corrected so that \cs{\textbackslash} |
| 613 |
should now be robust in all circumstances. |
| 614 |
|
| 615 |
|
| 616 |
This change also fixed one anomaly present in the past: |
| 617 |
in a tabular preamble of the form |
| 618 |
\finalvspace*{-.3\baselineskip} |
| 619 |
\begin{quote} |
| 620 |
\hspace*{-.15em}\verb={l=\texttt{\string>}\verb={\raggedright}p{10cm}r}= % stupid class |
| 621 |
\end{quote} |
| 622 |
\finalvspace*{-.3\baselineskip} |
| 623 |
a \cs{\textbackslash} in the second column would have the definition |
| 624 |
used within \cs{raggedright} and so it would not indicate the |
| 625 |
(premature) end of the \env{tabular}. Thus, for example,% |
| 626 |
\finalvspace*{-.3\baselineskip} |
| 627 |
\begin{quote} |
| 628 |
\verb=a & b1 \\ b2 & c \\= |
| 629 |
\end{quote} |
| 630 |
\finalvspace*{-.3\baselineskip} |
| 631 |
was interpreted as a single row of the \env{tabular} (as intended), |
| 632 |
whereas |
| 633 |
\finalvspace*{-.3\baselineskip} |
| 634 |
\begin{quote} |
| 635 |
\verb=a & \\ b2 & c \\= |
| 636 |
\end{quote} |
| 637 |
\finalvspace*{-.3\baselineskip} |
| 638 |
resulted in two rows! This happened because the \cs{\textbackslash} |
| 639 |
directly following the \verb=&= got interpreted while it still had the |
| 640 |
\enquote{end the row} meaning and not yet the \enquote{start a new |
| 641 |
line within the second column} meaning. |
| 642 |
|
| 643 |
With \cs{\textbackslash} now being robust, the special scanning mode |
| 644 |
initiated by the \verb=&= ends immediately when this command is seen: |
| 645 |
the second column is therefore then started, which results in the |
| 646 |
\cs{\textbackslash} being interpreted as being within that column and |
| 647 |
hence as having its expected, within-column, meaning. |
| 648 |
|
| 649 |
We have restored consistency here: now both of the above lines |
| 650 |
produce a single \env{tabular} row. |
| 651 |
% |
| 652 |
As before, you can |
| 653 |
put \cs{raggedright}\cs{arraybackslash} in the \env{tabular}'s |
| 654 |
preamble for a column to ensure that \cs{\textbackslash} is always |
| 655 |
interpreted as a tabular row separator when used in that column. And |
| 656 |
you can use \cs{tabularnewline} to explicitly ask for a new table row, |
| 657 |
even when \cs{\textbackslash} has a different meaning within the |
| 658 |
current column. |
| 659 |
% |
| 660 |
\githubissue{548} |
| 661 |
|
| 662 |
|
| 663 |
|
| 664 |
|
| 665 |
\subsection{Allow extra space between name and address in \pkg{letter} class} |
| 666 |
|
| 667 |
The \cs{opening} command in the \pkg{letter} class expects the name |
| 668 |
and address to be separated by \verb=\\=, but it didn't allow the use |
| 669 |
of an optional argument to add some extra space after the name. The |
| 670 |
code has now been slightly altered to allow this. |
| 671 |
% |
| 672 |
\githubissue{427} |
| 673 |
|
| 674 |
|
| 675 |
|
| 676 |
\subsection{Additions to \cs{tracingall}} |
| 677 |
|
| 678 |
In July 2020 David Jones suggested an extension to \TeX{} engines, |
| 679 |
that added the possibility to set \cs{tracinglostchars}\texttt{=3} in |
| 680 |
order to generate an error message in case some character is missing |
| 681 |
from a font. In previous years, a warning about a missing character |
| 682 |
was silently printed to the \texttt{.log} file\linebreak |
| 683 |
(if $\cs{tracinglostchars}>0$) and to the terminal\linebreak |
| 684 |
(if ${}>1$). This extension was added for \TL{} and \MiKTeX{} |
| 685 |
(except in Knuth's \TeX, of course), |
| 686 |
so that with $\cs{tracinglostchars}>2$ you now also get an |
| 687 |
error message for each missing glyph. |
| 688 |
|
| 689 |
Later, in January 2021, Petr Olšák suggested yet another extension: |
| 690 |
a new primitive |
| 691 |
\mbox{parameter} |
| 692 |
% |
| 693 |
\cs{tracingstacklevels} that, when both it and \cs{tracingmacros} are |
| 694 |
positive, will add to the \mbox{tracing} information for each |
| 695 |
macro a visual indication (using dots) of |
| 696 |
its nesting level in the macro expansion stack. |
| 697 |
|
| 698 |
These changes have both now been added to \LaTeX's debugging macros |
| 699 |
\cs{tracingall} and \cs{tracingnone}, so that these two new extensions |
| 700 |
are activated/deactivated as appropriate, so long as the \TeX{} engine |
| 701 |
supports them. An example document demonstrating these parameters is |
| 702 |
in the linked GitHub issue. |
| 703 |
% |
| 704 |
\githubissue{524} |
| 705 |
|
| 706 |
|
| 707 |
|
| 708 |
|
| 709 |
\section{Code improvements} |
| 710 |
|
| 711 |
\subsection{Execute \cs{par} at the end of \cs{marginpar}} |
| 712 |
|
| 713 |
Previously, \LaTeX{} ended a \cs{marginpar} without ever explicitly |
| 714 |
calling \cs{par}. This command is now explicitly added because it is |
| 715 |
essential to the correct working of the paragraph hooks. |
| 716 |
|
| 717 |
Another case where this issue caused problems was the \pkg{lineno} |
| 718 |
package, where the last line was not numbered if the \cs{marginpar} |
| 719 |
ended without an explicit \cs{par}. |
| 720 |
% |
| 721 |
\githubissue{489} |
| 722 |
|
| 723 |
|
| 724 |
|
| 725 |
\subsection{Execute \cs{AtEndDocument} hook in vertical mode} |
| 726 |
|
| 727 |
Until now \verb=\end{document}= executed the code from the |
| 728 |
\cs{AtEndDocument} hook as its first action. This meant that this |
| 729 |
hook was executed in horizontal mode if the user left no empty line |
| 730 |
after the last paragraph. As a result, one could get a spurious space |
| 731 |
added when, for example, that code contained a \cs{write} |
| 732 |
statement. This was fixed and now \cs{enddocument} first issues a |
| 733 |
\cs{par} to ensure that it always goes into vertical mode. |
| 734 |
% |
| 735 |
\githubissue{385} |
| 736 |
|
| 737 |
|
| 738 |
\subsection{Color groups made permanent} |
| 739 |
|
| 740 |
The use of color in certain \LaTeX{} constructs, especially boxes, |
| 741 |
needs an extra layer of grouping to ensure that the color setting does |
| 742 |
not \emph{escape} and continue outside the box when it shouldn't. |
| 743 |
% |
| 744 |
To support this, the \LaTeX{} kernel defines a number of commands, |
| 745 |
e.g., \cs{color@begingroup} to be used in such places. |
| 746 |
|
| 747 |
|
| 748 |
Until now, these commands were initially set as no-ops and only the |
| 749 |
color packages redefined them to become real groups; this methodology |
| 750 |
complicates the coding as one has to account for a group being present |
| 751 |
or not (\mbox{depending} on what is loaded in the document). |
| 752 |
% |
| 753 |
The kernel therefore now permanently adds these \enquote{color groups}. |
| 754 |
% |
| 755 |
\githubissue{488} |
| 756 |
|
| 757 |
|
| 758 |
\subsection{Provide the raw option list to key/value option handlers} |
| 759 |
|
| 760 |
Before any further processing of the option list, the original |
| 761 |
(un-normalized, \enquote{raw} and unchanged) list of package or class |
| 762 |
options is now saved, as \cs{@raw@opt@...}; this list is not used by |
| 763 |
the standard option processing code but it is now available for use by |
| 764 |
extended class/package processing systems. Note that, for |
| 765 |
compatibility reasons, the standard option processing code has not |
| 766 |
been changed. |
| 767 |
|
| 768 |
|
| 769 |
|
| 770 |
One |
| 771 |
aspect of this |
| 772 |
change does affect the standard \mbox{processing}: any tokens to the |
| 773 |
right of an \texttt{=} |
| 774 |
sign are \mbox{removed} |
| 775 |
from consideration |
| 776 |
when constructing |
| 777 |
the \enquote{\mbox{unused} option list}. |
| 778 |
For example, in |
| 779 |
this release \texttt{clip=true} and |
| 780 |
\texttt{clip=false} both contribute \texttt{clip} to the list of |
| 781 |
options that have been used. |
| 782 |
% |
| 783 |
\githubissue{85} |
| 784 |
|
| 785 |
|
| 786 |
\subsection{New for \pkg{latexrelease}\,: \cs{NewModuleRelease}} |
| 787 |
|
| 788 |
To explain the need for this new feature, we shall consider the |
| 789 |
following example: in the 2020-10-01 release, \LaTeX's new hook |
| 790 |
management system was added to the kernel (see \cite{33:ltnews32}) |
| 791 |
and, as with all changes to the kernel, it was added to |
| 792 |
\pkg{latexrelease}; this made it possible to roll back to a date where |
| 793 |
this module didn't yet exist, or to roll forward from an older |
| 794 |
\LaTeX{} release to get the hook management system (by loading the |
| 795 |
\pkg{latexrelease} package). |
| 796 |
% |
| 797 |
However, this method of rolling back from a later release to the |
| 798 |
2020-10-01 release didn't quite work because it would try to define |
| 799 |
all the commands from \pkg{lthooks} again; and this would of course |
| 800 |
result in the expected errors from commands defined with |
| 801 |
\cs{newcommand} or (as in \pkg{lthooks}) \cs{cs\_new:Npn}. |
| 802 |
|
| 803 |
To solve such issues, we now provide \cs{NewModuleRelease} so that |
| 804 |
completely new modules can be defined using the facilities of |
| 805 |
\pkg{latexrelease} in such a way that, when rolling back or forward, |
| 806 |
the system will know whether the code of the new module has to be read |
| 807 |
or completely ignored. More details on this can be found in the |
| 808 |
\pkg{latexrelease} documentation (get this with |
| 809 |
\verb|texdoc latexrelease|). |
| 810 |
% |
| 811 |
\githubissue{479} |
| 812 |
|
| 813 |
|
| 814 |
\subsection{Small fix for rolling back prior to 2020-02-02} |
| 815 |
|
| 816 |
Whereas the \pkg{latexrelease} package can usually emulate an older |
| 817 |
\LaTeX{} kernel without much problem, rolling back to before the |
| 818 |
2020-02-02 release didn't work properly: this is because the |
| 819 |
management of the \cs{ExplSyntaxOn/Off} status for packages (after an |
| 820 |
\pkg{expl3}-based package is loaded) cannot be removed by the rollback |
| 821 |
without messing up the catcodes. This has been fixed so that rollback |
| 822 |
is now more careful not to leave \cs{ExplSyntaxOn} after a package |
| 823 |
ends. |
| 824 |
% |
| 825 |
\githubissue{504} |
| 826 |
|
| 827 |
|
| 828 |
|
| 829 |
\section{Changes to packages in the \pkg{graphics} category} |
| 830 |
|
| 831 |
|
| 832 |
\subsection{Removed warning when loading graphics files} |
| 833 |
|
| 834 |
A previous release sometimes mistakenly caused a (false) warning |
| 835 |
message to appear when \mbox{using} a generic graphics rule to find |
| 836 |
and load a graphics file with an unknown \mbox{extension}. |
| 837 |
%%CCC removing hyphenation here makes this one line longer. |
| 838 |
This warning would incorrectly say that the file was not found, |
| 839 |
whereas the file would in fact be correctly loaded. The warning now |
| 840 |
doesn't show up in that case. |
| 841 |
% |
| 842 |
\githubissue{516} |
| 843 |
|
| 844 |
|
| 845 |
\subsection{Fixed loading of \texttt{gzip}ped |
| 846 |
PostScript files} |
| 847 |
|
| 848 |
A previous release mistakenly changed the file searching mechanism so |
| 849 |
that compressed PostScript graphics files would raise an error when |
| 850 |
being loaded with \cs{includegraphics}. This has been fixed so that |
| 851 |
\texttt{gzip}ped graphics files now load correctly. |
| 852 |
% |
| 853 |
\githubissue{519} |
| 854 |
|
| 855 |
|
| 856 |
|
| 857 |
|
| 858 |
\section{Changes to packages in the \pkg{tools} category} |
| 859 |
|
| 860 |
\subsection{\pkg{layout}: Added language options} |
| 861 |
|
| 862 |
This package now recognizes \option{japanese} and \option{romanian} as |
| 863 |
language options. |
| 864 |
% |
| 865 |
\githubissue[s]{353 and 529} |
| 866 |
|
| 867 |
|
| 868 |
\subsection{\pkg{array} and \pkg{longtable}: Make \cs{\textbackslash} generally robust} |
| 869 |
|
| 870 |
The fix for this issue was also applied to these packages; see above. |
| 871 |
% |
| 872 |
\githubissue{548} |
| 873 |
|
| 874 |
|
| 875 |
\subsection{\pkg{longtable}: General bug fix update} |
| 876 |
|
| 877 |
This is a minor update to the \pkg{longtable} package that fixes several |
| 878 |
reported bugs: notably the possibility of incorrect page breaks when |
| 879 |
floats appear on the page where a \env{longtable} starts. As this may |
| 880 |
affect page breaking in existing documents, a rollback to |
| 881 |
\pkg{longtable 4.13} (\file{longtable-2020-01-07.sty}) is supported. |
| 882 |
% |
| 883 |
\gnatsissue{tools}{2914 3396 3512} |
| 884 |
\githubissue{133 137 183 464 561} |
| 885 |
|
| 886 |
|
| 887 |
\subsection{\pkg{trace}: Additions to \cs{traceon}} |
| 888 |
|
| 889 |
The \cs{tracingstacklevels} and \cs{tracinglostchars} extensions to |
| 890 |
\cs{tracingall} (see above) were also added to \cs{traceon} in the |
| 891 |
\pkg{trace} package, so its users can also benefit from these new |
| 892 |
debugging possibilities. |
| 893 |
% |
| 894 |
\githubissue{524} |
| 895 |
|
| 896 |
|
| 897 |
\subsection{\pkg{bm}: Better support for commands with optional arguments} |
| 898 |
|
| 899 |
Some uses of optional arguments in \cs{bm} stopped being supported (in |
| 900 |
2004) when \cs{kernel@ifnextchar} was used internally by the format |
| 901 |
instead of \cs{@ifnextchar}. This update handles both versions of this |
| 902 |
command and restores the original \mbox{behavior}. |
| 903 |
|
| 904 |
In addition, package options for guiding the use of \enquote{poor |
| 905 |
man's bold} in fallback situations were added. |
| 906 |
% |
| 907 |
\githubissue{554} |
| 908 |
|
| 909 |
|
| 910 |
|
| 911 |
\section{Changes to packages in the \pkg{amsmath} category} |
| 912 |
|
| 913 |
The fix for issue 548 was also applied in \pkg{amsmath}; see above. |
| 914 |
% |
| 915 |
\githubissue{548} |
| 916 |
|
| 917 |
|
| 918 |
|
| 919 |
|
| 920 |
\medskip |
| 921 |
|
| 922 |
\begin{thebibliography}{9} |
| 923 |
|
| 924 |
\fontsize{9.3}{11.3}\selectfont |
| 925 |
|
| 926 |
\bibitem{33:blueprint} Frank Mittelbach and Chris Rowley: |
| 927 |
\emph{\LaTeX{} Tagged PDF \Dash A blueprint for a large project}.\\ |
| 928 |
\url{https://latex-project.org/publications/indexbyyear/2020/} |
| 929 |
|
| 930 |
\bibitem{33:source2e} |
| 931 |
\emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\ |
| 932 |
\url{https://latex-project.org/help/documentation/} |
| 933 |
|
| 934 |
\bibitem{33:ltnews32} \LaTeX{} Project Team: |
| 935 |
\emph{\LaTeXe{} news 32}.\\ |
| 936 |
\url{https://latex-project.org/news/latex2e-news/ltnews32.pdf} |
| 937 |
|
| 938 |
\end{thebibliography} |
| 939 |
|
| 940 |
|
| 941 |
|
| 942 |
\end{document} |