Skip to content

Commit

Permalink
Merge branch 'develop' into gh1638
Browse files Browse the repository at this point in the history
# Conflicts:
#	base/doc/ltnews41.tex
  • Loading branch information
FrankMittelbach committed Jan 24, 2025
2 parents 7f8406e + 19d68da commit f42fd05
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 28 deletions.
21 changes: 18 additions & 3 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 @@ -256,7 +256,7 @@ \subsection{Collecting environment bodies verbatim}

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
\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
Expand Down Expand Up @@ -466,6 +466,7 @@ \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
Expand All @@ -479,6 +480,20 @@ \subsection{Make \cs{label}, \cs{index}, and \cs{glossary} truely invisible in r



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

Expand Down Expand Up @@ -512,7 +527,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
22 changes: 11 additions & 11 deletions base/doc/usrguide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
\texttt{usrguide.tex} for full details.}%
}

\date{2025-01-23}
\date{2025-01-24}

\NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}}
\NewDocumentCommand\marg{m}{\arg{#1}}
Expand Down Expand Up @@ -863,7 +863,7 @@ \subsection{Typesetting verbatim-like material}
\subsection{Verbatim environments}
\label{sec:cmd:verbenv}

In some cases, as well as grabbing an environment body you will want the
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
Expand All @@ -875,20 +875,20 @@ \subsection{Verbatim environments}
$y = mx + c$
\end{MyVerbatim}
\end{verbatim}
will typeset
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}

As grabbing the entire contents verbatim means there are no \cs{par} tokens,
newlines are always permitted: there is no need for a |+| 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
space-trimming.
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.
Expand All @@ -903,12 +903,12 @@ \subsection{Verbatim environments}
\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 properly. Issues may arise if
\emph{multiple} optional arguments are used before an \texttt{c}~specification,
\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 showing in the example.
be achieved by adding the \texttt{!} modifier as shown in the example.
However, this is left as a choice for the user.

\subsection{Performance}
Expand Down
6 changes: 3 additions & 3 deletions base/ltcmd.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
%
% \begin{macrocode}
\def\ltcmdversion{v1.3a}
\def\ltcmddate{2025-01-23}
\def\ltcmddate{2025-01-24}
% \end{macrocode}
%
%<*driver>
Expand Down Expand Up @@ -138,7 +138,7 @@
%
% \begin{variable}{\l_@@_total_args_int}
% \changes{v1.3a}{2025-01-23}{New variable}
% The total number of arguments found during normalization: this is needed
% The total number of arguments found during normalization: this is required
% where special action is needed for the penultimate argument.
% \begin{macrocode}
\int_new:N \l_@@_total_args_int
Expand Down Expand Up @@ -341,7 +341,7 @@
%
% \begin{variable}{\l_@@_final_verb_bool}
% \changes{v1.3a}{2025-01-23}{New variable}
% Needed to establish if optional arguments should be collected
% Needed to establish whether optional arguments should be collected
% \enquote{verbatim safe}.
% \begin{macrocode}
\bool_new:N \l_@@_final_verb_bool
Expand Down
6 changes: 3 additions & 3 deletions base/testfiles/github-1638.lvt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
% Showed 2 spaces in running header, but one (correct) in TOC
% Showed 2 spaces in running header, but one (correct) in TOC.
%
% Also test extended syntax (which has no separate test).
%
% As neither \label nor \idex have an extended syntax so far you get strange
% output in the heading, but the TOC and the running header is ok
% As neither \label nor \index has an extended syntax so far you get strange
% output in the heading, but the TOC and the running header is ok.

\documentclass{book}

Expand Down
6 changes: 4 additions & 2 deletions required/graphics/color.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
%<driver> \ProvidesFile{color.drv}
% \fi
% \ProvidesFile{color.dtx}
[2024/06/23 v1.3e Standard LaTeX Color (DPC)]
[2025/01/14 v1.3e Standard LaTeX Color (DPC)]
%
% \iffalse
%<*driver>
Expand Down Expand Up @@ -458,7 +458,9 @@
% specified colour, but then the colour reverts to its previous value.
% The naming is by analogy with |\textrm| (as opposed to |\rm| and
% |\rmfamily|) although it is slightly a misnomer as the command also
% works in math-mode.
% works in math-mode. In contrast to |\textrm|, the command gobbles spaces
% at the begin of its argument, so |Hello\textcolor{red}{ World}| will
% output Hello\textcolor{red}{ World}.
%
% Since December 95, in fact this command has one other difference
% from |\color|. It calls |\leavevmode| to ensure the start of
Expand Down
14 changes: 8 additions & 6 deletions required/graphics/grfguide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
\title{Packages in the `graphics' bundle}
\author{D. P. Carlisle \and The \LaTeX\ Project}

\date{2024-12-31}
\date{2025-01-14}

\maketitle

Expand Down Expand Up @@ -231,8 +231,9 @@ \subsubsection{Using predefined colours}
\end{decl}

This is a \emph{declaration}, like |\bfseries|. It changes the current
colour to \m{name} until the end of the current group or
environment.
colour to \m{name} until the end of the current group, or
environment. It does not automatically start horizontal mode so typically at
the start of a paragraph it should be used in combination with a |\leavevmode|.

An alternative command syntax is to use a \emph{command} form that
takes the text to be coloured as an \emph{argument}. This is similar
Expand All @@ -242,9 +243,10 @@ \subsubsection{Using predefined colours}
|\textcolor|\arg{name}\arg{text}
\end{decl}


So the above is essentially equivalent to
|{\color|\arg{name}\emph{text}|}|.
The command switches to horizontal mode,
so the above is essentially equivalent to
|{\leavevmode\color|\arg{name}\emph{text}|}|. In contrast to |\textbf|,
the command gobbles spaces at the start of its argument, so |Hello\textcolor{red}{ World}| will output Hello\textcolor{red}{ World}.

\subsection{Using Colours in math formulas}

Expand Down

0 comments on commit f42fd05

Please sign in to comment.