diff --git a/base/doc/ltnews41.tex b/base/doc/ltnews41.tex index 04a186bcb..1cfc7fc98 100644 --- a/base/doc/ltnews41.tex +++ b/base/doc/ltnews41.tex @@ -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. @@ -466,6 +466,15 @@ \subsection{Process global options once per package} % \githubissue{1619} +\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} @@ -498,7 +507,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} diff --git a/required/graphics/color.dtx b/required/graphics/color.dtx index eb2d5e4cc..a35d6f6e9 100644 --- a/required/graphics/color.dtx +++ b/required/graphics/color.dtx @@ -21,7 +21,7 @@ % \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> @@ -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 diff --git a/required/graphics/grfguide.tex b/required/graphics/grfguide.tex index 4dfdb4ca8..a5be49f18 100644 --- a/required/graphics/grfguide.tex +++ b/required/graphics/grfguide.tex @@ -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 @@ -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 @@ -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}