doc-src/TutorialI/ttbox.sty
author paulson
Mon, 08 May 2000 16:57:53 +0200
changeset 8832 bcceda950cd0
parent 8743 3253c6046d57
permissions -rw-r--r--
more details
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8743
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
     1
\ProvidesPackage{ttbox}[1997/06/25]
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
     2
\RequirePackage{alltt}
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
     3
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
     4
%%%Boxed terminal sessions
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
     5
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
     6
%Redefines \{ and \} to be in \tt font and \| to make a BACKSLASH
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
     7
\def\ttbraces{\chardef\{=`\{\chardef\}=`\}\chardef\|=`\\}
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
     8
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
     9
%Restores % as the comment character (especially, to suppress line breaks)
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
    10
\newcommand\comments{\catcode`\%=14\relax}
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
    11
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
    12
%alltt* environment: like alltt but smaller, and with \{ \} and \| as in ttbox
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
    13
\newenvironment{alltt*}{\begin{alltt}\footnotesize\ttbraces}{\end{alltt}}
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
    14
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
    15
%Indented alltt* environment with small point size
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
    16
%NO LINE BREAKS are allowed unless \pagebreak appears at START of a line
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
    17
\newenvironment{ttbox}{\begin{quote}\samepage\begin{alltt*}}%
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
    18
                      {\end{alltt*}\end{quote}}
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
    19
3253c6046d57 I wonder if that's all?
nipkow
parents:
diff changeset
    20
\endinput