Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed Jan 30, 2025
2 parents a2191e6 + b2c1bd4 commit b05a788
Show file tree
Hide file tree
Showing 156 changed files with 3,394 additions and 11,354 deletions.
1 change: 1 addition & 0 deletions .github/tl_packages
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ncctools
dinbrief
everyshi
filehook
index
pgf
pgfmorepages
ulem
Expand Down
42 changes: 42 additions & 0 deletions base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,39 @@ to completeness or accuracy and it contains some references to files that are
not part of the distribution.
================================================================================

2025-01-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* ltoutput.dtx (subsection{Floats}):
* ltsect.dtx (subsection{Table of Contents etc.}):
Make \label, \index, and \glossary truely invisible
when typesetting (gh/1638)

2025-01-23 Joseph Wright <Joseph.Wright@latex-project.org>
* ltcmd.dtx, usrguide.tex
New "c"-type argument

2025-01-22 David Carlisle <David.Carlisle@latex-project.org>

* ltcounts.dtx, ltxref.dtx:
Allow * to denote the current counter (as used by \label) in counter
related commands, \alph*, \stepcounter*, etc. (gh/1632)

2025-01-21 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* ltoutput.dtx (subsection{Floats}):
* ltsect.dtx (subsection{Table of Contents etc.}):
Support extended syntax for \label, \index, and \glossary (gh/311)

2025-01-21 Joseph Wright <Joseph.Wright@latex-project.org>

* ltcmd.dtx:
Correct catcode of space/tab in v-type arg
Adjust handling of catcodes for letters in v-type arg

2025-01-20 Joseph Wright <Joseph.Wright@latex-project.org>
* lttemplates.dtx
Speed up set up of template code

2025-01-15 Joseph Wright <Joseph.Wright@latex-project.org>
* ltkeys.dtx
Parse global options only once per package (gh/1619)
Expand Down Expand Up @@ -179,6 +212,15 @@ not part of the distribution.
All changes above are only part of the development branch for the next release.
================================================================================

#########################
# 2024-11-01 PL2 Release
#########################

2025-01-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* ltlists.dtx:
Only migrate \cs{@doendpe} out of simple and semi-simple groups (gh/1641)

