Skip to content

Commit

Permalink
LaTeX comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbu committed Jun 29, 2022
1 parent 099d408 commit 9741d13
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions sphinx/texinputs/sphinx.sty
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@
%% OPTION HANDLING
%

% We first handle options then load packages, but we need \definecolor from
% xcolor/color.

% FIXME: we should \RequirePackage{xcolor} always now
% The xcolor package draws better fcolorboxes around verbatim code
% We generally first handle options then load packages, but we need
% \definecolor from xcolor/color to handle the options.

% MEMO: xcolor \fcolorbox coloured boxes render better in some PDF viewers
% than with color package \fcolorbox. Since 1.6.3, Sphinx uses only its own
% custom variant of \fcolorbox when handling verbatim code. Currently (last
% checked at 5.0.0) \fcolorbox is used for admonitions (sphinxheavybox)
% and appears also in Pygmentize output mark-up.
\IfFileExists{xcolor.sty}{
\RequirePackage{xcolor}
}{
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexliterals.sty
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
\long\def\spx@fcolorbox #1#2#3#4#5{%
\hskip\@totalleftmargin
\hskip-\fboxsep\hskip-\fboxrule
% use of \color@b@x here is compatible with both xcolor.sty and color.sty
% MEMO: \color@b@x from xcolor.sty is identical with the one from color.sty
\color@b@x {\color{#1}\spx@CustomFBox{#3}{#4}}{\color{#2}}{#5}%
\hskip-\fboxsep\hskip-\fboxrule
\hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth
Expand Down

0 comments on commit 9741d13

Please sign in to comment.