-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF output: Pygments error highlighting increases line spacing in code blocks #4249
Labels
Milestone
Comments
This appears to a be a bug (or feature) of the Pygments latex formatter, because as far as I understand the |
jfbu
added a commit
to jfbu/sphinx
that referenced
this issue
Nov 20, 2017
jfbu
added a commit
to jfbu/sphinx
that referenced
this issue
Nov 20, 2017
jfbu
added a commit
to jfbu/sphinx
that referenced
this issue
Dec 6, 2017
jfbu
added a commit
that referenced
this issue
Dec 10, 2017
Fix #4249 by overriding Pygments latex formatter error highlighting
Fixed at 0febbc5 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Procedure to reproduce the problem
Apply following patch to silence Pygments exception on lexer error token:
Then do make latexpdf with index.rst being
and conf.py containing
Error logs / results
This produces this
Expected results
The two sides have the same height.
The problem is in the produced
sphinxhighlight.sty
file in the latex build repertory which containsIt should be
\setlength\fboxsep{-\fboxrule}
.Besides there is another bug, which is that braces should be used else the
\fboxsep
settting is not local. This does not show easily because each line in code-block is in its own TeX box, so the change does not propagate to other lines, and besides a priori, nothing uses again\fboxsep
setting. But it is a bug nevertheless.There is also
which has same unbraced
\setlength{\fboxsep}{0pt}
issue. (here0pt
is correct choice, though).Environment info
Relates
#4225
The text was updated successfully, but these errors were encountered: