diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-16 21:44:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-16 21:44:47 +0000 |
commit | 4f68be5aab4542a33bb5426751e9734a11b90471 (patch) | |
tree | 68257a302367a9f1d7acacf9a04245b73367ef8c | |
parent | 569deb81a37d567d56be480ec1af765229961d13 (diff) |
verbatimbox
git-svn-id: svn://tug.org/texlive/trunk@33197 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.pdf | bin | 255749 -> 257027 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.tex | 30 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty | 14 |
3 files changed, 32 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.pdf b/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.pdf Binary files differindex 85057cbf55a..494eb024445 100644 --- a/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.pdf +++ b/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.pdf diff --git a/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.tex b/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.tex index 5534cd5e4a8..6ae49988981 100644 --- a/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.tex +++ b/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox.tex @@ -12,12 +12,6 @@ % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is Steven B. Segletes. -% Revisions: -% 2.01 -Added LPPL License info to package -% 3.0 -Added myverbbox environment -% -Corrected problem when no optional arguments are passed to -% verbbox environment -% -Added optional arguments to \addvbuffer % \parskip 1em \parindent 0em @@ -498,6 +492,30 @@ third line \end{verbbox} \rl\theverbbox +There is also a quirk with the macro \verb|\addvbuffer|. +If the \verb|\addvbuffer| macro adds negative space below an argument, +the argument is +vertically shifted downward by the same amount. For example, +compare the following constructions, +\verb|\fbox{gb}| and \verb|\fbox{\addvbuffer[-3pt]{gb}}|: +\fbox{gb}\fbox{\addvbuffer[-3pt]{gb}}. +In the latter case, the box is bottom-trimmed, but the result is shifted downward. +This adverse outcome can generally be overcome with a countering +\verb|\raisebox|, +\fbox{gb}\fbox{\raisebox{3pt}{\addvbuffer[-3pt]{gb}}}. +However, if the \verb|\raisebox| would otherwise place +the new box above the baseline, the effect of the +\verb|\addvbuffer| on the bottom of the box is spoiled, as in the +comparison given by the constructions +\verb|\fbox{\addvbuffer[-3pt]{X}}| versus +\verb|\fbox{\raisebox{3pt}{\addvbuffer[-3pt]{X}}}| +which produces this result: +\fbox{\addvbuffer[-3pt]{X}}\fbox{\raisebox{3pt}{\addvbuffer[-3pt]{X}}}. +Note how 3pt are not trimmed from the bottom of the second box. +For this reason, the \verb|\raisebox| remedy has not been incorporated into the definition +of \verb|\addvbuffer|; instead, the quirk has been allowed to stand. + + \section{Acknowledgements} I would like to thank Dr. David Carlisle for his great assistance diff --git a/Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty b/Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty index 11443312a7e..dbfda1e3876 100644 --- a/Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty +++ b/Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty @@ -1,6 +1,6 @@ -\def\verbatimboxVersionNumber{v3.12 } +\def\verbatimboxVersionNumber{v3.13 } \ProvidesPackage{verbatimbox} - [2014/02/24 \verbatimboxVersionNumber + [2014/03/12 \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.] @@ -43,6 +43,8 @@ vertical buffer around an object.] % option to \theverbbox % -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, \NeedsTeXFormat{LaTeX2e} \@ifundefined{verbatim@processline}{\RequirePackage{verbatim}}{} \usepackage{readarray} @@ -169,7 +171,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[{\the\boxtopsep} {\the\boxbottomsep}]{\usebox{\savedverbbox}}% + \addvbuffer[{\boxtopsep} {\boxbottomsep}]{\usebox{\savedverbbox}}% \else% \usebox{\savedverbbox}% \fi% @@ -191,12 +193,12 @@ vertical buffer around an object.] \setlength\boxbottomsep{0pt} \long\def\add@vbuffer#1{\leavevmode\setbox\ps@tempboxa\hbox{#1}\ps@tempdima 0pt \advance\ps@tempdima \dp\ps@tempboxa \hbox{\lower\ps@tempdima\hbox - {\vbox{\hbox{\vbox{\vskip\boxtop@sep \box\ps@tempboxa \vskip - \boxbottom@sep}}}}}} + {\vbox{\hbox{\vbox{\vskip\boxtop@sep \box\ps@tempboxa \vskip + \boxbottom@sep}}}}}} \global\newlength\boxtop@sep \global\newlength\boxbottom@sep -\newcommand\addvbuffer[2][\the\boxtopsep\ \the\boxbottomsep]{% +\newcommand\addvbuffer[2][{\boxtopsep} {\boxbottomsep}]{% \getargsC{#1}% \setlength\boxtop@sep{\argi}% \if1\narg\setlength\boxbottom@sep{\argi}\else% |