Skip to content

Commit

Permalink
Replace \@tempa with \reserved@a in \Ref (latex3#1579)
Browse files Browse the repository at this point in the history
Rollbacks are updated too.
  • Loading branch information
muzimuzhi committed Dec 9, 2024
1 parent 803ec3b commit 6a2accb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
4 changes: 4 additions & 0 deletions base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ to completeness or accuracy and it contains some references to files that are
not part of the distribution.
================================================================================

2024-12-10 Yukai Chou <[email protected]>
* ltxref.dtx (subsection{Cross Referencing})
Replace \@tempa with \reserved@a in \Ref (gh/1579)

2024-12-03 Yukai Chou <[email protected]>
* ltmarks.dtx (subsection{Allocating new mark classes}):
Fix inconsistent local/global assignment (gh/1574)
Expand Down
19 changes: 10 additions & 9 deletions base/ltxref.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltxref.dtx}
[2024/09/20 v1.1r LaTeX Kernel (Cross Referencing)]
[2024/12/10 v1.1s LaTeX Kernel (Cross Referencing)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltxref.dtx}
Expand Down Expand Up @@ -549,10 +549,11 @@
% \changes{v1.1l}{2019/08/22}{Commanded moved from \texttt{varioref.sty}}
% \changes{v1.1p}{2022/04/12}{Macro reimplemented with a starred version}%
% \begin{macrocode}
\def\@kernel@Ref#1{\protected@edef\@tempa{\@kernel@ref{#1}}%
\expandafter\MakeUppercase\@tempa}
\def\@kernel@sRef#1{\protected@edef\@tempa{\@kernel@sref{#1}}%
\expandafter\MakeUppercase\@tempa}
% \changes{v1.1s}{2024/12/10}{Replace \cs{@tempa} with \cs{reserved@a} (gh/1579)}
\def\@kernel@Ref#1{\protected@edef\reserved@a{\@kernel@ref{#1}}%
\expandafter\MakeUppercase\reserved@a}
\def\@kernel@sRef#1{\protected@edef\reserved@a{\@kernel@sref{#1}}%
\expandafter\MakeUppercase\reserved@a}
\NewDocumentCommand\Ref{s}
{\IfBooleanTF{#1}{\@kernel@sRef}{\@kernel@Ref}}
% \end{macrocode}
Expand Down Expand Up @@ -583,8 +584,8 @@
%<latexrelease> {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
%<latexrelease>}
%<latexrelease>\def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1}
%<latexrelease>\DeclareRobustCommand\Ref[1]{\protected@edef\@tempa{\ref{#1}}%
%<latexrelease> \expandafter\MakeUppercase\@tempa}
%<latexrelease>\DeclareRobustCommand\Ref[1]{\protected@edef\reserved@a{\ref{#1}}%
%<latexrelease> \expandafter\MakeUppercase\reserved@a}
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{2019/10/01}%
%<latexrelease> {\refstepcounter}{Add \labelformat and \Ref}%
Expand All @@ -594,8 +595,8 @@
%<latexrelease> {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
%<latexrelease>}
%<latexrelease>\def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1}
%<latexrelease>\DeclareRobustCommand\Ref[1]{\protected@edef\@tempa{\ref{#1}}%
%<latexrelease> \expandafter\MakeUppercase\@tempa}
%<latexrelease>\DeclareRobustCommand\Ref[1]{\protected@edef\reserved@a{\ref{#1}}%
%<latexrelease> \expandafter\MakeUppercase\reserved@a}
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\refstepcounter}{Add \labelformat and \Ref}%
Expand Down

0 comments on commit 6a2accb

Please sign in to comment.