summaryrefslogtreecommitdiff
path: root/macros/latex-dev/base/ltnews36.tex
blob: 55de98628cf202b85868f0f621c8a402a9705562 (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
% \iffalse meta-comment
%
% Copyright 2021-2022
% 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: ltnews36.tex
%
% This is issue 36 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 parameters parameter}

\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{}  % 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


\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

\let\finalvspace\vspace          % for document layout fixes

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

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

\publicationmonth{November}
\publicationyear{2022  --- DRAFT version for upcoming release}

\publicationissue{36}

\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}

\emph{to be written}


\subsection{Auto-detecting key--value arguments}

To allow extension of the core \LaTeX{} syntax, \pkg{ltcmd} now supports
a \texttt{={...}} modifier when grabbing arguments. This modifier instructs
\LaTeX{} that the argument should be passed to the underlying code as
a set of keyvals. If the argument does not \enquote{look like} a set
of keyvals, it will be converted into a single key--value pair, with
the argument to \texttt{=} specifying the name of that key. For
example, the \cs{caption} command could be defined as
\begin{verbatim}
  \DeclareDocumentCommand\caption
         {s ={short-text}+O{#3} +m}
         {...}
\end{verbatim}
which would mean that if the optional argument does \emph{not}
contain keyval data, it will be converted to a single keyval
pair with the key name \texttt{short-text}.

Arguments which begin with \texttt{=,} are always interpreted as
keyvals even if they do not contain further \texttt{=} signs.
Any \texttt{=} signs enclosed within \verb|$...$| or \verb|\(...\)|,
i.e.~in inline math mode, are ignored, meaning that
only \texttt{=} outside of math mode will generally cause
interpretation as keyval material.

In case the argument contains a \enquote{textual} \texttt{=} sign that
is mistaken as key/value indicator you can hide it using a brace
group as you would do in other places, e.g.,
\begin{verbatim}
\caption[{Use of = signs}]
        {Use of = signs in optional arguments}
\end{verbatim}
However, because a \texttt{=} sign in math mode are already ignored, this
should seldom be necessary.

\subsection{Encoding subsets for \texttt{TS1} encoded fonts}

The text companion encoding \texttt{TS1} is unfortunately not very
faithfully supported in fonts that are not close cousins to the
Computer Modern fonts. It was therefore necessary to provide the
notion of \enquote{sub-encodings} on a per font basis. These
sub-encodings are declared for a font family with the help of a
\cs{DeclareEncodingSubset} declaration, see \cite{36:fntguide} for
details.

Maintainers of font bundles that include \texttt{TS1} encoded font
files should add an appropriate declaration into the corresponding
\texttt{ts1}\textit{family}\texttt{.fd} file, because otherwise the
default subencoding is assumed, which is probably disabling too many
glyphs that are actually available in the font.\footnote{The \LaTeX{}
  format contains declarations for many font families already.  This
  was done in 2020 to quickstart the use of the symbols in the kernel,
  but it is really the wrong place for such declarations. Thus, for
  new fonts the declarations should be placed into the corresponding
  \texttt{.fd} files.}
%
\githubissue{905}



\section{New or improved commands}


\section{Code improvements}

\subsection{Support for slanted small caps in the EC-fonts }
Since some time \LaTeX{} supports the combination of the shapes
small caps and italic/slanted. The EC-fonts contain slanted small caps fonts
but using them required the loading of an external package. Suitable font definitions
have now been added to \pkg{t1cmd.fd} and so from now on
\begin{verbatim}
 \textsc{\textsl{slanted small}}
 \textsc{\textit{italic small caps}}
 \bfseries
 \textsc{\textsl{bold slanted small caps}}
 \textsc{\textit{bold italic small caps}}
\end{verbatim}
will give the expected result: {\fontfamily{cmr}
\textsc{\textsl{slanted small}} \textsc{\textit{italic small caps}}
\bfseries
\textsc{\textsl{bold slanted small caps}} \textsc{\textit{bold italic small caps}}}
%
\githubissue{782}


\subsection{EC sans serif at small sizes}

The EC (T1 encoded Computer Modern) sans serif fonts have errors at
small sizes: the medium weight is bolder and wider than the bold
extended. This makes them unusable at these small sizes. The default
\texttt{.fd} file has therefore been adjusted to use a scaled down 8pt
font instead.
%
\githubissue{879}


\subsection{Detect nested \texttt{minipage} environments}

Nesting of \texttt{minipage} environments is only partially supported
in \LaTeX{} and can lead to incorrect output, such as overfull boxes
or footnotes appearing in the wrong place;
see~\cite[p.~106]{36:Lamport}. However, until now there was no warning
if that happpened.  This has been changed and the environment now
warns if you nest it in another \texttt{minipage} environment that
already contains footnotes.
%
\githubissue{168}



\subsection{\LuaTeX\ callback efficiency improvement}

The mechanism for providing the
\texttt{pre/post\_mlist\_to\_hlist\_filter} callbacks in \LuaTeX\ has
been improved to make it more reusable and to avoid overhead if these
callbacks are not used.
%
\githubissue{830}



\subsection{Improve \pkg{l3docstrip} integration into \pkg{docstrip}}

In 2020 we merged \pkg{l3docstrip.tex} into \pkg{docstrip.tex} to
support the \texttt{\%\string<@@=\meta{module}\string>} syntax of
\pkg{expl3}; see~\cite{36:ltnews32}.  However, this support was
incomplete, because it didn't cover \pkg{docstrip} lines of the form
\texttt{\%<+...>} or \texttt{\%<-...>}.  This was never noticed until
now, because usually \texttt{\%<*...>} blocks are used. Now all lines
in a \texttt{.dtx} file are subject to the \texttt{@@} replacement
approach.
%
\githubissue{903}



\subsection{Improve font series handling with incorrect \texttt{.fd} files}

By convention, the font series value is supposed to contain no
\texttt{m}, unless you refer to the \enquote{medium} series (which is
represented by a single \texttt{m}). For example, one should write
\texttt{c} for \enquote{medium weight, condensed width} and not
\texttt{mc}. This was one of the many space-conserving methods
necessary in the early days of \LaTeXe.

Some older \texttt{.fd} files
do not obey that convention but use \texttt{mc}, \texttt{bm}, etc., in
their declarations. As a result, some font selection scheme
functionality was not working when confronted with such \texttt{.fd}
files. We have therefore augmented \cs{DeclareSymbolFont} and
\cs{SetSymbolFont} to strip their series argument from any surplus
\texttt{m} so that they do not unnecessarily trigger font
substitutions. Regardless of this support such 
\texttt{.fd} files should get fixed by their maintainers.
%
\githubissue{918}



\section{Bug fixes}

\subsection{Prevent \TeX{} from loosing a \cs{smash}}

When \TeX{} is typesetting a fraction, it will rebox the material in
either numerator or the denumerator depending on which is wider. If
the repackaged part consists of a single box, that box gets new
dimensions and if it was built using a \cs{smash} that effect vanishes
(because a smash is nothing other than zeroing some box dimension,
which now got undone). For example, in the line
\begin{verbatim}
\frac{1}{2} = \frac{1}{\smash{2^X}} 
            \neq \frac{100}{\smash{2^X}} 
\end{verbatim}
the $2$ in the denominators was not always at the same vertical position, because
the second \cs{smash} was ignored due to reboxing:
\[
\makeatletter
\def\mathsm@sh#1#2{\setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh} % old definition
\makeatother
\newcommand*\drawbaseline{\rlap{\vrule width 60pt height 0.1pt depth 0pt }}
\frac{1}{\drawbaseline2} = \frac{1}{\smash{2^X}}      \neq 
\frac{100}{\smash{2^X}}
\]
The differences are subtle but noticeable. This is now corrected and the \cs{smash} is always
honored. Thus now you get this output:
\[
\newcommand*\drawbaseline{\rlap{\vrule width 60pt height 0.1pt depth 0pt }}
\frac{1}{\drawbaseline2} = \frac{1}{\smash{2^X}}      \neq 
\frac{100}{\smash{2^X}}
\]
%
\githubissue{517}


\subsection{Resolve an issue with \cs{mathchoice} and \texttt{localalphabets}}

The code for keeping a number of math alphabetcs local (introduced in
2021; see~\cite{36:ltnews34}) used \cs{aftergroup} to do some cleanup actions after a
formula had finished.  Unfortunately, \cs{aftergroup} can't be used
inside the arguments of the \cs{mathchoice} primitive and as a result one
got low-level errors if the freezing happened in such a place.  The
implementation was therefore revised to avoid the \cs{aftergroup}
approach altogether.
%
\githubissue{921}



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


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

\subsection{Fix a \cs{mathcolor} bug}

The \cs{mathcolor} command intorduced in \cite{36:ltnews35} needs to
scan for following sub and superscripts, but if it did so at the end
of an alignment cell, e.g., in a \texttt{array} environment, the
\texttt{\&} was evaluated too early causing some internal errors. This
is now properly guarded for.
%
\githubissue{901}



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

\subsection{\pkg{array}: Correctly identify single-line m-cells}

Cells in m-columns that only contain a single line are supposed to
behave like single-line p-cells and align at the same baseline. To
test for the condition, \pkg{array} used to compare the height of the cell to
the height of the strut used for the table rows. However, the height of that
strut depends on the setting of \cs{arraystretch} and if you made this
negative (or very large) the test came out wrong.  Therefore, we now
test against the height of a normal strut to ensure that single-line
cells are correctly identified as such (unless their content is truly very
tall, in which case aligning is pointless anyway).
%
\githubissue{766}


\medskip

\begin{thebibliography}{9}

\fontsize{9.3}{11.3}\selectfont

%\bibitem{36: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/}

%\bibitem{36:source2e}
%  \emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\
%  \url{https://latex-project.org/help/documentation/}

\bibitem{36:Lamport}
Leslie Lamport.
\newblock {\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{36:ltnews32} \LaTeX{} Project Team:
  \emph{\LaTeXe{} news 32}.\\
  \url{https://latex-project.org/news/latex2e-news/ltnews32.pdf}

\bibitem{36:ltnews34} \LaTeX{} Project Team:
  \emph{\LaTeXe{} news 34}.\\
  \url{https://latex-project.org/news/latex2e-news/ltnews34.pdf}

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

\bibitem{36:fntguide} \LaTeX{} Project Team:
  \emph{\LaTeXe{} font selection}.\\
  \url{https://latex-project.org/help/documentation/}

%\bibitem{36:ltfilehook-doc} Frank Mittelbach, Phelype Oleinik, \LaTeX{}~Project~Team:
%  \emph{The \texttt{\upshape ltfilehook} documentation}.\\
%  Run \texttt{texdoc} \texttt{ltfilehook-doc} to view.
\end{thebibliography}



\end{document}