%%
%% This is file `tikzmarklibrarylistings.code.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tikzmark.dtx  (with options: `listings')
%% ----------------------------------------------------------------
%% tikzmark --- remembering absolute positioning with TikZ.
%% E-mail: loopspace@mathforge.org
%% Released under the LaTeX Project Public License v1.3c or later
%% See http://www.latex-project.org/lppl.txt
%% ----------------------------------------------------------------
%% 
\@ifpackageloaded{listings}{%
    \newif\iflst@linemark
\lst@AddToHook{EveryLine}{%
  \begingroup
  \advance\c@lstnumber by 1\relax
  \pgfmark{line-\lst@name-\the\c@lstnumber-start}%
  \endgroup
}
\lst@AddToHook{EOL}{\pgfmark{line-\lst@name-\the\c@lstnumber-end}%
\global\lst@linemarktrue
}
\lst@AddToHook{OutputBox}{%
  \iflst@linemark
  \pgfmark{line-\lst@name-\the\c@lstnumber-first}%
  \global\lst@linemarkfalse
  \fi
}
\def\tkzmk@lst@fnum#1\relax#2\@STOP{%
  \def\@test{#2}%
  \ifx\@test\@empty
  \def\tkzmk@lst@start{0}%
  \else
  \@tempcnta=#1\relax
  \advance\@tempcnta by -1\relax
  \def\tkzmk@lst@start{\the\@tempcnta}%
  \fi
}
\lst@AddToHook{Init}{%
  \expandafter\tkzmk@lst@fnum\lst@firstnumber\relax\@STOP
  \pgfmark{line-\lst@name-\tkzmk@lst@start-start}%
}
}{%
    \PackageError{tikzmark listings}{The listings package has not been loaded.}{}
}
%% 
%% Copyright (C) 2011-2016 by Andrew Stacey <loopspace@mathforge.org>
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License (LPPL), either
%% version 1.3c of this license or (at your option) any later
%% version.  The latest version of this license is in the file:
%% 
%% http://www.latex-project.org/lppl.txt
%% 
%% This work is "maintained" (as per LPPL maintenance status) by
%% Andrew Stacey.
%% 
%% This work consists of the file  tikzmark.dtx
%% and the derived files           tikzmark.ins,
%%                                 tikzmark.pdf,
%%                                 tikzlibrarytikzmark.code.tex, and
%%                                 tikzmarklibrarylistings.code.tex
%% 
%%
%% End of file `tikzmarklibrarylistings.code.tex'.
