src/Doc/ttbox.sty
changeset 48985 5386df44a037
parent 11620 54e2f4c8c3cb
equal deleted inserted replaced
48984:f51d4a302962 48985:5386df44a037
       
     1 \ProvidesPackage{ttbox}[1997/06/25]
       
     2 \RequirePackage{alltt}
       
     3 
       
     4 %%%Boxed terminal sessions
       
     5 
       
     6 %Redefines \{ and \} to be in \tt font and \| to make a BACKSLASH
       
     7 \def\ttbraces{\chardef\{=`\{\chardef\}=`\}\chardef\|=`\\}
       
     8 
       
     9 %Restores % as the comment character (especially, to suppress line breaks)
       
    10 \newcommand\comments{\catcode`\%=14\relax}
       
    11 
       
    12 %alltt* environment: like alltt but smaller, and with \{ \} and \| as in ttbox
       
    13 \newenvironment{alltt*}{\begin{alltt}\footnotesize\ttbraces}{\end{alltt}}
       
    14 
       
    15 %Indented alltt* environment with small point size
       
    16 %NO LINE BREAKS are allowed unless \pagebreak appears at START of a line
       
    17 \newenvironment{ttbox}{\begin{quote}\samepage\begin{alltt*}}%
       
    18                       {\end{alltt*}\end{quote}}
       
    19 
       
    20 {\obeylines\gdef\ttbreak
       
    21 {\allowbreak}}
       
    22 
       
    23 %%%% more \tt things
       
    24 
       
    25 \def\ttdescriptionlabel#1{\hspace\labelsep \tt #1}
       
    26 \def\ttdescription{\list{}{\labelwidth\z@ \itemindent-\leftmargin
       
    27        \let\makelabel\ttdescriptionlabel}}
       
    28 
       
    29 \let\endttdescription\endlist
       
    30 
       
    31 \chardef\ttilde=`\~     % A tilde for \tt font
       
    32 \chardef\ttback=`\\     % A backslash for \tt font
       
    33 \chardef\ttlbrace=`\{   % A left brace for \tt font
       
    34 \chardef\ttrbrace=`\}   % A right brace for \tt font
       
    35 \chardef\ttlbrack=`\[   % A left bracket for \tt font
       
    36 \chardef\ttrbrack=`\]   % A right bracket for \tt font
       
    37 
       
    38 \newcommand\out{\ \ttfamily\slshape}   %% for output from terminal sessions
       
    39 
       
    40 \endinput