Mention pygments_style in sphinxhighlight.sty

This commit is contained in:
jfbu
2021-02-13 10:20:05 +01:00
parent 473718c4d4
commit cea87d13ac
2 changed files with 3 additions and 1 deletions

View File

@@ -256,7 +256,8 @@ class LaTeXBuilder(Builder):
with open(stylesheet, 'w') as f: with open(stylesheet, 'w') as f:
f.write('\\NeedsTeXFormat{LaTeX2e}[1995/12/01]\n') f.write('\\NeedsTeXFormat{LaTeX2e}[1995/12/01]\n')
f.write('\\ProvidesPackage{sphinxhighlight}' f.write('\\ProvidesPackage{sphinxhighlight}'
'[2016/05/29 stylesheet for highlighting with pygments]\n\n') '[2016/05/29 stylesheet for highlighting with pygments]\n')
f.write('% Its contents depend on pygments_style configuration variable.\n\n')
f.write(highlighter.get_stylesheet()) f.write(highlighter.get_stylesheet())
def write(self, *ignored: Any) -> None: def write(self, *ignored: Any) -> None:

View File

@@ -57,6 +57,7 @@ _LATEX_ADD_STYLES = r'''
# cf pygments #1708 which makes this unneeded for Pygments > 2.7.4 # cf pygments #1708 which makes this unneeded for Pygments > 2.7.4
_LATEX_ADD_STYLES_FIXPYG = r''' _LATEX_ADD_STYLES_FIXPYG = r'''
\makeatletter \makeatletter
% fix for Pygments <= 2.7.4
\let\spx@original@fcolorbox\fcolorbox \let\spx@original@fcolorbox\fcolorbox
\def\spx@fixpyg@fcolorbox{\fboxsep-\fboxrule\spx@original@fcolorbox} \def\spx@fixpyg@fcolorbox{\fboxsep-\fboxrule\spx@original@fcolorbox}
\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+% \def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+%