diff options
author | Karl Berry <karl@freefriends.org> | 2022-11-02 22:00:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-11-02 22:00:49 +0000 |
commit | 3f1026bdc52825d68d83555c8d4cdc31a41f7687 (patch) | |
tree | 199f5a2a890795c71d60f3f33d3869d3eb714ba4 /Master/texmf-dist/doc/latex-dev/base/ltnews36.tex | |
parent | 263850a3c1c53d9e6c691c7046923b77f46aa465 (diff) |
latex-dev 2022-11 (2nov22)
git-svn-id: svn://tug.org/texlive/trunk@64899 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex-dev/base/ltnews36.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex-dev/base/ltnews36.tex | 223 |
1 files changed, 164 insertions, 59 deletions
diff --git a/Master/texmf-dist/doc/latex-dev/base/ltnews36.tex b/Master/texmf-dist/doc/latex-dev/base/ltnews36.tex index 55de98628cf..d6df801db2a 100644 --- a/Master/texmf-dist/doc/latex-dev/base/ltnews36.tex +++ b/Master/texmf-dist/doc/latex-dev/base/ltnews36.tex @@ -123,7 +123,7 @@ \tubcommand{\input{tubltmac}} \publicationmonth{November} -\publicationyear{2022 --- DRAFT version for upcoming release} +\publicationyear{2022} % --- DRAFT version for upcoming release} \publicationissue{36} @@ -143,16 +143,30 @@ \section{Introduction} -\emph{to be written} +The 2022-11 release of \LaTeX{} is largely a consolidation release +where we made a number of minor improvements to fix some bugs or +improve one or the other interface. +The only really important functionality that was added is described in +the next section: the ability to easily define document-level commands +and environments that accept a key/value list in one of its (usually +optional) arguments, including the ability to determine if the argument +does in fact contain such a key/value list or just a single +\enquote{classical} value. -\subsection{Auto-detecting key--value arguments} +For the \enquote{Tagged \LaTeX{} Project} this functionality is very +important because many document-level commands will need to accept +such key/value lists, for example, to specify alternative text or +overwrite default tagging if that becomes necessary in a document. + + +\section{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 +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 +a set of key/values. If the argument does not \enquote{look like} a set +of key/values, 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} @@ -161,26 +175,29 @@ example, the \cs{caption} command could be defined as {...} \end{verbatim} which would mean that if the optional argument does \emph{not} -contain keyval data, it will be converted to a single keyval +contain key/value data, it will be converted to a single key/value 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. +key/values 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. +interpretation as key/value 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 +is mistaken as a 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 +However, because \texttt{=} signs in math mode are already ignored, this should seldom be necessary. + +\section{A note for font package developers} + \subsection{Encoding subsets for \texttt{TS1} encoded fonts} The text companion encoding \texttt{TS1} is unfortunately not very @@ -204,29 +221,51 @@ glyphs that are actually available in the font.\footnote{The \LaTeX{} % \githubissue{905} - - \section{New or improved commands} +\subsection{Better language handling for case-changing commands} + +The commands \cs{MakeUppercase}, \cs{MakeLowercase} and \cs{MakeTitlecase} now +automatically detect the locale currently in use when \pkg{babel} is loaded. +This allows automatic adjustment of letter mappings where appropriate. They +also accept a leading optional argument. This accepts a key--value list of +control settings. At present, there is one key available: \texttt{locale}, +which can also be accessed via the alias \texttt{lang}. This is intended to +allow local setting of the language, which can be done using a BCP-47 +descriptor. For example, this could be used to force Turkish case changing in +otherwise English input +\begin{verbatim} +\MakeUppercase[lang = tr]{Ragıp Hulûsi Özdem} +\end{verbatim} +yields + \MakeUppercase[lang = tr]{Ragıp Hulûsi Özdem}. +% RAGIP HULÛS\.I ÖZDEM. %TUB \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 +\subsection{Support for slanted small caps in the EC fonts} +For some time \LaTeX{} has supported 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}} +\usepackage[T1]{fontenc} +... + \textsc{\textsl{Slanted Small Caps}}; + \textsc{\textit{Italic Small Caps}}; \bfseries - \textsc{\textsl{bold slanted small caps}} - \textsc{\textit{bold italic small caps}} + \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}} +\textsc{\textsl{Slanted Small Caps}}; \textsc{\textit{Italic Small Caps}}; \bfseries -\textsc{\textsl{bold slanted small caps}} \textsc{\textit{bold italic small caps}}} +\textsc{\textsl{Bold Slanted Small Caps}}; \textsc{\textit{Bold Italic Small Caps}}}. + +Given that the Computer Modern fonts in \texttt{T1} do not have real italic small caps but only +slanted small caps, the latter is substituted for the former, which is +why above both work but you see no difference between the two (and in the log you get a +substitution warning for the \cs{textit}\cs{textsc} shape combination). % \githubissue{782} @@ -242,28 +281,56 @@ font instead. \githubissue{879} + +\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 any surplus \texttt{m} from their series argument +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} + + + + \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 +if that happened. 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. +\subsection{Robust commands in package options} +With the standard key-based option handler added in the last release, +or with contributed packages offering similar features, users may +expect to be able to use a package option such as +\verb|[font=\bfseries]|. +Previously this failed with internal errors as the option list was +expanded via \verb|\edef|. This has now been changed to use the +existing command \verb|\protected@edef| so that any \LaTeX\ robust +command should be safe to pass to a key value option. % -\githubissue{830} +\githubissue{932} + @@ -282,35 +349,56 @@ approach. -\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. +\subsection{\LuaTeX\ callback efficiency improvement} -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. +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{918} +\githubissue{830} + + +\subsection{Rule-based ordering for \LuaTeX\ callback handlers} + +In \hologo{LuaLaTeX} the callback handlers used to be called in the order +in which they were registered in, but this was often rather fragile. +It depends a lot on the load order and any attempts to enforce a +different order required unregistering and reregistering the handlers to +be reordered. Additionally, even if some ordering constraints where +enforced that way, another package loaded later could accidentally +overwrite it. + +To improve this, we now order the callback handlers based on ordering +rules similar to the hook rules. + +When registering a callback which should run before or after another +callback, \verb+luatexbase.declare_callback_rule+ can now be used to +record this ordering constraint. +For example +\begin{verbatim} +luatexbase.add_to_callback + ('pre_shaping_filter', my_handler, 'my_name') +luatexbase.declare_callback_rule + ('pre_shaping_filter', + 'my_name', 'before', 'other_name') +\end{verbatim} +will ensure that \verb+my_handler+ will always be called before the +handler registered as \verb+other_name+. + +This also means that the order in which callbacks are registered no +longer implicitly defines an order. +Code which relied on this implicit order should now define the order +rules explicitly. \section{Bug fixes} -\subsection{Prevent \TeX{} from loosing a \cs{smash}} +\subsection{Prevent \TeX{} from losing 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 +either the numerator or denominator, 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, @@ -321,28 +409,36 @@ which now got undone). For example, in the line \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: +\vspace{-1.2\baselineskip} \[ \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 }} +\qquad \frac{1}{\drawbaseline2} = \frac{1}{\smash{2^X}} \neq \frac{100}{\smash{2^X}} +\pagebreak % not TUB \] -The differences are subtle but noticeable. This is now corrected and the \cs{smash} is always +The differences are subtle but noticeable. +This is now corrected and the \cs{smash} is always honored. Thus now you get this output: +\vspace{-1.2\baselineskip} \[ \newcommand*\drawbaseline{\rlap{\vrule width 60pt height 0.1pt depth 0pt }} +\qquad \frac{1}{\drawbaseline2} = \frac{1}{\smash{2^X}} \neq \frac{100}{\smash{2^X}} \] +\par +\vspace{-1.5\baselineskip} % \githubissue{517} \subsection{Resolve an issue with \cs{mathchoice} and \texttt{localalphabets}} -The code for keeping a number of math alphabetcs local (introduced in +The code for keeping a number of math alphabets 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 @@ -352,19 +448,28 @@ approach altogether. % \githubissue{921} +\subsection{Reporting of unused global options when using key/value processing} + +Using the new key/value option processor did not properly report any unused +global options when it was used in handling class options. This has now been +corrected. +% +\githubissue{938} -\section{Changes to packages in the \pkg{amsmath} category} +%\section{Changes to packages in the \pkg{amsmath} category} +%\newpage TUB? + \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 +The \cs{mathcolor} command introduced 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 +\texttt{\&} was evaluated too early, causing some internal errors. This is now properly guarded for. % \githubissue{901} @@ -375,7 +480,7 @@ is now properly guarded for. \subsection{\pkg{array}: Correctly identify single-line m-cells} -Cells in m-columns that only contain a single line are supposed to +Cells in m-columns that contain only 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 @@ -388,7 +493,7 @@ tall, in which case aligning is pointless anyway). \githubissue{766} -\medskip +%\medskip \begin{thebibliography}{9} |