texlive[67865] Master/texmf-dist: verbatimbox (9aug23)
commits+karl at tug.org
commits+karl at tug.org
Wed Aug 9 21:59:48 CEST 2023
Revision: 67865
http://tug.org/svn/texlive?view=revision&revision=67865
Author: karl
Date: 2023-08-09 21:59:48 +0200 (Wed, 09 Aug 2023)
Log Message:
-----------
verbatimbox (9aug23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.pdf
trunk/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.tex
trunk/Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty
Modified: trunk/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.tex 2023-08-09 19:59:40 UTC (rev 67864)
+++ trunk/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.tex 2023-08-09 19:59:48 UTC (rev 67865)
@@ -69,7 +69,7 @@
\end{minipage}
}\\
\rule{0em}{2.7em}\large Steven B. Segletes\\
-steven.b.segletes.civ at mail.mil\\
+SSegletes at verizon.net\\
\rule{0em}{1.7em}\today\\
\verbatimboxVersionNumber
\end{center}
@@ -107,10 +107,12 @@
\tvb\lb\texttt{\upshape t}\rb\\
\bts\eq length\\
\bbs\eq length\\
- \avb\lb length \lb below length\rb\rb\lbr object\rbr\\
+ \avb\lb length\rb\lbr object\rbr{} \textup{OR}\\
+ \mbox{}\hspace{3ex}\avb\lb above-length below-length\rb\lbr object\rbr\\
\bgn\lbr\vrnobox\rbr\lb pre-commands\rb\ldots\edng\lbr\vrnobox\rbr\\
\vbfnobox\lb pre-commands\rb\lbr filename\rbr
-}}\\\upshape
+}}\\[10pt]
+\upshape
In addition, there is a counter, \vln\margenv{\vln}, which contains the
current verbatim line number being processed. It's use as part of
the optional pre-commands to \vrbox, \myvrbox, or {\vbfbox} (in the form
@@ -341,19 +343,20 @@
This ability to work on a variety of objects makes {\avb} a powerful
command in many applications.
-\textbf{ATTENTION. This paragraph represents a change as of V3.11, and
-can break backward compatibilty}.
Likewise, if two length variables are to be used in the optional
-argument, the two lengths must be separately braced, with a space in between:
+argument, a non-absorbed space must exist between them.
+Thus, if the first of the two lengths is a macro or length register,
+ an empty group \verb|{}| should be placed at the end of it, so that
+ the subsequent space is not absorbed:
\begin{verbatim}
- \fbox{\addvbuffer[{\baselineskip} {.5\baselineskip}]{A test}}
+ \fbox{\addvbuffer[\baselineskip{} .5\baselineskip]{A test}}
\end{verbatim}
-\rl\fbox{\addvbuffer[{\baselineskip} {.5\baselineskip}]{A test}}
+\rl\fbox{\addvbuffer[\baselineskip{} .5\baselineskip]{A test}}
-{\bfseries One may no longer use a ``\verb|\ |'' hard space to separate the
-two arguments.}
+One may not use a ``\verb|\ |'' hard space to separate the
+two arguments, but instead the method prescribed above.
\subsection{The ``nobox'' Alternatives}
Modified: trunk/Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty 2023-08-09 19:59:40 UTC (rev 67864)
+++ trunk/Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty 2023-08-09 19:59:48 UTC (rev 67865)
@@ -1,6 +1,6 @@
-\def\verbatimboxVersionNumber{v3.13 }
+\def\verbatimboxVersionNumber{v3.2}
\ProvidesPackage{verbatimbox}
- [2014/03/12 \verbatimboxVersionNumber
+ [2023/08/08 \verbatimboxVersionNumber\
Routines for placing verbatim text into boxes, useful in places where
the verbatim environment is inaccessible. Secondarily, for adding
vertical buffer around an object.]
@@ -44,7 +44,10 @@
% -When using two lengths in \addvbuffer optional argument,
% they MUST be individually in {}, rather than "~" or "\ " between
% 3.13 -Corrected residual bug from V3.11, when \addvbuffer called
-% without an optional argument,
+% without an optional argument.
+% 3.2 -Reworked \addvbuffer definition completely, to avoid use of
+% deprecated \getargsC reference. Instead, new approach employs
+% listofitems package to decode optional argument.
\NeedsTeXFormat{LaTeX2e}
\@ifundefined{verbatim at processline}{\RequirePackage{verbatim}}{}
\usepackage{readarray}
@@ -171,7 +174,7 @@
\if #1t%
% The t option is for outputting the savedverbbox inside a tabular
% environment (else insufficent vertical space above box)
- \addvbuffer[{\boxtopsep} {\boxbottomsep}]{\usebox{\savedverbbox}}%
+ \addvbuffer[\boxtopsep{} \boxbottomsep]{\usebox{\savedverbbox}}%
\else%
\usebox{\savedverbbox}%
\fi%
@@ -198,13 +201,17 @@
\global\newlength\boxtop at sep
\global\newlength\boxbottom at sep
-\newcommand\addvbuffer[2][{\boxtopsep} {\boxbottomsep}]{%
- \getargsC{#1}%
- \setlength\boxtop at sep{\argi}%
- \if1\narg\setlength\boxbottom at sep{\argi}\else%
- \setlength\boxbottom at sep{\argii}\fi%
+\newcommand\addvbuffer[2][\boxtopsep{} \boxbottomsep]{\bgroup%
+ \setsepchar{ }%
+ \readlist\tmplist{#1}%
+ \setlength\boxtop at sep{\tmplist[1]}%
+ \ifnum\listlen\tmplist[]=1
+ \setlength\boxbottom at sep{\tmplist[1]}%
+ \else%
+ \setlength\boxbottom at sep{\tmplist[2]}%
+ \fi%
\add at vbuffer{#2}%
-}
+\egroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following two "nobox" commands are basically versions of
More information about the tex-live-commits
mailing list.