Created
October 14, 2019 07:56
-
-
Save schors/44e177d8acf0f681bf3c13ca949110e3 to your computer and use it in GitHub Desktop.
Обход ошибки подключения пакета lstlinebgrd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\makeatletter | |
\let\old@lstKV@SwitchCases\lstKV@SwitchCases | |
\def\lstKV@SwitchCases#1#2#3{} | |
\makeatother | |
\usepackage{lstlinebgrd} | |
\makeatletter | |
\let\lstKV@SwitchCases\old@lstKV@SwitchCases | |
\lst@Key{numbers}{none}{% | |
\def\lst@PlaceNumber{\lst@linebgrd}% | |
\lstKV@SwitchCases{#1}% | |
{none:\\% | |
left:\def\lst@PlaceNumber{\llap{\normalfont | |
\lst@numberstyle{\thelstnumber}\kern\lst@numbersep}\lst@linebgrd}\\% | |
right:\def\lst@PlaceNumber{\rlap{\normalfont | |
\kern\linewidth \kern\lst@numbersep | |
\lst@numberstyle{\thelstnumber}}\lst@linebgrd}% | |
}{\PackageError{Listings}{Numbers #1 unknown}\@ehc}} | |
\makeatother |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment