summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fancyvrb
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/fancyvrb')
-rw-r--r--macros/latex/contrib/fancyvrb/Changes2
-rw-r--r--macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdfbin123306 -> 138429 bytes
-rw-r--r--macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex23
-rw-r--r--macros/latex/contrib/fancyvrb/latex/fancyvrb.sty24
4 files changed, 42 insertions, 7 deletions
diff --git a/macros/latex/contrib/fancyvrb/Changes b/macros/latex/contrib/fancyvrb/Changes
index a0a1010991..af5b079d3e 100644
--- a/macros/latex/contrib/fancyvrb/Changes
+++ b/macros/latex/contrib/fancyvrb/Changes
@@ -1,4 +1,6 @@
--- fancyvrb.sty
+3.8 2021/08/12 - fix for linenumbers and reused SaveVerbatim (hv)
+ (thanks to Ohad Kammar)
3.7 2021/01/20 - delete a doubled definied macro (hv)
3.6 2020/05/03 - added optional argument reflabel for page references
to verbatim environments (hv)
diff --git a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
index fd5a4ed72f..875f151335 100644
--- a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
+++ b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
index 099ef80a63..a3c3466b2f 100644
--- a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
+++ b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
@@ -59,7 +59,7 @@
{\footnotesize and}\\[-2mm]
{\footnotesize Herbert Voß\ (FU Berlin -- DE)}
}
-\date{Version 3.7\\ \today}
+\date{\today}
\fvset{frame=single,xrightmargin=0cm,numbers=left,numbersep=3pt,commentchar=Z}
@@ -84,6 +84,7 @@ Jean-François Burnol,
Philippe Esperet, %\url{esperet@marie.polytechnique.fr},
Michael Friendly, %\url{friendly@hotspur.psych.yorku.ca},
Mario Hassler, %\url{HASSLER@ippnv2.ipp.kfa-juelich.de},
+Ohad Kammar, % \url{ohad.kammar@ed.ac.uk},
Mikhail Kolodin, %\url{myke@morrigan.spb.su},
Andreas Matthias,
Frank Mittelbach,
@@ -1107,6 +1108,26 @@ entire verbatim environments:
\LUseVerbatim{VerbEnv}
\end{SideBySideExample}
+
+\begin{SideBySideExample}
+\begin{SaveVerbatim}{FOO}
+However, if I define a
+reusable Verbatim by
+SaveVerbatim,
+linenumbers works.
+\end{SaveVerbatim}
+
+\begin{Verbatim}[numbers=left]
+This works.
+I use Verbatim directly.
+\end{Verbatim}
+
+\UseVerbatim[numbers=left]{FOO}
+\end{SideBySideExample}
+
+
+\clearpage
+
\section{Writing and reading verbatim files}
\label{sec:VerbatimInclude}
diff --git a/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty b/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
index 2efbf7d248..1211daa44e 100644
--- a/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
+++ b/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
@@ -13,9 +13,9 @@
%% verbatim environments and commands and extensive documentation.
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{3.7}
-\def\filedate{2021/01/20}
-\ProvidesPackage{fancyvrb}[2021/01/20 v3.7 verbatim text (tvz,hv)]
+\def\fileversion{3.8}
+\def\filedate{2021/08/12}
+\ProvidesPackage{fancyvrb}[2021/08/12 v3.8 verbatim text (tvz,hv)]
%\message{Style option: `fancyvrb' v\fileversion \space <\filedate> (tvz)}
\csname fancyvrb@loaded\endcsname
\let\fancyvrb@loaded\endinput
@@ -1001,6 +1001,7 @@
\newcounter{FancyVerbLine}
\define@key{FV}{firstnumber}[auto]{%
\def\@tempa{#1}\def\@tempb{auto}%
+ \def\FV@FirstNumber{#1}% added 2021-08-12
\ifx\@tempa\@tempb
\def\FV@SetLineNo{%
\c@FancyVerbLine\FV@CodeLineNo%
@@ -1137,9 +1138,20 @@
\gdef\FV@TheVerbatim{}%
\def\FV@ProcessLine##1{%
\expandafter\gdef\expandafter\FV@TheVerbatim\expandafter{%
- \FV@TheVerbatim\FV@ProcessLine{##1}}}%
- \gdef\FV@TheVerbatim{}%
- \FV@Scan}
+% \FV@TheVerbatim\FV@ProcessLine{##1}}}% 2021-08-12
+% \gdef\FV@TheVerbatim{}%
+ \FV@TheVerbatim\advance\c@FancyVerbLine\@ne\FV@ProcessLine{##1}}}%
+ \gdef\FV@TheVerbatim{%
+ \edef\@tempa{\FV@FirstNumber}%
+ \def\@tempb{auto}%
+ \ifx\@tempa\@tempb%
+ \c@FancyVerbLine\FV@CodeLineNo%
+ \else%
+ \c@FancyVerbLine\FV@FirstNumber%
+ \advance\c@FancyVerbLine\m@ne%
+ \fi%
+ }%
+ \FV@Scan}
\def\FVE@SaveVerbatim{%
\expandafter\global\expandafter\let
\csname FV@SV@\SaveVerbatim@Name\endcsname\FV@TheVerbatim