| 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: ltnews31.tex |
| 30 |
% |
| 31 |
% This is issue 31 of LaTeX News. |
| 32 |
|
| 33 |
\NeedsTeXFormat{LaTeX2e}[2020-02-02] |
| 34 |
|
| 35 |
\documentclass{ltnews} |
| 36 |
\usepackage[T1]{fontenc} |
| 37 |
|
| 38 |
\usepackage{lmodern,url,hologo} |
| 39 |
|
| 40 |
\usepackage{csquotes} |
| 41 |
\usepackage{multicol} |
| 42 |
|
| 43 |
\providecommand\meta[1]{$\langle$\textit{#1}$\rangle$} |
| 44 |
\providecommand\option[1]{\texttt{#1}} |
| 45 |
\providecommand\env[1]{\texttt{#1}} |
| 46 |
\providecommand\file[1]{\texttt{#1}} |
| 47 |
\providecommand\pkg[1]{\texttt{#1}} |
| 48 |
|
| 49 |
|
| 50 |
\providecommand\XeTeX{\hologo{XeTeX}} |
| 51 |
\providecommand\LuaTeX{\hologo{LuaTeX}} |
| 52 |
\providecommand\pdfTeX{\hologo{pdfTeX}} |
| 53 |
\providecommand\MiKTeX{\hologo{MiKTeX}} |
| 54 |
\providecommand\CTAN{\textsc{ctan}} |
| 55 |
\providecommand\TL{\TeX\,Live} |
| 56 |
\providecommand\githubissue[2][]{\ifhmode\unskip\fi |
| 57 |
\quad\penalty500\strut\nobreak\hfill |
| 58 |
\mbox{\small\slshape(% |
| 59 |
\href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}% |
| 60 |
{github issue#1 #2}% |
| 61 |
)}% |
| 62 |
\par\smallskip} |
| 63 |
|
| 64 |
% simple solution right now (just link to the first issue if there are more) |
| 65 |
\def\getfirstgithubissue#1 #2\relax{#1} |
| 66 |
|
| 67 |
\providecommand\sxissue[1]{\ifhmode\unskip\fi |
| 68 |
\quad\penalty500\strut\nobreak\hfill |
| 69 |
\mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par} |
| 70 |
|
| 71 |
\providecommand\gnatsissue[2]{\ifhmode\unskip\fi |
| 72 |
\quad\penalty500\strut\nobreak\hfill |
| 73 |
\mbox{\small\slshape(% |
| 74 |
\href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F#2}% |
| 75 |
{gnats issue #1/#2}% |
| 76 |
)}% |
| 77 |
\par} |
| 78 |
|
| 79 |
\let\cls\pkg |
| 80 |
\providecommand\env[1]{\texttt{#1}} |
| 81 |
|
| 82 |
\vbadness=1400 % accept slightly empty columns |
| 83 |
|
| 84 |
|
| 85 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 86 |
\iffalse % only for TUB production |
| 87 |
\usepackage{graphicx} |
| 88 |
\makeatletter |
| 89 |
% Xe\TeX{} requires reflecting the first E, hence we complain if the |
| 90 |
% graphics package is not present. (For plain documents, this can be |
| 91 |
% loaded via Eplain.) Also, at Barbara's suggestion, if the current |
| 92 |
% font is slanted, we rotate by 180 instead of reflecting so there is at |
| 93 |
% least a chance to look ok. (The magic values here seem more or less |
| 94 |
% ok for \texttt{cmsl} and \texttt{cmti}.) |
| 95 |
% |
| 96 |
% \begin{macrocode} |
| 97 |
\def\tubreflect#1{% |
| 98 |
\@ifundefined{reflectbox}{% |
| 99 |
\TBerror{A graphics package must be loaded for \string\XeTeX}% |
| 100 |
}{% |
| 101 |
\ifdim \fontdimen1\font>0pt |
| 102 |
\raise 1.6ex \hbox{\kern.1em\rotatebox{180}{#1}}\kern-.1em |
| 103 |
\else |
| 104 |
\reflectbox{#1}% |
| 105 |
\fi |
| 106 |
}% |
| 107 |
} |
| 108 |
\def\tubhideheight#1{\setbox0=\hbox{#1}\ht0=0pt \dp0=0pt \box0 } |
| 109 |
\def\XekernbeforeE{-.125em} |
| 110 |
\def\XekernafterE{-.1667em} |
| 111 |
\DeclareRobustCommand{\Xe}{\leavevmode |
| 112 |
\tubhideheight{\hbox{X% |
| 113 |
\setbox0=\hbox{\TeX}\setbox1=\hbox{E}% |
| 114 |
\ifdim \fontdimen1\font>0pt \def\XekernbeforeE{0em}\fi |
| 115 |
\lower\dp0\hbox{\raise\dp1\hbox{\kern\XekernbeforeE\tubreflect{E}}}% |
| 116 |
\kern\XekernafterE}}} |
| 117 |
\def\XeTeX{\Xe\TeX} |
| 118 |
\def\XeLaTeX{\Xe{\kern.11em \LaTeX}} |
| 119 |
\fi |
| 120 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 121 |
|
| 122 |
\publicationday{02} |
| 123 |
\publicationmonth{February} |
| 124 |
\publicationyear{2020} |
| 125 |
|
| 126 |
\publicationissue{31} |
| 127 |
|
| 128 |
\begin{document} |
| 129 |
|
| 130 |
%\addtolength\textheight{4.2pc} % only for TUB |
| 131 |
|
| 132 |
\maketitle |
| 133 |
{\hyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000 \tableofcontents} |
| 134 |
|
| 135 |
\setlength\rightskip{0pt plus 3em} |
| 136 |
|
| 137 |
|
| 138 |
\medskip |
| 139 |
|
| 140 |
|
| 141 |
%\section{Introduction} |
| 142 |
% |
| 143 |
%This document is under construction \ldots |
| 144 |
|
| 145 |
|
| 146 |
\section{Experiences with the \LaTeX\ \texttt{-dev} formats} |
| 147 |
|
| 148 |
As reported in the previous \emph{\LaTeX{} News}, we have made a pre-release |
| 149 |
version of the \LaTeX{} kernel available as \LaTeX\texttt{-dev}. Overall, the |
| 150 |
approach of having an explicit testing release has been positive: it is now |
| 151 |
readily available in \TeX{} systems and is getting real use\\ |
| 152 |
beyond the team. |
| 153 |
|
| 154 |
The current |
| 155 |
release has been tested by a number of people, and we have had valuable feedback |
| 156 |
on a range of the new ideas. This has allowed us to fix issues in several of the |
| 157 |
new features, as described below. |
| 158 |
|
| 159 |
|
| 160 |
We wish to thank all the dedicated users who have been |
| 161 |
trying out the development formats, and we encourage others to do so. Pre-testing |
| 162 |
in this way does mean that, for the vast majority of users, problems are solved |
| 163 |
before they even appear! |
| 164 |
|
| 165 |
|
| 166 |
\section{Concerning this release \ldots (Lua\LaTeX{} engine)} |
| 167 |
|
| 168 |
The new LuaHB\TeX{} engine is Lua\TeX{} with an embedded HarfBuzz library. |
| 169 |
HarfBuzz can be used by setting a suitable renderer in the font |
| 170 |
declaration. A basic interface for that is provided by \pkg{fontspec}. |
| 171 |
This additional font renderer will greatly improve the shaping of |
| 172 |
various scripts when using Lua\LaTeX{}, many of which are currently handled correctly only by |
| 173 |
\XeTeX{}, which always uses HarfBuzz. |
| 174 |
|
| 175 |
To simplify testing of the new engine, binaries have |
| 176 |
already been added to MiK\TeX{} and \TeX{}~Live 2019 and both distributions have already now changed |
| 177 |
the Lua\LaTeX-dev format to use it. |
| 178 |
|
| 179 |
Going forward, Lua\LaTeX\ (and Lua\LaTeX-dev) will both use the LuaHB\TeX{} |
| 180 |
engine. |
| 181 |
The timing of the switch to the LuaHB\TeX{} engine |
| 182 |
depends on the distribution you use |
| 183 |
(for \TeX{}~Live this will be with \TeX{}~Live 2020). |
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
\section{Improved load-times for \pkg{expl3}} |
| 189 |
|
| 190 |
The \LaTeX3 programming layer, \pkg{expl3}, has over the past decade moved from |
| 191 |
being largely experimental to broadly stable. It is now used in a significant |
| 192 |
number of third-party packages, most notably \pkg{xparse}, for defining |
| 193 |
interfaces in cases where no \pkg{expl3} code is \enquote{visible}. In addition, most |
| 194 |
\LaTeX{} documents compiled using \XeTeX{} or \LuaTeX{} load \pkg{fontspec}, |
| 195 |
which is written using \pkg{expl3}. |
| 196 |
|
| 197 |
The \pkg{expl3} layer contains a non-trivial number of macros, and when used |
| 198 |
with the \XeTeX{} and \LuaTeX{} engines, it also loads a large body of Unicode data. |
| 199 |
This means that even on a fast computer, there is a relatively large load time when |
| 200 |
using \pkg{expl3}. |
| 201 |
|
| 202 |
For this release, the team have made adjustments in the \LaTeXe{} kernel to |
| 203 |
pre-load a significant portion of \pkg{expl3} when the format is built. This is |
| 204 |
transparent to the user, other than the significant decrease in document |
| 205 |
processing time: there will be no \enquote{pause} whilst loading the Unicode data |
| 206 |
files. Loading \pkg{expl3} in documents and packages can continue to be done as usual; |
| 207 |
eventually, it will be possible to omit |
| 208 |
\begin{verbatim} |
| 209 |
\RequirePackage{expl3} |
| 210 |
\end{verbatim} |
| 211 |
entirely but, to support older formats, this is still recommended at present. |
| 212 |
|
| 213 |
|
| 214 |
\section[Improvements to \LaTeX{} font selection: NFSS] |
| 215 |
{Improvements to \LaTeX{}'s font selection\\ mechanism (NFSS)} |
| 216 |
|
| 217 |
|
| 218 |
\subsection{Extending the shape management in NFSS} |
| 219 |
|
| 220 |
Over time, more and more fonts have become available for use with |
| 221 |
\LaTeX{}. Many such font families offer additional shapes such as small |
| 222 |
caps italic (\texttt{scit}), small caps slanted (\texttt{scsl}) or |
| 223 |
swash (\texttt{sw}). |
| 224 |
By using \cs{fontshape} those shapes can |
| 225 |
be explicitly selected. For the swash shapes there is also |
| 226 |
\cs{swshape} and \cs{textsw} available. |
| 227 |
|
| 228 |
In the original font selection implementation a request to select a new shape |
| 229 |
always overrode the current shape. With the 2020 release of \LaTeX{} |
| 230 |
this has changed and \cs{fontshape} can now be used to combine small |
| 231 |
capitals with italic, slanted or swash letters, either by explicitly |
| 232 |
asking for \texttt{scit}, etc., or by asking for italics when typesetting |
| 233 |
already in small caps, and so forth. |
| 234 |
|
| 235 |
Using \cs{upshape} will still change italics or slanted back to an |
| 236 |
upright shape but will not any longer alter the small caps setting. To |
| 237 |
change small capitals back to upper/lower case you can now use |
| 238 |
\cs{ulcshape} (or \cs{textulc}) which in turn will not change the font |
| 239 |
with respect to italics, slanted or swash. |
| 240 |
% |
| 241 |
There is one exception: for compatibility reasons \cs{upshape} will |
| 242 |
change small capitals back to upright (\texttt{n} shape), if the |
| 243 |
current shape is \texttt{sc}. This is done so that something like |
| 244 |
\cs{scshape}\allowbreak\texttt{...}\allowbreak\cs{upshape} continues |
| 245 |
to work as before, but we suggest that you don't use that deprecated method in |
| 246 |
new documents. |
| 247 |
|
| 248 |
|
| 249 |
Finally, if you want to |
| 250 |
reset the shape back to normal you can use \cs{normalshape} which is a |
| 251 |
shorthand for \cs{upshape}\cs{ulcshape}. |
| 252 |
|
| 253 |
The way that shapes combine with each other is not hardwired; it is |
| 254 |
customizable and extensible if there is ever a need for this. The |
| 255 |
mappings |
| 256 |
are defined through \cs{DeclareFontShapeChangeRule} and the |
| 257 |
details for developers are documented in \file{source2e.pdf}. |
| 258 |
|
| 259 |
The ideas for this interface extension have been pioneered in |
| 260 |
\pkg{fontspec} by Will Robertson for Unicode engines, and in |
| 261 |
\pkg{fontaxes} by Andreas Bühmann and Michael Ummels for \pdfTeX{}; |
| 262 |
they are by now used in many font support packages. |
| 263 |
|
| 264 |
|
| 265 |
\subsection{Extending the font series management in NFSS} |
| 266 |
|
| 267 |
Many of the newer font families also come provided with additional |
| 268 |
weights (thin, semi-bold, ultra-bold, etc.)\ or several running widths, |
| 269 |
such as condensed or extra-condensed. In some cases the number of |
| 270 |
different values for series (weight plus width) is really impressive: |
| 271 |
for example, Noto Sans |
| 272 |
offers 36 fonts, from ultra-light extra condensed to ultra-bold medium width. |
| 273 |
|
| 274 |
Already in its original design, NFSS supported 9 weight levels, from |
| 275 |
ultra-light (\texttt{ul}) to ultra-bold (\texttt{ub}), and also 9 width |
| 276 |
levels, from ultra-condensed (\texttt{uc}) to ultra-expanded |
| 277 |
(\texttt{ux}): more than enough, even for a font family like Noto |
| 278 |
Sans. Unfortunately, some font support packages nevertheless invented |
| 279 |
their own names, so in recent years you have been able to find all kinds of |
| 280 |
non-standard series names (\texttt{k}, \texttt{i}, \texttt{j} and |
| 281 |
others), making it impossible to combine different fonts successfully |
| 282 |
using the standard NFSS mechanisms. |
| 283 |
|
| 284 |
Over the course of the last year a small number of individuals, |
| 285 |
notably, Bob Tennent, Michael Sharpe and Marc Penninga, have worked hard to |
| 286 |
bring this unsatisfactory situation back under control; so today we are |
| 287 |
happy to report that the internal font support files for more than a |
| 288 |
hundred font families are all back to following the standard NFSS conventions. |
| 289 |
Combining them is now again rather nice and easy, and from a technical |
| 290 |
perspective they can now be easily matched; but, of course, |
| 291 |
there is still the task of choosing combinations that visually work |
| 292 |
well together. |
| 293 |
|
| 294 |
In the original font selection implementation, a request to select a new series |
| 295 |
always overrode the current one. This was reasonable because there |
| 296 |
were nearly no fonts available that offered anything other than a |
| 297 |
medium or a bold series. Now that this has changed and families such |
| 298 |
as Noto Sans are available, combining weight and width into a single |
| 299 |
attribute is no longer appropriate. With the 2020 release of \LaTeX{}, |
| 300 |
the management of series therefore changed to allow independent |
| 301 |
settings of the weight and the width attributes of the series. |
| 302 |
|
| 303 |
For most users this change will be largely transparent as \LaTeX{} |
| 304 |
offers only \cs{textbf} or \cs{bfseries} to select a bolder face (and |
| 305 |
\cs{textmd} and \cs{mdseries} to return to a medium series): there is no |
| 306 |
high-level command for selecting a condensed face, etc. However, using |
| 307 |
the NFSS low-level interface it is now possible to ask for, say, |
| 308 |
\verb=\fontseries{c}\selectfont= to get a condensed |
| 309 |
face (suitable for a marginal note) and that would still allow |
| 310 |
the use of \cs{textbf} inside the note, which would |
| 311 |
select a bold-condensed face (and not a rather odd-looking |
| 312 |
bold-extended face in the middle of condensed type). |
| 313 |
|
| 314 |
The expectation is that this functionality will be used largely by |
| 315 |
class and package designers but, given that the low-level NFSS |
| 316 |
commands are usable on the document level and that they are not really |
| 317 |
difficult to apply, there are probably also a number of users who will |
| 318 |
enjoy using these new possibilities that bring \LaTeX{} back into the |
| 319 |
premier league for font usage. |
| 320 |
|
| 321 |
The ways in which the different series values combine with each other is not |
| 322 |
hardwired but is again customizable and extensible. The mappings are |
| 323 |
defined through \cs{DeclareFontSeriesChangeRule} and the details for |
| 324 |
developers are documented in \file{source2e.pdf}. |
| 325 |
|
| 326 |
|
| 327 |
\subsection{Font series defaults per document family} |
| 328 |
|
| 329 |
With additional weights and widths now being available in |
| 330 |
many font families, it is more likely that somebody will want to |
| 331 |
match, say, a medium weight serif family with a semi-light sans serif |
| 332 |
family, or that with one family one wants to use the bold-extended |
| 333 |
face when \cs{textbf} is used, while with another it should be bold |
| 334 |
(not extended) or semibold, etc. |
| 335 |
|
| 336 |
In the past this kind of extension was provided by Bob Tennent's |
| 337 |
\pkg{mweights} package, which has been used in many font |
| 338 |
support packages. |
| 339 |
With the 2020 release of \LaTeX{} this feature is now available out |
| 340 |
of the box. In addition we also offer a document-level interface to adjust the |
| 341 |
behavior of the high-level series commands \cs{textbf}, \cs{textmd}, and of their |
| 342 |
declaration forms \cs{bfseries} and \cs{mdseries}, so that they can |
| 343 |
have different effects for the serif, sans serif and typewriter |
| 344 |
families used in a document. |
| 345 |
|
| 346 |
For example, specifying |
| 347 |
\begin{verbatim} |
| 348 |
\DeclareFontSeriesDefault[rm]{bf}{sb} |
| 349 |
\DeclareFontSeriesDefault[tt]{md}{lc} |
| 350 |
\end{verbatim} |
| 351 |
in the document preamble would result in \cs{textbf} producing |
| 352 |
semi-bold (\texttt{sb}) when typesetting in a roman typeface. |
| 353 |
The second line says that the |
| 354 |
typewriter default face (i.e., the medium series \texttt{md}) should be |
| 355 |
a light-condensed face. The optional argument here can be either |
| 356 |
\texttt{rm}, \texttt{sf} or \texttt{tt} to indicate one of the three |
| 357 |
main font families in a document; if omitted you will change the |
| 358 |
overall document default instead. In the first mandatory argument you |
| 359 |
specify either \texttt{md} or \texttt{bf} and the second mandatory |
| 360 |
argument then gives the desired series value in NFSS nomenclature. |
| 361 |
|
| 362 |
|
| 363 |
\subsection{Handling of nested emphasis} |
| 364 |
|
| 365 |
In previous releases of \LaTeX{}, nested \cs{emph} commands |
| 366 |
automatically alternated between italics and upright. This mechanism |
| 367 |
has now been generalised so that you can now specify for arbitrary nesting |
| 368 |
levels how emphasis should be handled. |
| 369 |
|
| 370 |
The declaration \cs{DeclareEmphSequence} expects a comma separated |
| 371 |
list of font declarations corresponding to increasing levels of |
| 372 |
emphasis. For example, |
| 373 |
\begin{verbatim} |
| 374 |
\DeclareEmphSequence{\itshape,% |
| 375 |
\upshape\scshape,\itshape} |
| 376 |
\end{verbatim} |
| 377 |
uses italics for the first, small capitals for the second, and italic |
| 378 |
small capitals for the third level (provided you use a font that |
| 379 |
supports these shapes). If there are more nesting levels than |
| 380 |
provided, \LaTeX{} uses the declarations stored in \cs{emreset} (by |
| 381 |
default \cs{ulcshape}\cs{upshape}) for the next level and then |
| 382 |
restarts the list. |
| 383 |
|
| 384 |
The mechanism tries to be \enquote{smart} by verifying that the given |
| 385 |
declarations actually alter the current font. If not, it continues and |
| 386 |
tries the next level---the assumption being that there was already a |
| 387 |
manual font change in the document to the font that is now supposed to |
| 388 |
be used for emphasis. |
| 389 |
% |
| 390 |
Of course, this only works if the declarations in the list's entries |
| 391 |
actually change the font and not, for example, just the color. In such |
| 392 |
a scenario one has to add \cs{emforce} to the entry, which directs the |
| 393 |
mechanism to use the entry, even if the font attributes appear to be |
| 394 |
unchanged. |
| 395 |
|
| 396 |
|
| 397 |
\subsection{Providing font family substitutions} |
| 398 |
|
| 399 |
Given that \pdfTeX{} can only handle fonts with up to 256 glyphs, a |
| 400 |
single font encoding can only support a few languages. The \texttt{T1} |
| 401 |
encoding, for example, does support many Latin-based scripts, |
| 402 |
but if you want to write in Greek or Cyrillic then you will need to switch |
| 403 |
encodings to \texttt{LGR} or \texttt{T2A}. Given that not every font |
| 404 |
family offers glyphs in such encodings, you may end up with some |
| 405 |
default family (e.g., Computer Modern) that doesn’t blend in well |
| 406 |
with the chosen document font. For such cases NFSS now offers |
| 407 |
\cs{DeclareFontFamilySubstitution}, for example: |
| 408 |
\begin{verbatim} |
| 409 |
\DeclareFontFamilySubstitution{LGR} |
| 410 |
{Montserrat-LF}{IBMPlexSans-TLF} |
| 411 |
\end{verbatim} |
| 412 |
tells \LaTeX{} that if you are typesetting in the sans serif font |
| 413 |
\texttt{Montserrat-LF} and the Greek encoding \texttt{LGR} is asked |
| 414 |
for, then \LaTeX{} should use \texttt{IBMPlexSans-TLF} to fulfill |
| 415 |
the encoding request. |
| 416 |
|
| 417 |
The code is based on ideas from the \pkg{substitutefont} |
| 418 |
package by Günter Milde, but the implementation is different. |
| 419 |
|
| 420 |
|
| 421 |
\subsection{Providing all text companion symbols by default} |
| 422 |
|
| 423 |
The text companion encoding \texttt{TS1} was originally not available |
| 424 |
by default, but only when the \pkg{textcomp} package was loaded. The |
| 425 |
main reason for this was limited availability of fonts with this encoding other than |
| 426 |
Computer Modern; another was the memory restrictions back in the nineties. |
| 427 |
These days neither limitation remains, so with the 2020 release all |
| 428 |
the symbols provided with the \pkg{textcomp} package are available out |
| 429 |
of the box. |
| 430 |
|
| 431 |
Furthermore, an intelligent substitution mechanism has been |
| 432 |
implemented so that glyphs missing in some fonts are automatically |
| 433 |
substituted with default glyphs that are sans serif if you typeset in |
| 434 |
\cs{textsf} and monospaced if you typeset using \cs{texttt}. In the |
| 435 |
past they were always taken from Computer Modern Roman if substitution |
| 436 |
was necessary. |
| 437 |
|
| 438 |
|
| 439 |
\typeout{^^J^^J******************************************} |
| 440 |
\typeout{** This example needs LaTeX 2020-02-02 or later} |
| 441 |
\typeout{** to come out correctly !!} |
| 442 |
\typeout{******************************************^^J^^J} |
| 443 |
|
| 444 |
\textsf{This is most noticeable with \cs{oldstylenums} which are now |
| 445 |
taken from \texttt{TS1} so that you no longer get |
| 446 |
\textrm{\oldstylenums{1234}} but \oldstylenums{1234} when typesetting |
| 447 |
in sans serif fonts}\texttt{ and \oldstylenums{1234} when using |
| 448 |
typewriter fonts.} |
| 449 |
|
| 450 |
If there ever is a need to use the original (inferior) definition, |
| 451 |
then that remains available as \cs{legacyoldstylenums}; and to fully |
| 452 |
revert to the old behavior there is also |
| 453 |
\cs{UseLegacyTextSymbols}. The latter declaration reverts \cs{oldstylenums} |
| 454 |
and also changes the footnote symbols, such as \cs{textdagger}, |
| 455 |
\cs{textparagraph}, etc., to pick up their glyphs from the math |
| 456 |
fonts instead of the current text font (this means they always keep |
| 457 |
the same shape and do not nicely blend in with the text font). |
| 458 |
|
| 459 |
With the text companion symbols as part of the kernel, it is normally |
| 460 |
no longer necessary to load the \pkg{textcomp} package, but for |
| 461 |
backwards compatibility this package will remain available. There is, |
| 462 |
however, one use case where it remains useful: if you load the package |
| 463 |
with the option \option{error} or \option{warn} then substitutions |
| 464 |
will change their behavior and result in a \LaTeX{} error or a |
| 465 |
\LaTeX{} warning (on the terminal), respectively. Without the package |
| 466 |
the substitution information only appears in the \texttt{.log} |
| 467 |
file. If you use the option \option{quiet}, then even the information in |
| 468 |
the transcript is suppressed (which is not really recommended). |
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
\subsection{New \texttt{alias} size function for use in \texttt{.fd} files} |
| 473 |
|
| 474 |
|
| 475 |
Most of the newer fonts supported in \TeX{} have been set up with the |
| 476 |
\texttt{autoinst} tool by Marc Penninga. In the past, this program |
| 477 |
set up each font using the face name chosen by that font's designer, |
| 478 |
e.g., \enquote{\texttt{regular}}, \enquote{\texttt{bold}}, etc. |
| 479 |
These face names were then mapped by substitution to |
| 480 |
the standard NFSS series names, i.e., \enquote{\texttt{m}} |
| 481 |
or \enquote{\texttt{b}}. |
| 482 |
As a result one got unnecessary substitution warnings such as |
| 483 |
\enquote{\texttt{Font T1/abc/bold/n not found, using T1/abc/b/n instead}}. |
| 484 |
|
| 485 |
%FMi the message above is actually different and longer but ... |
| 486 |
|
| 487 |
We now provide a new NFSS size function, \texttt{alias}, that can |
| 488 |
and will be used by \texttt{autoinst} in the future. It provides the |
| 489 |
same functionality as the \texttt{subst} function but is less vocal |
| 490 |
about its actions, so that only significant font substitutions show |
| 491 |
up as warnings. |
| 492 |
|
| 493 |
|
| 494 |
\subsection{Suppress unnecessary font substitution warnings} |
| 495 |
|
| 496 |
Many sans serif fonts do not have real italics but usually only |
| 497 |
oblique/slanted shapes, so the substitution of slanted for italics is |
| 498 |
natural and in fact many designers talk about italic sans serif faces |
| 499 |
even if in reality they are oblique. |
| 500 |
|
| 501 |
With nearly all sans serif font families, the \LaTeX{} support files |
| 502 |
therefore silently substitute slanted if you ask for \cs{itshape} or |
| 503 |
\cs{textit}. This is also true for Computer Modern in \texttt{T1} |
| 504 |
encoding but in \texttt{OT1} you got a warning on the terminal even |
| 505 |
though there is nothing you can do about it. This has now been changed |
| 506 |
to an information message only, written to the \texttt{.log} file. % |
| 507 |
\githubissue{172} |
| 508 |
|
| 509 |
\vspace{-\smallskipamount} |
| 510 |
\pagebreak |
| 511 |
|
| 512 |
\section{Other changes to the \LaTeX{} kernel} |
| 513 |
|
| 514 |
|
| 515 |
\subsection{UTF-8 characters in package descriptions} |
| 516 |
|
| 517 |
In 2018 we made UTF-8 the default input encoding for \LaTeX{} but we |
| 518 |
overlooked the case of non-ASCII characters in the short |
| 519 |
package descriptions used in declarations, e.g., in the optional argument to |
| 520 |
\cs{ProvidesPackage}. |
| 521 |
They worked (sometimes) before, but the switch to UTF-8 made them always |
| 522 |
generate an error. |
| 523 |
This has been corrected. |
| 524 |
% |
| 525 |
\githubissue{52} |
| 526 |
|
| 527 |
|
| 528 |
\subsection[Fix inconsistent hook setting when\texorpdfstring{\\}{} loading packages]% |
| 529 |
{Fix inconsistent hook setting when loading packages} |
| 530 |
|
| 531 |
As part of loading a package, the command |
| 532 |
\texttt{\textbackslash}\textit{package}\texttt{.sty-h@@k} gets |
| 533 |
defined. However, attempting to load a package a second time resulted |
| 534 |
in this hook becoming undefined again. Now the hook remains defined |
| 535 |
so that extra loading attempts do not change the state of |
| 536 |
\LaTeX{} (relevant only to package developers). |
| 537 |
% |
| 538 |
\githubissue{198} |
| 539 |
|
| 540 |
|
| 541 |
\subsection{Avoid spurious warning if \texttt{LY1} is made the default encoding} |
| 542 |
|
| 543 |
Making \texttt{LY1} the default encoding, as is done by some font support |
| 544 |
packages, gave a spurious warning even if \cs{rmdefault} was changed first. |
| 545 |
This was corrected. |
| 546 |
% |
| 547 |
\githubissue{199} |
| 548 |
|
| 549 |
\enlargethispage{-\smallskipamount} |
| 550 |
\vspace{-\medskipamount} |
| 551 |
|
| 552 |
\subsection{Ensure that \cs{textbackslash} remains robust} |
| 553 |
|
| 554 |
In the last release we made most document-level commands robust, but |
| 555 |
\cs{textbackslash} became fragile again |
| 556 |
whenever \cs{raggedright} or similar typesetting |
| 557 |
was used. This has been fixed. |
| 558 |
% |
| 559 |
\githubissue{203} |
| 560 |
|
| 561 |
|
| 562 |
\subsection{Make math delimiters robust in a different way} |
| 563 |
|
| 564 |
Making math delimiters robust caused an issue in some situations. This |
| 565 |
has been corrected. This also involved a correction to \pkg{amsmath}. |
| 566 |
% |
| 567 |
\githubissue{251} |
| 568 |
|
| 569 |
|
| 570 |
\subsection{Allow more write streams with \env{filecontents} in \LuaTeX} |
| 571 |
|
| 572 |
Most \TeX{} engines only support a maximum of sixteen concurrently |
| 573 |
open write streams, and when those have been used up, then |
| 574 |
\texttt{filecontents} or any other code trying to open one |
| 575 |
will fail. |
| 576 |
In \LuaTeX{} more write streams are available and those can |
| 577 |
also now be utilised. |
| 578 |
% |
| 579 |
\githubissue{238} |
| 580 |
|
| 581 |
\subsection{Allow spaces in \env{filecontents} option list} |
| 582 |
|
| 583 |
Leaving spaces or newlines in the option list prevented the options |
| 584 |
from being correctly recognized. This\\ |
| 585 |
has been corrected. |
| 586 |
% |
| 587 |
\githubissue{256} |
| 588 |
|
| 589 |
|
| 590 |
\subsection{New \texttt{reverselist} Lua callback type} |
| 591 |
|
| 592 |
A new callback type, \texttt{reverselist}, was added:\\ |
| 593 |
\texttt{post\_mlist\_to\_hlist\_filter} and \texttt{post\_linebreak\_filter} |
| 594 |
are now of this type. |
| 595 |
|
| 596 |
|
| 597 |
\section{Changes to packages in the \pkg{graphics} category} |
| 598 |
|
| 599 |
\subsection[Make \pkg{color}/\pkg{graphics} user-level commands robust] |
| 600 |
{Make \pkg{color} \& \pkg{graphics} user-level commands robust} |
| 601 |
|
| 602 |
Some of the user-level commands in \pkg{color}, \pkg{graphics} and |
| 603 |
\pkg{graphicx}, |
| 604 |
%\pagebreak |
| 605 |
such as \cs{textcolor} or \cs{includegraphics}, were |
| 606 |
still fragile so didn't work in moving arguments.\\ |
| 607 |
All of these are now robust. |
| 608 |
% |
| 609 |
\githubissue{208} |
| 610 |
|
| 611 |
|
| 612 |
\section{Changes to packages in the \pkg{tools} category} |
| 613 |
|
| 614 |
\subsection{Fixed column depth in boxed \env{multicols}} |
| 615 |
|
| 616 |
The \env{multicols} environment was setting \cs{maxdepth} when |
| 617 |
splitting boxes; but, due to the way the internal interfaces of \LaTeX{} are |
| 618 |
designed, it should have used \cs{@maxdepth} instead. As a result, |
| 619 |
balanced boxed multicols sometimes ended up having different heights |
| 620 |
even if they had exactly the same content. |
| 621 |
% |
| 622 |
\githubissue{190} |
| 623 |
|
| 624 |
|
| 625 |
\subsection{Ensure that \env{multicols} does not lose text} |
| 626 |
|
| 627 |
The \env{multicols} environment needs a set of consecutively numbered boxes to |
| 628 |
collect column material. The way those got allocated could result in |
| 629 |
disaster if other packages allocated most boxes below box~255 (which |
| 630 |
\TeX{} always uses for the output page). In the original |
| 631 |
implementation that problem was avoided because one could only |
| 632 |
allocate box numbers below~255, but nowadays the \LaTeX{} allocation routine |
| 633 |
allows allocating box numbers both below and above~255. So the assumption that |
| 634 |
when asking for, say, 20~boxes you always get a consecutive sequence of~20 box |
| 635 |
register numbers became no longer true: |
| 636 |
some of the column material could |
| 637 |
end up in box~255, where it would get overwritten. This has now been corrected by |
| 638 |
allocating all necessary boxes with numbers above~255 whenever there aren't enough |
| 639 |
lower-numbered registers available. |
| 640 |
% |
| 641 |
\githubissue{237} |
| 642 |
|
| 643 |
\subsection{Allow spaces in \cs{hhline} arguments} |
| 644 |
|
| 645 |
The \verb|\hhline| command, which allows the |
| 646 |
specification of rule segments in \env{tabular} environments, now |
| 647 |
allows (but ignores) spaces between its tokens: so |
| 648 |
\verb|\hhline{: = : =}| is now allowed and is equivalent to |
| 649 |
\verb|\hhline{:=:=}|. This matches similar token arguments in \LaTeX{} |
| 650 |
such as the \verb|[h t p]| argument on floats. A similar change has |
| 651 |
been made to the extended \verb|\hhline| command in the |
| 652 |
\pkg{colortbl} package. |
| 653 |
% |
| 654 |
\githubissue{242} |
| 655 |
|
| 656 |
|
| 657 |
|
| 658 |
\section{\LaTeX{} requirements on engine primitives} |
| 659 |
|
| 660 |
Since the finalization of \eTeX{} in 1999, a number of additional `utility' |
| 661 |
primitives have been added to \pdfTeX{}. Several of these are broadly useful |
| 662 |
and have been required by \pkg{expl3} for some time, most notably |
| 663 |
\cs{pdfstrcmp}. Over time, a common set of these `post-\eTeX{}' primitives have |
| 664 |
been incorporated into \XeTeX{} and (u)p-\TeX{}; they were already available in |
| 665 |
\LuaTeX{}. |
| 666 |
|
| 667 |
A number of these additional primitives are needed to support new or improved |
| 668 |
functionality in \LaTeX{}. This is seen for example in the improved UTF-8 handling, |
| 669 |
which uses \cs{ifincsname}. The following primitive |
| 670 |
functionality (which in \LuaTeX{} may be achieved using Lua code) |
| 671 |
will therefore be \emph{required} by the \LaTeX{} kernel and core\\ |
| 672 |
packages from the start of 2021: |
| 673 |
% |
| 674 |
\begingroup\setlength\columnsep{0pt} |
| 675 |
\begin{multicols}{2} |
| 676 |
\fontsize{9.3}{11.3}\selectfont |
| 677 |
\begin{itemize} |
| 678 |
\item \cs{expanded} |
| 679 |
\item \cs{ifincsname} |
| 680 |
\item \cs{ifpdfprimitive} |
| 681 |
\item \cs{pdfcreationdate} |
| 682 |
\item \cs{pdfelapsedtime} |
| 683 |
\item \cs{pdffiledump} |
| 684 |
\item \cs{pdffilemoddate} |
| 685 |
\item \cs{pdffilesize} |
| 686 |
\item \cs{pdflastxpos} |
| 687 |
\item \cs{pdflastypos} |
| 688 |
\item \cs{pdfmdfivesum} |
| 689 |
\item \cs{pdfnormaldeviate} |
| 690 |
\item \cs{pdfpageheight} |
| 691 |
\item \cs{pdfpagewidth} |
| 692 |
%\end{itemize} |
| 693 |
%\end{multicols} |
| 694 |
% |
| 695 |
% very manual! multicol needs update to detect that it is used |
| 696 |
% inside twocolumn! |
| 697 |
% |
| 698 |
%\begin{multicols}{2} |
| 699 |
%\begin{itemize} |
| 700 |
\item \cs{pdfprimitive} |
| 701 |
\item \cs{pdfrandomseed} |
| 702 |
\item \cs{pdfresettimer} |
| 703 |
\item \cs{pdfsavepos} |
| 704 |
\item \cs{pdfsetrandomseed} |
| 705 |
\item \cs{pdfshellescape} |
| 706 |
\item \cs{pdfstrcmp} |
| 707 |
\item \cs{pdfuniformdeviate} |
| 708 |
\end{itemize} |
| 709 |
\end{multicols} |
| 710 |
\endgroup |
| 711 |
For ease of reference, these primitives will be referred to as the |
| 712 |
`\pdfTeX{} utilities'. With the exception of \cs{expanded}, these have been |
| 713 |
present in \pdfTeX{} since the release of version 1.40.0 in 2007; \cs{expanded} |
| 714 |
was added for \TeX{}~Live 2019. Similarly, the full set of these utility primitives |
| 715 |
has been available in \XeTeX{} from the 2019 \TeX{}~Live release, and has |
| 716 |
always been available in \LuaTeX{} (some by Lua emulation). |
| 717 |
% |
| 718 |
The Japanese p\TeX{} and |
| 719 |
up\TeX{} gained all of the above (except \cs{ifincsname}) for \TeX{}~Live |
| 720 |
2019 and will both have that primitive also from the 2020 release onward. |
| 721 |
|
| 722 |
At the same time, engines which are fully Unicode-capable must provide |
| 723 |
the following three primitives: |
| 724 |
|
| 725 |
\vspace{-\smallskipamount} |
| 726 |
\begingroup\setlength\columnsep{0pt} |
| 727 |
\begin{multicols}{2} |
| 728 |
\fontsize{9.3}{11.3}\selectfont |
| 729 |
\begin{itemize} |
| 730 |
\item \cs{Uchar} |
| 731 |
\quad \textbullet{}\hspace{\labelsep}\cs{Ucharcat} |
| 732 |
\item \cs{Umathcode} |
| 733 |
\end{itemize} |
| 734 |
\end{multicols} |
| 735 |
\vspace{-\smallskipamount} |
| 736 |
\endgroup |
| 737 |
% |
| 738 |
Note that it has become standard practice to check for Unicode-aware engines |
| 739 |
by using the existence of the \cs{Umathcode} primitive. As such, this is already |
| 740 |
a requirement: engines lacking these primitives cannot use Unicode features |
| 741 |
of the \LaTeXe{} kernel or \pkg{expl3}. Note also that up\TeX{} can |
| 742 |
handle Unicode but it is not classed as a Unicode engine by the |
| 743 |
base \LaTeX\ code. |
| 744 |
|
| 745 |
\enlargethispage*{\baselineskip} |
| 746 |
\vspace{3.9pt} % manual adjustment to align the bottom |
| 747 |
|
| 748 |
|
| 749 |
\begin{thebibliography}{9} |
| 750 |
|
| 751 |
\fontsize{9.3}{11.3}\selectfont |
| 752 |
|
| 753 |
\bibitem{31:devformat} Frank Mittelbach: |
| 754 |
\emph{The |
| 755 |
\LaTeX{} release workflow and the \LaTeX{} dev formats}. |
| 756 |
In: TUGboat, 40\#2, 2019. |
| 757 |
\url{https://latex-project.org/publications/} |
| 758 |
|
| 759 |
\bibitem{31:fntguide} \LaTeX{} Project Team: |
| 760 |
\emph{\LaTeXe{} font selection}.\\ |
| 761 |
\url{https://latex-project.org/help/documentation/fntguide.pdf} |
| 762 |
|
| 763 |
\bibitem{31:site-doc} |
| 764 |
\emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\ |
| 765 |
\url{https://latex-project.org/help/documentation/} |
| 766 |
|
| 767 |
\end{thebibliography} |
| 768 |
|
| 769 |
|
| 770 |
\end{document} |