From 04f39ce7a74240f8cdcbb01ed96d4afce2306c49 Mon Sep 17 00:00:00 2001 From: Ulrike Fischer Date: Sun, 29 Sep 2024 00:30:30 +0200 Subject: [PATCH] remove unneeded color group commands --- ChangeLog | 2 ++ xcolor.dtx | 20 +++++--------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 705e2db..3f8ffd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ https://github.com/latex3/xcolor/issues History ======= +2024/09/29 +* remove definitions of color groups as they are already in the kernel. 2024/09/17 * unknown model error handled (issue #1) diff --git a/xcolor.dtx b/xcolor.dtx index 69110cf..2aa73fa 100644 --- a/xcolor.dtx +++ b/xcolor.dtx @@ -6191,11 +6191,13 @@ % % % \subsubsection{Extra groups} -% Turning on extra groups in the standard \LaTeX\ commands, so that color commands are scoped correctly. % -% Like |\normalcolor|, the following five commands are defined in the kernel, with empty definitions (|\relax|). +% Like |\normalcolor|, the following five commands are defined in the kernel. % This means that they can be used to make macros in packages `color safe'. -% The commands will not have any effect unless a user also uses a color package, when the `active definitions' here will take effect and keep color commands correctly scoped. +% The extra groups have been made permanent in the \LaTeX{} kernel 2021 so +% they are no longer redefined here. +% The |\color@setgroup| will not have any effect unless a user also uses +% a color package, when the `active definition' here will take effect. % % \begin{macro}{\color@setgroup} % This is to be used in contexts (e.g., `lrbox') where text is to be saved and used after some other, unknown, text that may contain color commands. @@ -6209,31 +6211,19 @@ % This is to be used at the start of contexts that may contain color commands, but where it is not necessary to save the current color. % Examples of this are in the box commands of \File{ltboxes.dtx} where user-supplied text is saved internally in a box between |\color@begingroup|, |\color@endgroup|, but the box is used before any other color commands could intervene. % A matching |\color@endgroup| should be used at the end of the text. -% \begin{macrocode} -\let\color@begingroup\begingroup -% \end{macrocode} % \end{macro} % % \begin{macro}{\color@endgroup} % To be used to close the `group' started by one of the above two commands. % The |\endgraf| in its definition is required in the case of groups of text in vertical `par' mode, but doesn't do any harm in horizontal `LR' contexts. -% \begin{macrocode} -\def\color@endgroup{\endgraf\endgroup} -% \end{macrocode} % \end{macro} % % \begin{macro}{\color@hbox} % To be used to open a `colored hbox' -% \begin{macrocode} -\def\color@hbox{\hbox\bgroup\color@begingroup} -% \end{macrocode} % \end{macro} % % \begin{macro}{\color@vbox} % To be used to open a `colored hbox' -% \begin{macrocode} -\def\color@vbox{\vbox\bgroup\color@begingroup} -% \end{macrocode} % \end{macro} % % \begin{macro}{\color@endbox}