summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/verbatimbox/README18
-rw-r--r--Master/texmf-dist/doc/latex/verbatimbox/verbatimbox_example.pdfbin0 -> 30963 bytes
-rw-r--r--Master/texmf-dist/doc/latex/verbatimbox/verbatimbox_example.tex57
-rw-r--r--Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty90
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/verbatimbox.tlpsrc2
7 files changed, 169 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/verbatimbox/README b/Master/texmf-dist/doc/latex/verbatimbox/README
new file mode 100644
index 00000000000..57a881cd961
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/verbatimbox/README
@@ -0,0 +1,18 @@
+The style file verbatimbox has been created for the report writer's
+convenience.
+
+Do you need to include blocks of verbatim text inside figures or
+tables? The verbatim environment is not compatible with some of these
+other environments. But now, the verbbox environment allows you to
+input verbatim text and store it in a LaTeX box. That box then becomes
+generally usable in all other LaTeX environments, and can be simply
+recalled.
+
+This style therefore allows for a greater use of the verbatim
+environment within other LaTeX constructs where verbatim was previously
+inaccessible.
+
+Sorry I don't have a separate documentation file, but it's very simply
+documented in the style file itself and in the verbatimbox_example.
+
+ -Steven Segletes
diff --git a/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox_example.pdf b/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox_example.pdf
new file mode 100644
index 00000000000..b603fd385a0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox_example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox_example.tex b/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox_example.tex
new file mode 100644
index 00000000000..66dc277c0c8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/verbatimbox/verbatimbox_example.tex
@@ -0,0 +1,57 @@
+\documentclass{article}
+\usepackage{verbatimbox}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{document}
+
+\parskip 1em
+
+This is a test of the \textsf{verbatimbox} style package, to
+test the \verb,verbbox, environment. I am about to call on the
+\verb,verbbox, environment to see how if I can stuff \verb,verbatim,
+text into a \LaTeX{} box. Here goes...
+
+\begin{verbbox}
+ Program test
+ implicit none
+ integer a, x
+ a = 0
+ x = 1
+ 10 a = a + x
+ if (a .eq. 100) stop
+ goto 10
+ end
+!@#$%^&*()_+=-{}|\][<>?/\\\
+\end{verbbox}
+
+OK, I have created a \verb,verbbox, (which creates no output in and of
+itself), and I now wish to see if I can stick it into a \verb,tabular,
+environment. Note, when sticking a verbbox into the \verb,tabular,
+environment, use the \verb,[t], option of \verb,\theverbbox,.
+\begin{center}
+\begin{tabular}{| c | c | c |}
+\hline
+%\raisebox{0.7in}{First box of table}&%
+%\theverbbox[t] &
+%\raisebox{0.7in}{last box of table}\\
+First box of table&%
+\begin{tabular}{@{} c @{}} \theverbbox[t]\end{tabular}&
+last box of table\\
+\hline
+\end{tabular}
+\end{center}
+
+Otherwise, if I choose, I can just stick the \verb,verbatim, box into an
+\verb,fbox,,
+so as to frame the result. This latter case produces the same output as
+would the \verb,boxedverbatim, environment in the \textsf{moreverb}
+package.
+
+\fbox{\theverbbox}
+
+Being a box, I can use \verb,verbbox, output as part of a figure or
+table, for example. Bottom line: the \textsf{verbatimbox} package
+provides nice flexibility in utilizing the \verb,verbatim, environment
+in a variety of ways.
+
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty b/Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty
new file mode 100644
index 00000000000..5a4e0a25499
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/verbatimbox/verbatimbox.sty
@@ -0,0 +1,90 @@
+\ProvidesPackage{verbatimbox}
+ [2007/03/16 v1.0]
+% verbatimbox.sty is based on boxedverbatim environment found
+% in moreverb.sty.
+%
+% It adds the verbbox environment and theverbbox command.
+%
+% The verbbox environment is just like boxedverbatim, except:
+%
+% 1) verbbox has no framed place around it; and
+% 2) the verbatim box is not output,
+% but saved in the global box named \savedverbbox.
+%
+% The command \theverbbox will output the verbatim box most recently
+% created within the verbbox environment (that is, \savedverbbox).
+% The [t] option to \theverbbox is made for outputting a verbbox
+% in a tabular environment. Without the [t], insufficient vertical
+% space is allocated above the box.
+%
+% This routine allows the verbatim environment to be stuffed into a
+% LaTeX box, which can then be embedded in other LaTeX constructs.
+%
+% This routine is useful, because there are many LaTeX environments
+% in which a verbatim environment cannot be simply opened, but
+% in which a box can be simply placed (e.g., tabular).
+%
+% An enabling routine \addvbuffer{}, is available for general
+% use. It adds vertical buffer space above and below the argument
+% of the command. The vertical space added above the original box
+% is the length \boxtopsep; below the box, it is \boxbottomsep. It
+% shares some functional similarities to \raisebox, but it is not the
+% same.
+%
+\NeedsTeXFormat{LaTeX2e}
+\@ifundefined{verbatim@processline}{\RequirePackage{verbatim}}{}
+
+\global\newsavebox{\savedverbbox}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% The verbbox environment is based on
+% the boxedverbatim environment found in moreverb.sty
+%
+\def\verbbox{%
+ \def\verbatim@processline{%
+ {\setbox0=\hbox{\the\verbatim@line}%
+ \hsize=\wd0 \the\verbatim@line\par}}%
+ \@minipagetrue%
+ \@tempswatrue%
+ \setbox0=\vbox\bgroup \verbatim
+}
+\def\endverbbox{%
+ \endverbatim
+ \unskip\setbox0=\lastbox %
+ \egroup
+ \global\sbox{\savedverbbox}{\box0}
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand\theverbbox[1][x]{%
+ \if #1t%
+% The t option is for outputting the savedverbbox inside a tabular
+% environment (else insufficent vertical space above box)
+ \boxtopsep = 3pt
+ \boxbottomsep = 0pt
+ \addvbuffer{\usebox{\savedverbbox}}
+ \else%
+ \usebox{\savedverbbox}
+ \fi%
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \addvbuffer is based on \fbox,
+% but without a frame. Empty buffer space
+% is added above and below the object, making a new box.
+% Above the box is added \boxtopsep (initially 3pt) vertical space.
+% Below the box is added \boxbottomsep (initially 0pt) vertical space.
+% This routine is called when a savedverbbox is output in a tabular
+% environment.
+%
+\newdimen\boxtopsep
+\newdimen\boxbottomsep
+\newdimen\ps@tempdima
+\newbox\ps@tempboxa
+\boxtopsep = 3pt
+\boxbottomsep = 0pt
+\long\def\addvbuffer#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\boxtopsep \box\ps@tempboxa \vskip
+ \boxbottomsep}}}}}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
+
+
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 9dc112d2284..92835e7c4a6 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -210,7 +210,7 @@ my @WorkingTLP = qw(
umthesis umtypewriter underlin undertilde units unitsdef unroman
upmethodology upquote urlbst ushort uwthesis
vancouver variations varindex varsfromjobname
- vector velthuis venn verse versions vertex
+ vector velthuis venn verbatimbox verse versions vertex
vhistory visualfaq vmargin vntex volumes vpe vwcol vxu
wadalab wallpaper warning warpcol williams wordlike wrapfig
xargs xcolor xdoc xecyr xepersian
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index efecb6f3435..6214e0b24d3 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -557,6 +557,7 @@ depend ushort
depend varindex
depend varsfromjobname
depend vector
+depend verbatimbox
depend versions
depend vhistory
depend vita
diff --git a/Master/tlpkg/tlpsrc/verbatimbox.tlpsrc b/Master/tlpkg/tlpsrc/verbatimbox.tlpsrc
new file mode 100644
index 00000000000..225c98264a9
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/verbatimbox.tlpsrc
@@ -0,0 +1,2 @@
+name verbatimbox
+category Package