mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Mention pygments_style in sphinxhighlight.sty
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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+%
|
||||||
|
|||||||
Reference in New Issue
Block a user