Skip to content

Commit

Permalink
LaTeX: use older syntax and not the \expanded added at #11234
Browse files Browse the repository at this point in the history
Sorry about this, the \expanded was added to pdflatex in 2019 only
(but was available earlier to lualatex).  This is in contrast
with \unexpanded which has been available for more than 15 years.
  • Loading branch information
jfbu committed Mar 12, 2023
1 parent 212ed5b commit bc6f31f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sphinx/texinputs/sphinxlatexadmonitions.sty
Expand Up @@ -84,19 +84,19 @@
% as long as the related CSS-named options are not used.
\newenvironment{sphinxnote}[1]
{\edef\spx@env{sphinx\ifspx@opt@heavynote heavy\else light\fi box}%
\expanded{\noexpand\begin{\spx@env}}\sphinxstrong{#1} }
\expandafter\begin\expandafter{\spx@env}\sphinxstrong{#1} }
{\expandafter\end\expandafter{\spx@env}}
\newenvironment{sphinxhint}[1]
{\edef\spx@env{sphinx\ifspx@opt@heavyhint heavy\else light\fi box}%
\expanded{\noexpand\begin{\spx@env}}\sphinxstrong{#1} }
\expandafter\begin\expandafter{\spx@env}\sphinxstrong{#1} }
{\expandafter\end\expandafter{\spx@env}}
\newenvironment{sphinximportant}[1]
{\edef\spx@env{sphinx\ifspx@opt@heavyimportant heavy\else light\fi box}%
\expanded{\noexpand\begin{\spx@env}}\sphinxstrong{#1} }
\expandafter\begin\expandafter{\spx@env}\sphinxstrong{#1} }
{\expandafter\end\expandafter{\spx@env}}
\newenvironment{sphinxtip}[1]
{\edef\spx@env{sphinx\ifspx@opt@heavytip heavy\else light\fi box}%
\expanded{\noexpand\begin{\spx@env}}\sphinxstrong{#1} }
\expandafter\begin\expandafter{\spx@env}\sphinxstrong{#1} }
{\expandafter\end\expandafter{\spx@env}}

% warning/caution/attention/danger/error get more distinction
Expand Down Expand Up @@ -205,6 +205,6 @@
% trigger the sphinx<type> environment, #2=heading is passed as argument
\begin{sphinx#1}{#2}}
% workaround some LaTeX "feature" of \end command (can't use "sphinx#1" here)
{\expanded{\noexpand\end{sphinx\spx@noticetype}}}
{\edef\spx@temp{\noexpand\end{sphinx\spx@noticetype}}\spx@temp}

\endinput

0 comments on commit bc6f31f

Please sign in to comment.