diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex-dev/base/ltnews34.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex-dev/base/ltnews34.tex | 311 |
1 files changed, 159 insertions, 152 deletions
diff --git a/Master/texmf-dist/doc/latex-dev/base/ltnews34.tex b/Master/texmf-dist/doc/latex-dev/base/ltnews34.tex index 4bd847a19f0..badd25b97cb 100644 --- a/Master/texmf-dist/doc/latex-dev/base/ltnews34.tex +++ b/Master/texmf-dist/doc/latex-dev/base/ltnews34.tex @@ -34,7 +34,7 @@ \documentclass{ltnews} -%% Temporary definition for Chris' inadequate system: CCC +%% Maybe needed only for Chris' inadequate system: \providecommand\Dash {\unskip \textemdash} %% NOTE: Chris' preferred hyphens! @@ -70,8 +70,8 @@ {github issue#1 #2}% )}% \par\smallskip} -%% But Chris has to mostly disable \href for his TEXPAD app: CCC -\def\href #1{} +%% 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} @@ -117,8 +117,7 @@ \tubcommand{\input{tubltmac}} \publicationmonth{November} -\publicationyear{2021 \Dash Third Draft Version, - not quite complete, eg needs Intro?)} %% CCC +\publicationyear{2021} \publicationissue{34} @@ -137,14 +136,12 @@ \section{Introduction} -\emph{TO BE COMPOSED, PROBABLY} - -%% -% \subsection{???} -% -% \emph{write} ?? -%% +This release of \LaTeX{} does not contain any major new modules, but +is focused around consolidation and improvements of the functionality +introduced in previous releases. In addition, various smaller +enhancements and bug fixes have been added to the kernel and the core +packages. \section{Hook business} @@ -158,8 +155,8 @@ number of queries which show that some of the documentation was not precise enough and that some clarifications were needed; these deficiencies have now been addressed in the documentation. % -The increased usage has also shown up a small number of -errors that we thought +The increased usage has also revealed +a small number of errors that we thought should be corrected now, while the adoption rate is still relatively small; the following problems have therefore been addressed in this release. @@ -168,14 +165,14 @@ small; the following problems have therefore been addressed in this release. The hook management system offers a number of generic hooks, i.e., hooks whose names contain a variable component such as the name -of an environment. Predeclaring such hooks is not really feasible, +of an environment. Predeclaring such hooks is not feasible, so these hooks use a different mechanism: they are implicitly available, springing into life the moment a package, or the document preamble, adds any code to one by using \cs{AddToHook}. % The kernel offers such hooks for environments - (\texttt{env/...}) and commands (\texttt{cmd/...}), and for files, - packages or classes (\texttt{file/...}, + (\texttt{env/...}) and commands (\texttt{cmd/...}), and also for files, + packages and classes (\texttt{file/...}, \texttt{include/...}, \texttt{package/...}, \texttt{class/...}). It is also possible to offer such generic hooks in @@ -187,7 +184,7 @@ don't know beforehand all the necessary names). If you want to offer such generic hooks, you can now do this by using \cs{UseHook} or \cs{UseOneTimeHook} in your (package) code, but -\emph{without declaring the hook} with \cs{NewHook}. But without +\emph{without declaring the hook} with \cs{NewHook}. However, without further work, a call to \cs{UseHook} with an undeclared hook name will do nothing; so, as an additional setup step, it is necessary to explicitly @@ -216,11 +213,11 @@ Note that a generic hook produced in this way is always a normal hook. \subsection{Standardized names for the generic hooks} The initial set of generic hooks provided by the kernel had -two patterns of names:\\ +two patterns of names: ones like \verb|env/|\meta{name}\verb|/after|, -with the variable (\meta{name}) -part in the middle position;\\ +with the variable, \meta{name}, part +in the middle position; and ones like \verb|file/after/|\meta{name}, with the variable part in the third @@ -269,11 +266,13 @@ Classes, packages and included files can only be loaded once in a \LaTeX{} document. For this reason, the hooks that are specific to loading such files have been made one-time hooks. Beside being more efficient, this supports the following important use case -\begin{verbatim} +{\hfuzz=1pt \begin{verbatim} \AddToHook{package/varioref/after} {... apply when the package gets loaded, or apply now (if it is already loaded) ...} \end{verbatim} +} +\noindent without the need to first test whether the package is already loaded. % \githubissue{623} @@ -340,12 +339,12 @@ when working with more than one package, the \texttt{voids} relation should preferably be used. % This is best because this relation is non-destructive -(meaning that it can be later reverted by using another relation), +(meaning that it can be reverted later by using another relation), and it is also truly independent of package loading order. % \githubissue{625} -\subsection{Patching commands that contain parameter tokens} +\subsection{Patching commands with parameter tokens} In the last release, \LaTeX's hook mechanism was extended to add support for hooking into commands using generic \hook{cmd} hooks @@ -361,10 +360,87 @@ been fixed so that patching now works for those commands as well. \section{New or improved commands} +\subsection{\cs{NewCommandCopy} and \cs{ShowCommand} extended} + +Since the 2020-10-01 release (see~\cite{34:ltnews32}), \LaTeX{} +has provided \cs{NewCommandCopy} to copy robust commands, +and \cs{ShowCommand} to show their definitions on the terminal. +% +In that same release, the \pkg{xparse} package was integrated +into the kernel (as \pkg{ltcmd}) to offer \cs{NewDocumentCommand}, etc. +% +However, the extended support for \cs{NewCommandCopy} and +\cs{ShowCommand} was not implemented in \pkg{ltcmd}. The present +\LaTeX{} release implements this support, so now commands +defined with \cs{NewDocumentCommand} and friends can also be copied, and their definitions +can be easily shown on the terminal without the need for ``\cs{csname} gymnastics''. +% +\githubissue{569} + + +\subsection{Undo math alphabet allocations if necessary} + +\TeX{}, or more exactly the 8-bit versions of \TeX, such as \pdfTeX{}, +have a hard limit of 16 on the number of different math font groups +(\cs{fam} or \cs{mathgroup}) that can be used in a single formula. For each symbol font +declared (by a package or in the preamble) an extra math group is allocated, +and the same happens for each math alphabet, (such as \cs{mathbf}) +once it +gets used anywhere in the document. Up to now, these math +alphabet allocations were permanent, even if they were +used only once; +the result was that in complex documents you +could easily run out of available math font groups. +The only remedy for this was to +define your own math version, which is a complicated and cumbersome process. + +This situation has now been improved by the introduction of a new counter +\texttt{localmathalphabets}: this counter governs how many of +the math group slots are assigned locally when a new math +alphabet (and a new math group) is needed. +% +Once the current formula is finished, every such further (local) +allocation is undone, giving you a fighting chance of being +able to use different new math alphabets in the next formula. + +The default value of \texttt{localmathalphabets} is 2, +but if you need more local alphabets because of the complexity of your +document, you can set this to a higher value such as 4 or 5. +Setting it even higher is possible, but this would seldom +be useful because many group slots will be taken up by +symbol fonts and such slots are always permanently allocated, +whether used or not. +% +\githubissue{676} + + +\subsection{New default value for \cs{tracinglostchars}} + +In 2021 all \TeX{} engines were enhanced so that \cs{tracinglostchars} +supported the value \texttt{3} to turn missing +characters into errors and not just warnings. +% +This engine change made us +realize that \LaTeX{} should set a better default value for this parameter +(previously, the warning was written only to the transcript file). +Using the now available value of \texttt{3} as the default +would be ideal, but for +compatibility reasons we have only increased it to \texttt{2} in the kernel. +% +However, we recommend setting \cs{tracinglostchars}\texttt{=3}, +in either a package or the +preamble of your documents: this is because having missing glyphs +in the output is definitely an error and should therefore be +flagged as such (to ensure that it gets proper attention). +Further reasons, related especially to Unicode engines, for making +this recommended change are explained later in this newsletter +(in connection with the misuse of text accents in math mode). + + \subsection{\cs{PackageNote} and \cs{ClassNote} added} -\LaTeX{} offers these three commands:\cs{PackageError} to signal errors that +\LaTeX{} offers these three commands: \cs{PackageError} to signal errors that stop the processing; \cs{PackageWarning} to generate a warning message on the terminal but continue with the processing; and \cs{PackageInfo} to provide some information that is only written to the \texttt{.log} @@ -374,10 +450,10 @@ What has not existed up to now is a way to provide information on the terminal that identifies itself as coming from a specific package but which does not claim to be a warning. (Packages that wanted to write to the terminal used \cs{PackageWarning} -even though the information wasn't really a warning.) +even though the information was not in fact a warning.) We have therefore now added \cs{PackageNote} (and the closely -related \cs{PackageNoteNoLine}): these identify +related \cs{PackageNoteNoLine}); these identify themselves as \enquote{informational}, but they still go to the terminal and not only to the \texttt{.log} file. % @@ -408,15 +484,15 @@ it is also useful when interpreting the tracing output of the \pkg{fewerfloatpages} package. -\subsection{New argument for \cs{counterwithin/without}} +\subsection{New argument for \cs{counterwithin}/\texttt{without}} The commands \cs{counterwithout} and \cs{counterwithin} each now has -an additional optional argument, similar to that for the command +an additional optional argument, similar to that of the command \cs{numberwithin} from \pkg{amsmath}, for which these are now the preferred replacements. This optional argument -specifies the format of the counter, such as \cs{roman}, -the default value being \cs{arabic}. +specifies the format of the counter, such as \cs{roman}; +the default value is \cs{arabic}. \subsection{Tests for package and class loading} @@ -428,10 +504,10 @@ with certain options. This is done with \cs{IfPackageLoadedWithOptionsTF}. It takes four arguments: \Arg{package}\Arg{option-list}\Arg{true}\Arg{false}. % -It uses the \meta{false} code if at least one option in -the \meta{option-list} was +It uses the \meta{false} code if one or more options in +the \meta{option-list} were not specified when loading the package, or if the package -has never been. +has never been loaded. % Both commands can be used anywhere in the document, i.e., they are not restricted to the preamble.% @@ -439,69 +515,16 @@ they are not restricted to the preamble.% corresponding internal commands, e.g., \cs{@ifpackageloaded}, that had this restriction in the past.} -For classes, similar commands (with \texttt{Package} replaced by -\texttt{Class} in the name) are provided. +For classes, similar commands, with \texttt{Package} replaced by +\texttt{Class} in the name, are provided. % \githubissue{621} -\subsection{\cs{NewCommandCopy}, \cs{ShowCommand} now in \pkg{ltcmd}} - -Since the 2020-10-01 release (see~\cite{34:ltnews32}), \LaTeX{} -has provided \cs{NewCommandCopy} to copy robust commands, -and \cs{ShowCommand} to show their definitions on the terminal. -% -In that same release, the \pkg{xparse} package was integrated -into the kernel (as \pkg{ltcmd}). -% -However, the extended support for \cs{NewCommandCopy} and -\cs{ShowCommand} was not implemented in \pkg{ltcmd}. The present -\LaTeX{} release implements this support, so now commands -defined with \pkg{xparse}/\pkg{ltcmd} can be copied, and their definitions -can be easily shown on the terminal without the need for ``\cs{csname} gymnastics''. -% -\githubissue{569} - - -\subsection{Undo math alphabet allocations if necessary} - -\TeX{}, or more exactly the 8-bit versions of \TeX, such as \pdfTeX{} -have a hard limit of 16 on the number of different math font groups -(\cs{fam} or \cs{mathgroup}) that can be used in a single formula. For each symbol font -declared (by a package or in the preamble) an extra math group is allocated, -and the same happens for each math alphabet, (such as \cs{mathbf}) that -gets used anywhere in the document. Up to now, these math -alphabet allocations were permanent, even if they were -used only once; -the result was that in complex documents you -could easily run out of available math font groups. -The only remedy for this was to -define your own math version, which is a complicated and cumbersome process. - -This situation has now been improved by the introduction of a new counter -\texttt{localmathalphabets}: this counter governs how many of -the math group slots are assigned only locally when a new math -alphabet (and a new math group) is needed. -% -Once the current formula is finished, every such further (local) -allocation is undone, giving you a fighting chance of being -able to use different new math alphabets in the next formula. - -The default value of \texttt{localmathalphabets} is 2, -but if you need more local alphabets because of the complexity of your -document, you can set this to a higher value such as 4 or 5. -Setting it even higher is possible, but this would seldom -be useful because many group slots will be taken up by -symbol fonts and such slots are always permanently allocated, -whether used or not. -% -\githubissue{676} - - \subsection{Better handling for a misuse of \cs{include}} -The command \cs{include} is by now getting used quite often, but -erroneously, to input a variety files in the preamble of the document +The command \cs{include} has by now been used quite often, but +erroneously, to input a variety of files in the preamble of the document (before \verb|\begin{document}|). % Therefore \LaTeX\ now warns about such bad use of \cs{include}. @@ -514,28 +537,6 @@ file hooks from \cs{InputIfFileExists} are run). \githubissue{645} -\subsection{New default value for \cs{tracinglostchars}} - -In 2021 all \TeX{} engines were enhanced so that \cs{tracinglostchars} -supported the extra value \texttt{3}, that turns missing -characters into errors and not just warnings. -% -This engine change made us -realize that \LaTeX{} should set a better default value for this parameter -(previously, the warning was written only to the transcript file). -Using the now available value of \texttt{3} as the default -would really be best, but for -compatibility reasons we have only increased it to \texttt{2} in the kernel. -% -However, we recommend setting \cs{tracinglostchars}\texttt{=3}, -in either a package or the -preamble of your documents: this is because having missing glyphs -in the output is definitely an error and should therefore be -flagged as such (to ensure that it gets proper attention). -Further reasons, related especially to Unicode engines, for making -this recommended change can be found later in this newsletter -(in connection with the misuse of text accents in mathmode). - \section{Code improvements} @@ -569,21 +570,21 @@ concerning the existence of \cs{foo} and \cs{endfoo}. \subsection{Improve the error message \texttt{\textup{\cs{begin} ended by \textellipsis}}} -In the past it was possible to get an error message something -like \verb=\begin{foo} ended by \end{foo}=. This could happen when the +In the past it was possible to get an error message along the lines +of ``\verb=\begin{foo} ended by \end{foo}=''. This could happen when the environment name was partly hidden inside a macro. It happened because the test was comparing the literal strings, whereas in the error message these got fully expanded. % This has now been changed to show a more sensible error -message in this instance. +message. % \githubissue{587} \subsection{Pick up all arguments to \cs{contentsline}} -A \cs{contentsline} command in the TOC file is always followed by +A \cs{contentsline} command in the \texttt{.toc} file is always followed by four arguments, the last one being empty except when using the \pkg{hyperref} package. The \cs{contentsline} command itself only used the first three arguments and it relied on the fourth being empty (and thus @@ -593,7 +594,7 @@ But this assumption is not always correct: e.g., if you at first decide to load \pkg{hyperref} but then later you remove this loading from the preamble. % -So now all four arguments ate picked up, with the +So now all four arguments are picked up, with the fourth being saved away so that it can be used by \pkg{hyperref}. % \githubissue{633} @@ -609,11 +610,12 @@ the callback handler indicates removal of the entire math list. \subsection{Extended label handling in package code} -Since 2020, as noted in \LaTeX News 32~\cite{34:ltnews32}, \LaTeX\ has +Since 2020, as noted in \LaTeX\ News 32~\cite{34:ltnews32}, \LaTeX\ has recorded the name of the counter associated with the current label in the internal command \cs{@currentcounter}. This facility (originally from the \pkg{zref} package of Heiko Oberdiek) can be used to generate -prefixes such as \enquote{Figure} before the reference text. +prefixes such as \enquote{Figure} before the reference text, +as long as the counter is not counting different objects in a single sequence (e.g., lemmas and theorems). % In the most common cases the current label is set by \cs{refstepcounter}, which @@ -627,17 +629,17 @@ also some of the environments in the \pkg{amsmath} package have been updated in this way. % We encourage the maintainers of any class or -package files that defines \cs{@currentlabel} to also set +package files that define \cs{@currentlabel} to also set \cs{@currentcounter} at the same point. % \githubissue{300, 687} -\subsection{Better message if text accent used in mathmode} +\subsection{Better message if text accent used in math mode} Using text accents like \verb|\^| in math does not work (and \TeX{} explicitly provides math accents such as \cs{hat} -for accessing such symbols in mathmode). Therefore LaTeX issued a +for accessing such symbols in math mode). Therefore \LaTeX\ issued a warning when such a wrongly placed accent was encountered and this was often followed by a strange, and apparently unrelated, low-level error. @@ -663,8 +665,7 @@ no font supports the full Unicode range). \subsection[Replicate argument processors for all embellishments in command declarations] - {Replicate argument processors for all \\ - \mbox{}\qquad embellishments in command declarations} + {Replicate argument processors for all embellishments in command declarations} There was a bug in \pkg{ltcmd} (formerly \pkg{xparse}) that caused commands to misbehave if they were defined with embellishments and @@ -675,8 +676,8 @@ behavior. This bug has been fixed by applying the same argument processors to all the embellishments in a set, so that a declaration like: \begin{verbatim} \NewDocumentCommand\foo{>{\TrimSpaces}e{_^}} - {(#1)[#2]} - \foo^{ a }_{ b } + {(#1)[#2]} + \foo^{ a }_{ b } \end{verbatim} will now correctly apply \cs{TrimSpaces} to both arguments. % @@ -707,22 +708,22 @@ hyphenation results for words containing this ligature (when using the \texttt{O In the past, changes to the font series defaults were made by directly altering \cs{bfdefault} or \cs{mddefault}. Since 2020 there is now -\cs{DeclareFontSeriesDefault} that allows more granular control: +\cs{DeclareFontSeriesDefault} that allows more granular control: with this declaration you can alter the default for individual meta font families by, for example, changing the bold setting only for the sans serif family, without changing it for \cs{rmfamily} or \cs{ttfamily}. See~\cite{34:ltnews31} for more details. For backwards compatibility, changing \cs{bfdefault} with -\cs{renewcommand} remained possible: if used, this alters the setting +\cs{renewcommand} remained possible; if used, this alters the setting for all meta families in one go. This alteration cannot be done when the \cs{renewcommand} happens and it was therefore delayed until the next time \cs{bfseries} or \cs{mdseries} was executed. % However, the problem with that approach was that any call to \cs{DeclareFontSeriesDefault} in -the meantime was overwritten, thus these two approaches didn't -work well side by side. +the meantime was overwritten; thus, these two approaches didn't +work well in combination. There was a problem because older font packages use the legacy method while newer ones use \cs{DeclareFontSeriesDefault}. @@ -745,12 +746,32 @@ so that the use of \texttt{\#} here no longer generates an error. +\section{Changes to packages in the \pkg{amsmath} category} +\subsection{Improved compatibility with \pkg{hyperref}} + +This change in \pkg{amsmath} fixes a spacing problem caused by the +method used in \pkg{hyperref} to change the \env{equation} environment. +% +For simplicity, an explicit, low-level (hence possibly temporary) +patch has been added to \pkg{amsmath}: this consists +of an extra, empty (hence invisible) +\cs{mathopen} atom (with no mathematical meaning) at the start of the +environment's mathematical content. +% +\githubissue{652} + + + \section{Changes to packages in the \pkg{graphics} category} -\subsection{\pkg{graphicx}: New key, for alt text} -A new key, \texttt{alt}, has been added to \cs{includegraphics} to support the addition of descriptive text that is important for accessibility. -This key is unused by default; it can be deployed by extension packages and it will provide useful support for other future possibilities. +\subsection{\pkg{graphicx}:\ New key, for alt text} + +A new key, \texttt{alt}, has been added to \cs{includegraphics} to +support the addition of descriptive text that is important for +accessibility. This key is unused by default; it can be deployed by +extension packages and it will provide useful support for other future +possibilities. % \githubissue{651} @@ -767,7 +788,7 @@ no extra space from \cs{mathsuround} should be added % Note that this bug has been present ``forever'', which shows that \cs{mathsurround} is never used, or at least its use is never noticed. -Anyhow, this bug has now finally gotten fixed. +At any rate, this bug has now finally been fixed. % \githubissue{614} @@ -792,7 +813,7 @@ a run-in heading rather than appearing before that heading. From version 1.9 onwards \cs{columnbreak} accepts an optional argument (like \cs{pagebreak}) in which you can specify the desirability of breaking the column after the current line: supported values are -\texttt{1} to \texttt{4}, with higher numbers indicating increased desirability. +\texttt{0} to \texttt{4}, with higher numbers indicating increased desirability. This version also adds \cs{newcolumn}, which forces a break but runs the column short (comparable to \cs{newpage} for pages). @@ -805,27 +826,13 @@ which forces a break but runs the column short (comparable to If an undefined label is referenced, \pkg{varioref} makes a default definition so that later processing finds the right structure (two brace groups inside \cs{r@}\meta{label}) However, if \pkg{nameref} or -\pkg{hyperref} is loaded this data structure changes to having five -arguments; this could cause low-evel errors in some cases. +\pkg{hyperref} is loaded, this data structure changes to having five +arguments; this could cause low-level errors in some cases. The code has therefore now been changed to avoid these errors. % \sxissue{603948} -\section{Changes to packages in the \pkg{amsmath} category} -\subsection{Improved compatibility with \pkg{hyperref}} - -This change in amsmath fixes a spacing problem caused by the -method used in \pkg{hyperref} to change the \env{equation} environment. -% -For simplicity, an explicit, low-level (hence possibly temporary) -patch has been added to \pkg{amsmath}: this consists -of an extra, empty (hence invisible) -\cs{mathopen} atom (with no mathematical meaning) at the start of the -environment's mathematical content. -% -\githubissue{652} - \medskip \begin{thebibliography}{9} |