Skip to content

Commit

Permalink
LaTeX: fix another incompatibility with old pict2e LaTeX
Browse files Browse the repository at this point in the history
We need to make sure the \put command arguments will expand to a
(fractional) number, so \strip@pt is added, and the \dimexpr properly
closed with \relax
  • Loading branch information
jfbu committed Jul 23, 2022
1 parent faccc21 commit d1b4a75
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sphinx/texinputs/sphinxpackageboxes.sty
Original file line number Diff line number Diff line change
Expand Up @@ -362,16 +362,16 @@
\dimexpr\dp\spx@tempboxa+\spx@boxes@padding@bottom+\spx@boxes@border\relax
\hbox{%
\begin{picture}%
% \strip@pt\dimexpr fot work around "old" LaTeX picture limitation
% \strip@pt\dimexpr to work around "old" LaTeX picture limitation
% (we could use the "picture" package, this would add another dependency)
(\strip@pt\wd\spx@tempboxa,\strip@pt\dimexpr\ht\spx@tempboxa+\dp\spx@tempboxa)%
(\strip@pt\dimexpr-.5\spx@boxes@border,\strip@pt\dimexpr-.5\spx@boxes@border)%
(\strip@pt\wd\spx@tempboxa,\strip@pt\dimexpr\ht\spx@tempboxa+\dp\spx@tempboxa\relax)%
(\strip@pt\dimexpr-.5\spx@boxes@border\relax,\strip@pt\dimexpr-.5\spx@boxes@border\relax)%
\ifspx@boxes@withshadow
\color{spx@boxes@shadowcolor}%
\put(\dimexpr\ifdim\spx@boxes@shadow@xoffset<\z@-\fi
0.5\spx@boxes@border+\spx@boxes@shadow@xoffset,%
\dimexpr\ifdim\spx@boxes@shadow@yoffset<\z@\else-\fi
0.5\spx@boxes@border-\spx@boxes@shadow@yoffset)
\put(\strip@pt\dimexpr\ifdim\spx@boxes@shadow@xoffset<\z@-\fi
0.5\spx@boxes@border+\spx@boxes@shadow@xoffset\relax,%
\strip@pt\dimexpr\ifdim\spx@boxes@shadow@yoffset<\z@\else-\fi
0.5\spx@boxes@border-\spx@boxes@shadow@yoffset\relax)
{\spx@boxes@borderpath\fillpath}%
{\ifspx@boxes@withbackgroundcolor\else
\color{white}% or rather try to use page color?
Expand Down

0 comments on commit d1b4a75

Please sign in to comment.