summaryrefslogtreecommitdiff
path: root/language/hebrew/hebtex/macros/tex_macros/verbatim.tex
blob: e923636738e9316c562243be5060b95023d17936 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%
% S_Verbatim.TeX Macro
%
% macros for verbatim scanning
\chardef\other=12
\newskip\ttglue
\ttglue=.5em plus.25em minus.15em
\def\ttverbatim{\begingroup
  \catcode`\\=\other
  \catcode`\{=\other
  \catcode`\}=\other
  \catcode`\$=\other
  \catcode`\&=\other
  \catcode`\#=\other
  \catcode`\%=\other
  \catcode`\_=\other
  \catcode`\^=\other
  \catcode`\"=\other                   % this line is new stuff
  \catcode`\|=\other
  \catcode`\~=\other
  \obeyspaces \obeylines \tt}

\catcode`\"=\active

\def"{\ttverbatim\continueverbatim}
\def\continueverbatim#1{\spaceskip\ttglue
\def\readit##1#1{##1\endgroup}\expandafter\readit}
%
% verbatim input macro, for inputting a complete file verbatim.
% Use \verbatiminput{filename} in much the same way as you would use
% \input filename.
%
\def^^L{\par}
  \def\verbatiminput#1{\begingroup \frenchspacing \raggedbottom
  \def\do##1{\catcode`##1=12 } \dospecials \catcode`\|=12
  \parskip 0pt \parindent 0pt
  \catcode`\ =\active \catcode`\^^M=\active
  \catcode`\^^L=\active \outer\def^^L{\eject}
  \tt \def\par{\ \endgraf} \obeylines \obeyspaces
  \input #1 \endgroup}
%