diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-02-27 14:55:04 +0100 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-02-27 14:55:04 +0100 |
| commit | f0ae8e44eb9b2c5fe3f555643a77ac45d5856e75 (patch) | |
| tree | 89846d2491945c1f4b73fa970bc902e83a231301 | |
| parent | 672c50777f47ef5aa7d397f5437ca1687b94a599 (diff) | |
add source file names to listings
| -rw-r--r-- | latexHeaders/code.sty | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/latexHeaders/code.sty b/latexHeaders/code.sty index 987f43d..af7f817 100644 --- a/latexHeaders/code.sty +++ b/latexHeaders/code.sty @@ -118,6 +118,18 @@ } } +\lst@AddToHook{DeInit}{% + \ifthenelse{\equal{\lst@name}{}}{}{% + \begin{minipage}[b][0pt]{\linewidth}% + \vspace{0pt}% + \hfill% + \begin{ocg}[printocg=never]{Source file names}{srcfiles}{0}% + \hfill\textcolor{gray}{\lst@name}% + \end{ocg}% + \end{minipage}% + }% +} + \newenvironment{btHighlight}[1][] {\begingroup\tikzset{bt@Highlight@par/.style={#1}}\begin{lrbox}{\@tempboxa}} {\end{lrbox}\bt@HL@box[bt@Highlight@par]{\@tempboxa}\endgroup} |
