diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 9f5418fd63d..cf6e2ce2719 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -506,7 +506,7 @@ will be set to white}% #2% % MEMO: at 5.1.0 and up to 6.2.0, an \edef with \number\dimexpr was % used here. Since 6.2.0, expansion is delayed to time of use as for - % the other dimensions handled above. This is synced with an added + % the other dimensions handled above. This is synched with an added % encapsulation in \dimexpr...\relax by the "setup" from % sphinxpackageboxes.sty. An induced regression had to be fixed in % the sphinxShadowBox environment as it was using in an \ifdim the diff --git a/sphinx/texinputs/sphinxlatexshadowbox.sty b/sphinx/texinputs/sphinxlatexshadowbox.sty index a82c0455f11..e087e5f980d 100644 --- a/sphinx/texinputs/sphinxlatexshadowbox.sty +++ b/sphinx/texinputs/sphinxlatexshadowbox.sty @@ -23,15 +23,14 @@ {topic}{sphinxtopicBorderColor}{sphinxtopicBgColor}{sphinxtopicShadowColor}% }% -% At 5.1.0 the code formerly here has been refactored and incorporated -% into more powerful \spx@boxes@fcolorbox from sphinxpackageboxes.sty -% (which not only has a @rectangle variant but also @rounded) -\long\def\spx@ShadowFBox#1{% - \leavevmode - \setbox\z@\hbox{#1}% - % \spx@shadowbox@boxes@fcolorbox@setup MUST have been called before - \spx@boxes@fcolorbox{\box\z@}% -} +% At 5.1.0 the code formerly here in a definition of \spx@ShadowFBox has been +% refactored to hand over to a more powerful \spx@boxes@fcolorbox provided by +% file sphinxpackageboxes.sty, it can draw rounded corners and add a background +% color. + +% At 6.2.0, \spx@ShadowFBox is so much simplified that it is now not +% separatedly defined but directly incorporated into the \FrameCommand +% definition done by sphinxShadowBox environment below. % Use framed.sty \MakeFramed/\endMakeFramed to allow page breaks for topic % boxes. Originally Sphinx used \shadowbox from fancybox.sty but it did not @@ -56,7 +55,20 @@ \spx@shadowbox@boxes@fcolorbox@setup % we will use the dimen registers from sphinxpackageboxes.sty which now hold % the values from options related to topic/contents - \def\FrameCommand {\spx@ShadowFBox }% + % MEMO: \spx@boxes@fcolorbox creates an \hbox but does not quit vertical + % mode; but in context of framed.sty's \FrameCommand TeX is already + % in restricted horizontal mode, so no need for a \leavevmode here. + \def\FrameCommand {\spx@boxes@fcolorbox}% + % 6.2.0 adds support for div.topic_box-decoration-break=slice. + % (it is yet undecided if slice style should inhibit a bottom shadow) + \ifspx@topic@border@open + \def\FirstFrameCommand + {\spx@boxes@fcolorbox@setup@openbottom\FrameCommand}% + \def\MidFrameCommand + {\spx@boxes@fcolorbox@setup@openboth \FrameCommand}% + \def\LastFrameCommand + {\spx@boxes@fcolorbox@setup@opentop \FrameCommand}% + \fi \advance\spx@image@maxheight -\dimexpr\spx@boxes@border@top+\spx@boxes@border@bottom +\spx@boxes@padding@top+\spx@boxes@padding@bottom