| 1 |
%% |
| 2 |
%% This is file `tikzmarklibrarylistings.code.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% tikzmark.dtx (with options: `listings') |
| 8 |
%% ---------------------------------------------------------------- |
| 9 |
%% tikzmark --- remembering absolute positioning with TikZ. |
| 10 |
%% E-mail: [email protected] |
| 11 |
%% Released under the LaTeX Project Public License v1.3c or later |
| 12 |
%% See http://www.latex-project.org/lppl.txt |
| 13 |
%% ---------------------------------------------------------------- |
| 14 |
%% |
| 15 |
|
| 16 |
\@ifpackageloaded{listings}{% |
| 17 |
\newif\iflst@linemark |
| 18 |
\lst@linemarktrue |
| 19 |
\lst@AddToHook{EveryLine}{% |
| 20 |
\begingroup |
| 21 |
\advance\c@lstnumber by 1\relax |
| 22 |
\pgfmark{line-\lst@name-\the\c@lstnumber-start}% |
| 23 |
\endgroup |
| 24 |
} |
| 25 |
\lst@AddToHook{EOL}{\pgfmark{line-\lst@name-\the\c@lstnumber-end}% |
| 26 |
\global\lst@linemarktrue |
| 27 |
} |
| 28 |
\lst@AddToHook{OutputBox}{% |
| 29 |
\iflst@linemark |
| 30 |
\pgfmark{line-\lst@name-\the\c@lstnumber-first}% |
| 31 |
\global\lst@linemarkfalse |
| 32 |
\fi |
| 33 |
} |
| 34 |
\def\tkzmk@lst@fnum#1\relax#2\@STOP{% |
| 35 |
\def\@test{#2}% |
| 36 |
\ifx\@test\@empty |
| 37 |
\def\tkzmk@lst@start{0}% |
| 38 |
\else |
| 39 |
\@tempcnta=#1\relax |
| 40 |
\advance\@tempcnta by -1\relax |
| 41 |
\def\tkzmk@lst@start{\the\@tempcnta}% |
| 42 |
\fi |
| 43 |
} |
| 44 |
\lst@AddToHook{Init}{% |
| 45 |
\expandafter\tkzmk@lst@fnum\lst@firstnumber\relax\@STOP |
| 46 |
\pgfmark{line-\lst@name-\tkzmk@lst@start-start}% |
| 47 |
} |
| 48 |
}{% |
| 49 |
\PackageError{tikzmark listings}% |
| 50 |
{The listings package has not been loaded.}{} |
| 51 |
} |
| 52 |
%% |
| 53 |
%% Copyright (C) 2011-2021 by Andrew Stacey <[email protected]> |
| 54 |
%% |
| 55 |
%% This work may be distributed and/or modified under the |
| 56 |
%% conditions of the LaTeX Project Public License (LPPL), either |
| 57 |
%% version 1.3c of this license or (at your option) any later |
| 58 |
%% version. The latest version of this license is in the file: |
| 59 |
%% |
| 60 |
%% http://www.latex-project.org/lppl.txt |
| 61 |
%% |
| 62 |
%% This work is "maintained" (as per LPPL maintenance status) by |
| 63 |
%% Andrew Stacey. |
| 64 |
%% |
| 65 |
%% This work consists of the file tikzmark.dtx |
| 66 |
%% and the derived files tikzmark.ins, |
| 67 |
%% tikzmark.pdf, |
| 68 |
%% tikzlibrarytikzmark.code.tex, and |
| 69 |
%% tikzmarklibrarylistings.code.tex |
| 70 |
%% tikzmarklibraryhighlighting.code.tex |
| 71 |
%% tikzmarklibraryams.code.tex |
| 72 |
%% |
| 73 |
%% |
| 74 |
%% End of file `tikzmarklibrarylistings.code.tex'. |