summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-François B <2589111+jfbu@users.noreply.github.com>2023-03-07 00:42:11 +0100
committerJean-François B <2589111+jfbu@users.noreply.github.com>2023-03-07 00:58:58 +0100
commitba37288d67ef8a8e7df48000fa50f1ed894eb850 (patch)
treef32a4dfcac7538f54412cb2df176d1654ab9512f
parentbd1df24a1871d152c849d23e36586dd9e5492415 (diff)
downloadsphinx-git-ba37288d67ef8a8e7df48000fa50f1ed894eb850.tar.gz
LaTeX: fix unintended 1pt upwards vertical shift of rounded box frames
This issue was not clearly visible on code-blocks whose contents always occupy at least one full height line and 1pt is small compared to it and the default padding. It became more obvious when experimenting (work in progress) with applying the macro to inline contents with zero padding.
-rw-r--r--CHANGES2
-rw-r--r--sphinx/texinputs/sphinxpackageboxes.sty2
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 0d9c02b88..adeac9dbd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -25,6 +25,8 @@ Bugs fixed
following lists
* LaTeX: fix potential color leak from shadow to border of rounded boxes, if
shadow color is set but border color is not
+* LaTeX: fix unintended 1pt upwards vertical shift of code blocks frames
+ respective to contents (when using rounded corners)
* #11147: Fix source file/line number info in object description content and in
other uses of ``nested_parse_with_titles``. Patch by Jeremy Maitin-Shepard.
diff --git a/sphinx/texinputs/sphinxpackageboxes.sty b/sphinx/texinputs/sphinxpackageboxes.sty
index b2e0df6f1..d5a2e9a95 100644
--- a/sphinx/texinputs/sphinxpackageboxes.sty
+++ b/sphinx/texinputs/sphinxpackageboxes.sty
@@ -416,6 +416,8 @@
\dp\spx@tempboxa\dimexpr\dp\spx@tempboxa+\spx@boxes@shadow@yoffset\relax
\fi
\fi
+ % inhibit TeX's "line skip" adjustment when piling up hboxes in a vbox
+ \nointerlineskip
\box\spx@tempboxa
}% end of \vbox
% include lateral shadow in total width