From bc6f31f660f4326d3eb407c97cb83a757a88acf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= <2589111+jfbu@users.noreply.github.com> Date: Sun, 12 Mar 2023 12:59:56 +0100 Subject: [PATCH] LaTeX: use older syntax and not the ``\expanded`` added at #11234 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. --- sphinx/texinputs/sphinxlatexadmonitions.sty | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sphinx/texinputs/sphinxlatexadmonitions.sty b/sphinx/texinputs/sphinxlatexadmonitions.sty index 896c711aee2..b5b6dee1321 100644 --- a/sphinx/texinputs/sphinxlatexadmonitions.sty +++ b/sphinx/texinputs/sphinxlatexadmonitions.sty @@ -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 @@ -205,6 +205,6 @@ % trigger the sphinx 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