latex formatter "border" style offsets baseline separation in output

Issue #1409 new
jfbu
created an issue

At https://bitbucket.org/birkenfeld/pygments-main/src/7941677dc77d4f2bf0bbd6140ade85a9454b8b80/pygments/formatters/latex.py?at=default&fileviewer=file-view-default#latex.py-304

it should be \setlength\fboxsep{-\fboxrule}. Indeed the \strut already forces the output to take full height+depth, hence the border will extend beyond that on top and below by an amount of \fboxrule causing the code line to take more vertical space than regular code lines not encountering this kind of styling.

The issue was encountered at Sphinx see https://github.com/sphinx-doc/sphinx/pull/4250/files for the patch there

Comments (0)

  1. Log in to comment