summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/verbatimbox
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-10 03:01:21 +0000
committerNorbert Preining <norbert@preining.info>2023-08-10 03:01:21 +0000
commitf2278c4ebe48c174e43845ccfd838fffc3376514 (patch)
treefa8ae4a3eb80e79f3fcad8c0cb8d306ef28a823b /macros/latex/contrib/verbatimbox
parent9c6ffed1253f7d203afb08f7fffc9c661c48567b (diff)
CTAN sync 202308100301
Diffstat (limited to 'macros/latex/contrib/verbatimbox')
-rw-r--r--macros/latex/contrib/verbatimbox/verbatimbox.pdfbin257027 -> 258446 bytes
-rw-r--r--macros/latex/contrib/verbatimbox/verbatimbox.sty27
-rw-r--r--macros/latex/contrib/verbatimbox/verbatimbox.tex23
3 files changed, 30 insertions, 20 deletions
diff --git a/macros/latex/contrib/verbatimbox/verbatimbox.pdf b/macros/latex/contrib/verbatimbox/verbatimbox.pdf
index 494eb02444..1f8c180599 100644
--- a/macros/latex/contrib/verbatimbox/verbatimbox.pdf
+++ b/macros/latex/contrib/verbatimbox/verbatimbox.pdf
Binary files differ
diff --git a/macros/latex/contrib/verbatimbox/verbatimbox.sty b/macros/latex/contrib/verbatimbox/verbatimbox.sty
index dbfda1e387..de3e9a83ea 100644
--- a/macros/latex/contrib/verbatimbox/verbatimbox.sty
+++ b/macros/latex/contrib/verbatimbox/verbatimbox.sty
@@ -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 @@ vertical buffer around an object.]
% -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@processline}{\RequirePackage{verbatim}}{}
\usepackage{readarray}
@@ -171,7 +174,7 @@ vertical buffer around an object.]
\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 @@ vertical buffer around an object.]
\global\newlength\boxtop@sep
\global\newlength\boxbottom@sep
-\newcommand\addvbuffer[2][{\boxtopsep} {\boxbottomsep}]{%
- \getargsC{#1}%
- \setlength\boxtop@sep{\argi}%
- \if1\narg\setlength\boxbottom@sep{\argi}\else%
- \setlength\boxbottom@sep{\argii}\fi%
+\newcommand\addvbuffer[2][\boxtopsep{} \boxbottomsep]{\bgroup%
+ \setsepchar{ }%
+ \readlist\tmplist{#1}%
+ \setlength\boxtop@sep{\tmplist[1]}%
+ \ifnum\listlen\tmplist[]=1
+ \setlength\boxbottom@sep{\tmplist[1]}%
+ \else%
+ \setlength\boxbottom@sep{\tmplist[2]}%
+ \fi%
\add@vbuffer{#2}%
-}
+\egroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following two "nobox" commands are basically versions of
diff --git a/macros/latex/contrib/verbatimbox/verbatimbox.tex b/macros/latex/contrib/verbatimbox/verbatimbox.tex
index 6ae4998898..c9863c8261 100644
--- a/macros/latex/contrib/verbatimbox/verbatimbox.tex
+++ b/macros/latex/contrib/verbatimbox/verbatimbox.tex
@@ -69,7 +69,7 @@ for adding vertical buffer around an object.
\end{minipage}
}\\
\rule{0em}{2.7em}\large Steven B. Segletes\\
-steven.b.segletes.civ@mail.mil\\
+SSegletes@verizon.net\\
\rule{0em}{1.7em}\today\\
\verbatimboxVersionNumber
\end{center}
@@ -107,10 +107,12 @@ follows:\\\itshape
\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 @@ adding negative buffer \verb|\fbox{\addvbuffer[-5pt -5pt]{A test}}|:
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}