Make PDF support for emphasize-lines work with lineno-start like html

This commit is contained in:
jfbu 2017-12-10 16:18:08 +01:00
parent 8ac042a0f8
commit 347f15ca28

View File

@ -904,7 +904,7 @@
\fi
\renewcommand\FancyVerbFormatLine[1]{%
\expandafter\sphinx@verbatim@checkifhl
\expandafter{\the\value{FancyVerbLine}}%
\expandafter{\the\numexpr\value{FancyVerbLine}-\spx@verbatim@linedelta}%
\ifin@
\edef\sphinx@restorefboxsep{\fboxsep\the\fboxsep\relax}%
\fboxsep\z@
@ -914,6 +914,10 @@
\sphinx@FancyVerbFormatLine{##1}%
\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
\let\VerbatimEnvironment\sphinxVerbatimEnvironment
% go around fancyvrb's check of current list depth