summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/plain/gustlib/verbatim.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:46:46 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:46:46 +0000
commitb1c871653d37d9c6fd0f97b048dca051b5b1db27 (patch)
tree3f925e95aa3461b9ecb75df861259a7f71bc3f23 /Master/texmf-dist/tex/plain/gustlib/verbatim.tex
parent82770e7491344072d5dd54ce9a78546eebe99c3f (diff)
trunk/Master/texmf-dist/tex/plain
git-svn-id: svn://tug.org/texlive/trunk@621 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/plain/gustlib/verbatim.tex')
-rw-r--r--Master/texmf-dist/tex/plain/gustlib/verbatim.tex48
1 files changed, 48 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/plain/gustlib/verbatim.tex b/Master/texmf-dist/tex/plain/gustlib/verbatim.tex
new file mode 100644
index 00000000000..ed2aa700b9c
--- /dev/null
+++ b/Master/texmf-dist/tex/plain/gustlib/verbatim.tex
@@ -0,0 +1,48 @@
+% F I L E V E R B A T I M . T E X
+%
+% THIS SET OF MACROs IS TAKEN FROM D.E.K.'s TeXBook
+% AND PROVIDES AN EASY WAY OF TYPESETTING TEXTS VERBATIM:
+%
+% 1. \verbatim<character><text without that character><character>
+% causes the text to be set verbatim using \tt font;
+% 2. if the text uses up all the alphabet, \doubleverbatim macro
+% can be used instead; this is similar to the previous one but
+% a pair of characters is now used as a delimiter;
+% 3. in case of emergency \tripleverbatim macro may be of help...
+%
+%---------------------------------------------
+\def\uncatcodespecials % see D.E.K., pp. 344 and 380
+ {\def\do##1{\catcode`##1=12}\dospecials}%
+%---------------------------------------------
+{\catcode`\^^I=\active \gdef^^I{\ \ \ \ }% TAB character is replaced by
+ % 4 spaces; it is better than
+ % nothing, but it does not mimic
+ % true tabbing satisfactorily---maybe
+ % some nice day...
+ \catcode`\`=\active\gdef`{\relax\lq}}% this line inhibits Spanish
+ % ligatures ?` and !` of \tt font
+\def\setupverbatim % see D.E.K., p. 381
+ {\tt %
+ \spaceskip=0pt \xspaceskip=0pt % just in case...
+ \catcode`\^^I=\active %
+ \catcode`\`=\active %
+ \def\par{\leavevmode\endgraf}% this causes that empty lines aren't
+ % skipped
+ \obeylines \uncatcodespecials \obeyspaces}%
+{\obeyspaces \global\let =\ }% this causes that leading blanks aren't
+ % skipped; cf. also def's of \space, \endgraf,
+ % \lq, \obeyspaces, and \obeylines,
+ % D.E.K., pp. 351--352
+%---------------------------------------------
+% see D.E.K., p. 382
+\def\doverbatim#1{\def\next##1#1{##1\endgroup}\next}%
+\def\verbatim{\begingroup\setupverbatim\doverbatim}%
+%----------
+\def\dodoubleverbatim#1#2{\def\next##1#1#2{##1\endgroup}\next}%
+\def\doubleverbatim{\begingroup\setupverbatim\dodoubleverbatim}%
+%----------
+\def\dotripleverbatim#1#2#3{\def\next##1#1#2#3{##1\endgroup}\next}%
+\def\tripleverbatim{\begingroup\setupverbatim\dotripleverbatim}%
+%---------------------------------------------
+\endinput
+