summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/misc/alltt2.sty
blob: 6c5988553b979a3265e38ee588b007776cc18b21 (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
43
44
45
46
47
%%% ====================================================================
%%%  @LaTeX-style-file{
%%%     author          = "Mario Wolczko",
%%%     version         = "2",
%%%     date            = "21 May 1992",
%%%     time            = "20:53:23 BST",
%%%     filename        = "alltt2.sty",
%%%     address         = "Dept of Computer Science
%%%                        The University of Manchester
%%%                        Oxford Road
%%%                        Manchester M13 9PL
%%%                        UK",
%%%     telephone       = "+44-61-275-6146",
%%%     FAX             = "+44-61-275-6236",
%%%     checksum        = "29088 47 178 1848",
%%%     email           = "mario@cs.man.ac.uk (Internet)",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "LaTeX, verbatim",
%%%     supported       = "no",
%%%     docstring       = "Modification of the alltt style to indent
%%%     alltt environments by \allttindent parameter",
%%%  }
%%% ====================================================================

% ALLTT2 DOCUMENT-STYLE OPTION - modified from alltt of 17 December 1987
%    for LaTeX version 2.09
% Copyright (C) 1987 by Leslie Lamport

% same as alltt (q.v.), but has a parameter length (\allttindent) that
% controls how much an allt environment is indented wrt it's context.

\newdimen\allttindent \allttindent=0pt % set this to change the indent

\def\docspecials{\do\ \do\$\do\&%
  \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}

\def\alltt{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
\leftskip\@totalleftmargin  \advance\leftskip\allttindent \rightskip\z@
\parindent\z@\parfillskip\@flushglue\parskip\z@
\@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
\obeylines \tt \catcode``=13 \@noligs
\let\do\@makeother \docspecials
 \frenchspacing\@vobeyspaces}

\let\endalltt=\endtrivlist