diff options
author | jfbu <jfbu@free.fr> | 2021-02-13 10:20:05 +0100 |
---|---|---|
committer | jfbu <jfbu@free.fr> | 2021-02-13 10:20:05 +0100 |
commit | cea87d13acaa963526f8ac67efb101f2cfa53ab3 (patch) | |
tree | 8b8cce36749da9fe475d10defe19f55038283cb2 | |
parent | 473718c4d46f8623785e6dd625c5f7140be1e403 (diff) | |
download | sphinx-git-cea87d13acaa963526f8ac67efb101f2cfa53ab3.tar.gz |
Mention pygments_style in sphinxhighlight.sty
-rw-r--r-- | sphinx/builders/latex/__init__.py | 3 | ||||
-rw-r--r-- | sphinx/highlighting.py | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/builders/latex/__init__.py b/sphinx/builders/latex/__init__.py index dc533b486..d8dc1aff4 100644 --- a/sphinx/builders/latex/__init__.py +++ b/sphinx/builders/latex/__init__.py @@ -256,7 +256,8 @@ class LaTeXBuilder(Builder): with open(stylesheet, 'w') as f: f.write('\\NeedsTeXFormat{LaTeX2e}[1995/12/01]\n') 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()) def write(self, *ignored: Any) -> None: diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index 18d2f72bd..ad010474e 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -57,6 +57,7 @@ _LATEX_ADD_STYLES = r''' # cf pygments #1708 which makes this unneeded for Pygments > 2.7.4 _LATEX_ADD_STYLES_FIXPYG = r''' \makeatletter +% fix for Pygments <= 2.7.4 \let\spx@original@fcolorbox\fcolorbox \def\spx@fixpyg@fcolorbox{\fboxsep-\fboxrule\spx@original@fcolorbox} \def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+% |