]> mj.ucw.cz Git - ucwmac.git/blobdiff - ucw-verb.tex
Added \lline, \rline and \cline
[ucwmac.git] / ucw-verb.tex
index b218307f3535f0e0bdaf59eec943d76a02831de4..981aebefbb834fa4062d6e10a142aae038c30c3a 100644 (file)
@@ -1,4 +1,4 @@
-% The UCW Macro Collection: Verbatim environment
+% The UCW Macro Collection: Verbatim environments
 % Written by Martin Mares <mj@ucw.cz> in 2010 and placed into public domain
 % -------------------------------------------------------------------------
 
 \gdef\inlineverboff{\catcode124=12}
 }
 
+% Typesetting of verbatim text with a given delimiter:
+%      - usage: \verb%verbatim text%
+%      - the delimiter is the first character after \verb
+%      - remember that writing (for example) \verbz with meaning \verb
+%        with the delimiter 'z' is possible only if \catcode`z is not 11
+
+\def\verb{\relax\def\sv@rb##1{\uccode`~=`##1%
+\uppercase{\catcode`~13\global\let~\endgroup}}%
+\begingroup\setverb@tim\sv@rb}
+
 % Typesetting of verbatim blocks:
 %      - the block is enclosed in balanced {}'s
 %      - leading and trailing empty lines are ignored