latex style should limit change of `\fboxsep` in a scope by extra pair of braces

Create issue
Issue #1410 new
jfbu created an issue

The LaTeX Formatter style produces (with prefix = PYG):


This means that \PYG@bc macro acts at "top level". But, at and again at it is defined in a way which modifies the LaTeX length \fboxsep. This modification should be kept local. Of course, normally this is all encountered inside a Verbatim where each code line is a hbox hence limits the scope. But, in theory, even in this context it is still possible some macros are executed on same code line and then \fboxsep default should not be modified for them.

This is very minor problem.

Anyway, one way to fix it would be to modify above definition to


or modify




notice that in second approach, there is no need for \PYG@reset anymore (but it will have to have been executed once in the style file so that \PYG@bf etc... are initially \relax (or \empty)).

We encountered the problem at Sphinx and fixed it at

Comments (0)

  1. Log in to comment