Skip to content

Commit

Permalink
[LaTeX] Work around a minipage feature of LaTeX prior to June 2023
Browse files Browse the repository at this point in the history
See "Improve spacing at top of minipages" in release notes of LaTeX June
2023 release.

https://www.latex-project.org/news/latex2e-news/ltnews37.pdf
  • Loading branch information
jfbu committed Jul 6, 2024
1 parent 7f62089 commit c50b1c4
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions sphinx/texinputs/sphinxlatexadmonitions.sty
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,13 @@
\newcommand\sphinxtitlerowbottompadding{3pt}
\newcommand\sphinxtitlerowaftericonspacecmd{\hskip0.75em\relax}
\newcommand\sphinxdotitlerowwithicon[2]{% #1=type, #2=heading (without final colon)
\kern-\spx@boxes@padding@top
\noindent
\kern-\spx@boxes@padding@left % must have been configured by a prior \spx@boxes@fcolorbox@setup{<type>}
\begingroup
\begingroup
\kern-\spx@boxes@padding@top
\parskip\z@skip % the \parskip business is a workaround to a vertical
% glue issue showing in LaTeX earlier than 2023-06-01
\noindent
\kern-\spx@boxes@padding@left % must have been configured by a prior
% \spx@boxes@fcolorbox@setup{<type>}
% inherit settings from the enclosing box and modify what is needed
\spx@boxes@border@top =\z@
\spx@boxes@border@right =\z@
Expand All @@ -311,9 +314,11 @@
\sphinxstrong{#2}%
\strut}%
}%
\endgroup
\kern-\spx@boxes@padding@right
\par\vskip-\parskip\kern\spx@boxes@padding@top
\kern-\spx@boxes@padding@right
\par
\endgroup
\vskip-\parskip
\kern\spx@boxes@padding@top
}

% #1 holds the localized name of the notice, postfixed with a colon.
Expand Down

0 comments on commit c50b1c4

Please sign in to comment.