texlive[60226] Master/texmf-dist: fancyvrb (12aug21)

commits+karl at tug.org commits+karl at tug.org
Thu Aug 12 22:32:15 CEST 2021


Revision: 60226
          http://tug.org/svn/texlive?view=revision&revision=60226
Author:   karl
Date:     2021-08-12 22:32:15 +0200 (Thu, 12 Aug 2021)
Log Message:
-----------
fancyvrb (12aug21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/fancyvrb/Changes
    trunk/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.pdf
    trunk/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.tex
    trunk/Master/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty

Modified: trunk/Master/texmf-dist/doc/latex/fancyvrb/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fancyvrb/Changes	2021-08-12 20:31:59 UTC (rev 60225)
+++ trunk/Master/texmf-dist/doc/latex/fancyvrb/Changes	2021-08-12 20:32:15 UTC (rev 60226)
@@ -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)  

Modified: trunk/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.tex	2021-08-12 20:31:59 UTC (rev 60225)
+++ trunk/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.tex	2021-08-12 20:32:15 UTC (rev 60226)
@@ -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 @@
 Philippe Esperet, %\url{esperet at marie.polytechnique.fr}, 
 Michael Friendly, %\url{friendly at hotspur.psych.yorku.ca}, 
 Mario Hassler, %\url{HASSLER at ippnv2.ipp.kfa-juelich.de}, 
+Ohad Kammar, % \url{ohad.kammar at ed.ac.uk},
 Mikhail Kolodin, %\url{myke at morrigan.spb.su}, 
 Andreas Matthias,
 Frank Mittelbach,
@@ -1107,6 +1108,26 @@
   \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}
 

Modified: trunk/Master/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty	2021-08-12 20:31:59 UTC (rev 60225)
+++ trunk/Master/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty	2021-08-12 20:32:15 UTC (rev 60226)
@@ -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 at loaded\endcsname
 \let\fancyvrb at loaded\endinput
@@ -1001,6 +1001,7 @@
 \newcounter{FancyVerbLine}
 \define at key{FV}{firstnumber}[auto]{%
   \def\@tempa{#1}\def\@tempb{auto}%
+  \def\FV at FirstNumber{#1}%             added 2021-08-12
   \ifx\@tempa\@tempb
     \def\FV at SetLineNo{%
       \c at FancyVerbLine\FV at CodeLineNo%
@@ -1137,9 +1138,20 @@
     \gdef\FV at TheVerbatim{}%
     \def\FV at ProcessLine##1{%
       \expandafter\gdef\expandafter\FV at TheVerbatim\expandafter{%
-        \FV at TheVerbatim\FV at ProcessLine{##1}}}%
-    \gdef\FV at TheVerbatim{}%
-    \FV at Scan}
+%        \FV at TheVerbatim\FV at ProcessLine{##1}}}%    2021-08-12
+%    \gdef\FV at TheVerbatim{}%
+         \FV at TheVerbatim\advance\c at FancyVerbLine\@ne\FV at ProcessLine{##1}}}%
+     \gdef\FV at TheVerbatim{%
+       \edef\@tempa{\FV at FirstNumber}%
+       \def\@tempb{auto}%
+       \ifx\@tempa\@tempb%
+         \c at FancyVerbLine\FV at CodeLineNo%
+       \else%
+         \c at FancyVerbLine\FV at FirstNumber%
+         \advance\c at FancyVerbLine\m at ne%
+       \fi%
+     }%    
+  \FV at Scan}
 \def\FVE at SaveVerbatim{%
   \expandafter\global\expandafter\let
   \csname FV at SV@\SaveVerbatim at Name\endcsname\FV at TheVerbatim



More information about the tex-live-commits mailing list.