mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Make PDF support for emphasize-lines work with lineno-start like html
This commit is contained in:
@@ -904,7 +904,7 @@
|
|||||||
\fi
|
\fi
|
||||||
\renewcommand\FancyVerbFormatLine[1]{%
|
\renewcommand\FancyVerbFormatLine[1]{%
|
||||||
\expandafter\sphinx@verbatim@checkifhl
|
\expandafter\sphinx@verbatim@checkifhl
|
||||||
\expandafter{\the\value{FancyVerbLine}}%
|
\expandafter{\the\numexpr\value{FancyVerbLine}-\spx@verbatim@linedelta}%
|
||||||
\ifin@
|
\ifin@
|
||||||
\edef\sphinx@restorefboxsep{\fboxsep\the\fboxsep\relax}%
|
\edef\sphinx@restorefboxsep{\fboxsep\the\fboxsep\relax}%
|
||||||
\fboxsep\z@
|
\fboxsep\z@
|
||||||
@@ -914,6 +914,10 @@
|
|||||||
\sphinx@FancyVerbFormatLine{##1}%
|
\sphinx@FancyVerbFormatLine{##1}%
|
||||||
\fi
|
\fi
|
||||||
}%
|
}%
|
||||||
|
% hook into this macro to recover the line numbering offset (default zero)
|
||||||
|
\expandafter\def\expandafter\FancyVerbCodes\expandafter{\FancyVerbCodes
|
||||||
|
\FV@SetLineNo
|
||||||
|
\edef\spx@verbatim@linedelta{\the\value{FancyVerbLine}}}%
|
||||||
% go around fancyvrb's check of \@currenvir
|
% go around fancyvrb's check of \@currenvir
|
||||||
\let\VerbatimEnvironment\sphinxVerbatimEnvironment
|
\let\VerbatimEnvironment\sphinxVerbatimEnvironment
|
||||||
% go around fancyvrb's check of current list depth
|
% go around fancyvrb's check of current list depth
|
||||||
|
|||||||
Reference in New Issue
Block a user