#########################
# 2024-11-01 PL1 Release
#########################
Expand Down
6 changes: 3 additions & 3 deletions base/classes.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
%<*driver>
\ProvidesFile{classes.drv}
%</driver>
[2024/06/29 v1.4n
[2025/01/22 v1.4n
%<article|report|book> Standard LaTeX document class]
%<10pt|11pt|12pt> Standard LaTeX file (size option)]
% \end{macrocode}
Expand Down Expand Up @@ -3024,9 +3024,9 @@
% Note that this environment is not defined for books.
% \changes{v1.3e}{1995/06/19}{Added setting of \cs{@endparpenalty}
% to avoid page break after abstract heading.}
% \begin{macrocode}
% \changes{v1.3m}{1995/10/23}{Added setting of \cs{beginparpenalty} to
% \changes{v1.3m}{1995/10/23}{Added setting of \cs{@beginparpenalty} to
% discourage page break before abstract heading.}
% \begin{macrocode}
%<*article|report>
\if@titlepage
\newenvironment{abstract}{%
Expand Down
2 changes: 1 addition & 1 deletion base/doc/ltnews34.tex
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ \subsection{Some file hooks made one-time}
\noindent
without the need to first test whether the package is already loaded.
%
\githubissue{623}
\githubissue{626}


\subsection{Clearing extra hook code for the next invocation}
Expand Down
139 changes: 114 additions & 25 deletions base/doc/ltnews41.tex
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ \section{Replacement for the legacy mark mechanism}

\section{News from Tagged PDF project}

The \texttt{testphase} key now takes also the value \texttt{latest}.
The \texttt{testphase} key now takes also the value \texttt{latest}.
This will load all modules that we recommend
so that it is not necessary to specify individual modules. The list of loaded modules
will be adjusted as needed when the project progresses. It is also written to the log.
Expand Down Expand Up @@ -244,6 +244,66 @@ \subsection{Socket and plug conditionals}
%
\githubissue{1577}


\subsection{Accessing the current counter}
Counter commands such as \cs{alph}, \cs{stepcounter}, may now have
the argument \texttt{*} to denote the current counter (as used by
\cs{label}). This is compatible with the package \pkg{enumitem} use of
\verb|\alph*| in item labels but is generally available.
Not all commands accept \verb|*|, for example
\verb|\counterwithin| and \verb|\counterwithout| require counter names as before.
%
\githubissue{1632}

\subsection{Collecting environment bodies verbatim}

The mechanisms in \pkg{ltcmd} (\enquote{\pkg{xparse}}) offer a powerful way to
specify a range of types of document command and environment syntax. This
includes the ability to collect the entire body of an environment, for cases
where treating it as a standard argument is useful. It is also possible in
\pkg{ltcmd} to define arguments which grab their content verbatim, another
specialist argument form. To date, however, it was not possible to combine
these two ideas.

In this release, a new specifier~\texttt{c} is introduced, which collects the
body of an environment in a verbatim-like way. Like the existing
\texttt{+v}~specification, each separate line is marked by the special
\cs{obeyedline} marker, which as standard issues a normal paragraph. Thus, this
new specifier is usable both for typesetting and collecting file contents (the
letter~\texttt{c} indicates \enquote{collect code}). Thus, we may use
\begin{verbatim}
\NewDocumentEnvironment
{MyVerbatim}{!O{\ttfamily} c}
{\begin{center}#1 #2\end{center}} {}
\begin{MyVerbatim}[\ttfamily\itshape]
% Some code is shown here
$y = mx + c$
\end{MyVerbatim}
\end{verbatim}
to obtain
% We can't actually use ...
%\NewDocumentEnvironment{MyVerbatim}{!O{\ttfamily} c}
% {\begin{center} #1 #2\end{center}} {}
% ... as this would prevent LaTeX News 41 being processed with LaTeX before
% 2025-06-01!
% So instead ...
\begin{center}
\makeatletter
\def\@verbatim{%
\trivlist
\centering
\let \do \@makeother
\dospecials
\obeylines
\normalfont \ttfamily \itshape
\@noligs
}
\begin{verbatim}
% Some code is shown here
$y = mx + c$
\end{verbatim}
\end{center}

\section{Code improvements}

\subsection{Refinement of \cs{MakeTitlecase}}
Expand Down Expand Up @@ -278,6 +338,13 @@ \subsection{Tab character as a special}
be used in for example a \texttt{v}~specification document command without
additional steps.

\subsection{Refinement of \texttt{v}~specification category codes}

Work on verbatim argument handling has highlighted that storing
all characters as \enquote{other} (category code~12) when using a
\texttt{v}~specification in \pkg{ltcmd} was problematic. We have now
revised this to capture letters with their original cateogry code.

\subsection{Logging text command and symbol declarations}

For thirty years the documentation claimed that \cs{DeclareTextSymbol},
Expand All @@ -287,29 +354,6 @@ \subsection{Logging text command and symbol declarations}
%
\githubissue{1242}

\subsection{Supporting the \texttt{ssc} and \texttt{sw} shapes}

The \texttt{ssc} shape (spaced small capitals) is supported in
\LaTeX{} through the commands \cs{sscshape} and \cs{textssc}. However,
until this release there where no font shape change rules defined for
this admittely seldom available shape, so that
\begin{verbatim}
\sscshape\itshape
\end{verbatim}
changed unconditionally to \texttt{it} (italics) rather than to
\texttt{sscit} (spaced small italic capitals). Thanks to Michael
Ummels, the missing declarations have now been added so that shape
changes in font families that support spaced small capitals work
properly.

At the same time we took the opportunity to improve the fallbacks for
the \texttt{sw} (swash) shapes, which are accessible through the
commands \cs{swshape} or \cs{textsw}. If an \texttt{sw} combination is
not available, the rules now try to replace \texttt{sw} with
\texttt{it} rather than falling back to \texttt{n}.
%
\githubissue{1581}

\subsection{Improvement of the NFSS font series management}

\LaTeX's font selection mechanism (NFSS) supports 9~weight levels,
Expand Down Expand Up @@ -360,6 +404,22 @@ \subsection{Supporting the \texttt{ssc} and \texttt{sw} shapes}
\githubissue{1581}


\subsection{Improving the handling of \cs{label}, \cs{index}, and \cs{glossary}}

In standard \LaTeX{}, the three commands \cs{label}, \cs{index}, and
\cs{glossary} take exactly one mandatory argument, e.g.,
\verb=\index{=\meta{entry}\verb=}=. In some extension packages, for
example, in \pkg{index} or \pkg{cleveref}, they are augmented to
accept an optional argument and in case of \cs{index} also a star
form. These extensions conflict with \LaTeX's way of disabling the
commands within the table of contents or within the running header,
because there, they were redefined to expect just a mandatory argument
and then do nothing. We have now changed that behavior so that the
redefinitions in these places accept an extended syntax.
%
\githubissue{311}


\section{Bug fixes}

\subsection{Fix the use of \texttt{localmathalpabets}}
Expand Down Expand Up @@ -417,6 +477,35 @@ \subsection{Process global options once per package}
%
\githubissue{1619}


\subsection{Make \cs{label}, \cs{index}, and \cs{glossary} truely invisible in running headers}

\LaTeX{} has had a bug since its initial implementation, in that it
correctly ignored any \cs{label}, \cs{index}, or \cs{glossary}
appearing in a mark, but neglected to handle the spaces around the
command. As a result one could end up with two spaces in the running
header when only one should be present. This was detected as part of
working on issue~311 and has now been corrected.
%
\githubissue{1638}



\section{Documentation}

\subsection{Clarifying space handling of \cs{textcolor}}

In contrast to other \cs{text}-commands like \cs{textbf} or
\cs{textrm}, the command \cs{textcolor} gobbles spaces at the start of
its argument, so \verb*=Hello\textcolor{red}{ World}= will output
Hello\textcolor{red}{ World}. There are technical as well as
compatibility reasons for this, so the behavior will not change. This
has now been clarified in the documentation.
%
\githubissue{1474}



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

\section{Changes to packages in the \pkg{graphics} category}
Expand Down Expand Up @@ -449,7 +538,7 @@ \subsection{\pkg{multicol}:\ Full support for extended marks}
\subsection{\pkg{array}:\ Improve preamble setup code for \texttt{p} and friends}

While the preamble of a \env{tabular} or \env{array} is being built
the arguments to \texttt{p}, \texttt{m}, or \texttt{b} columns got
the arguments to \texttt{p}, \texttt{m}, or \texttt{b} columns got
expanded several times. This is normally harmless because that
argument contains usually just a dimension. However, in a case like
\verb=p{\fpeval{15}pt}= this resulted in an error, because \cs{fpeval}
Expand Down
66 changes: 60 additions & 6 deletions base/doc/usrguide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
\usepackage{url}

\title{\LaTeX\ for authors\\ current version}
\author{\copyright~Copyright 2020--2024, \LaTeX\ Project Team.\\
\author{\copyright~Copyright 2020--2025, \LaTeX\ Project Team.\\
All rights reserved.%
\footnote{This file 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. See the source
\texttt{usrguide.tex} for full details.}%
}

\date{2024-11-17}
\date{2025-01-24}

\NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}}
\NewDocumentCommand\marg{m}{\arg{#1}}
Expand Down Expand Up @@ -837,10 +837,12 @@ \subsection{Using the verbatim argument types}

Some additional details that may be useful for those with more \TeX{}
knowledge: do not worry if this does not make sense to you! Spaces and tabs are
stored as active characters. In Unicode engines, all other characters are of
type \enquote{other}. In $8$-bit engines, the ASCII characters other than tab
and space are of type \enquote{other}, and non-ASCII characters are active. As
such, token-based comparisons are likely to fail unless set up properly.
stored as active characters. In $8$-bit engines, non-ASCII characters are
\enquote{active}, whilst other than the letters a--zA--Z, ASCII characters are
\enquote{other}. In Unicode engines, non-ASCII codepoints will be either
letters or \enquote{other}, based on the standard \LaTeX{} settings derived
from Unicode data. For token-based comparisons, it is likely that the active
spaces and tabs should be replaced: this can be done conveniently by expansion.

\subsection{Typesetting verbatim-like material}

Expand All @@ -858,6 +860,58 @@ \subsection{Typesetting verbatim-like material}
Similarly, the \texttt{verbatim} environment sets up the meaning of \cs{par}
suitable for breaking lines.

\subsection{Verbatim environments}
\label{sec:cmd:verbenv}

In some cases, when grabbing the body of an environment you will want the
contents to be treated verbatim. This is available using the argument
specification~\texttt{c}. Like the \texttt{b} specification, this has to be the
last one. Thus for example
\begin{verbatim}
\NewDocumentEnvironment{MyVerbatim}{!O{\ttfamily} c}
{\begin{center} #1 #2\end{center}} {}
\begin{MyVerbatim}[\ttfamily\itshape]
% Some code is shown here
$y = mx + c$
\end{MyVerbatim}
\end{verbatim}
will typeset verbatim the content, thus:
\NewDocumentEnvironment{MyVerbatim}{!O{\ttfamily} c}
{\begin{center} #1 #2\end{center}} {}
\begin{MyVerbatim}[\ttfamily\itshape]
% Some code is shown here
$y = mx + c$
\end{MyVerbatim}

Since grabbing the entire contents verbatim will result in there being no
\cs{par} tokens, newlines are always permitted: there is no need for a
|+|~modifier here. As for the \texttt{v} specification, newlines are stored as
\cs{obeyedline}. In a similar fashion to the \texttt{b}~specification, by
default \emph{newlines} are trimmed at both ends of the body. Putting the
prefix |!| before \texttt{c} suppresses this trimming.

Collection of the body takes place on a line-by-line basis: content is
collected up to the end-of-line in the source, then examined before storage.
This means that the line ending the environment (containing in the example
above |\end{MyVerbatim}|) cannot have any text \emph{after} the end of the
environment. Text \emph{before} the end of environment is treated normally,
but note that there is no trailing \cs{obeyedline} added if there is text here.
Other than optional arguments, no text is allowed on the opening line of the
environment.

Special handling is applied to a \texttt{o}, \texttt{O}, \texttt{d} or
\texttt{D}~specification argument immediately before an
\texttt{c}~specification. This means that when the optional argument is absent,
the first character of the next line will be read with the correctly applied
verbatim category code. Issues may arise if \emph{multiple} optional arguments
are used before a \texttt{c}~specification, and are therefore strongly
discouraged.

For technical reasons, we recommend that spaces are \emph{not} ignored when
searching for an optional argument before an \texttt{c} specification: this can
be achieved by adding the \texttt{!} modifier as shown in the example.
However, this is left as a choice for the user.

\subsection{Performance}

For document commands where the argument specification is entirely
Expand Down
Loading

0 comments on commit b05a788

Please sign in to comment.