mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #4250 from jfbu/4249_errhighlight
Fix #4249 by overriding Pygments latex formatter error highlighting
This commit is contained in:
commit
0febbc552a
@ -208,6 +208,17 @@
|
|||||||
|
|
||||||
% stylesheet for highlighting with pygments
|
% stylesheet for highlighting with pygments
|
||||||
\RequirePackage{sphinxhighlight}
|
\RequirePackage{sphinxhighlight}
|
||||||
|
% fix baseline increase from Pygments latex formatter in case of error tokens
|
||||||
|
% and keep \fboxsep's scope local via added braces
|
||||||
|
\def\PYG@tok@err{%
|
||||||
|
\def\PYG@bc##1{{\setlength{\fboxsep}{-\fboxrule}%
|
||||||
|
\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}%
|
||||||
|
}
|
||||||
|
\def\PYG@tok@cs{%
|
||||||
|
\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}%
|
||||||
|
\def\PYG@bc##1{{\setlength{\fboxsep}{0pt}%
|
||||||
|
\colorbox[rgb]{1.00,0.94,0.94}{\strut ##1}}}%
|
||||||
|
}%
|
||||||
|
|
||||||
|
|
||||||
%% OPTIONS
|
%% OPTIONS
|
||||||
|
Loading…
Reference in New Issue
Block a user