doc-src/iman.sty
author wenzelm
Sun Aug 22 21:14:28 1999 +0200 (1999-08-22)
changeset 7316 8b6d6df020ac
parent 7169 76ef91b608a9
child 7321 b4dcc32310fb
permissions -rw-r--r--
\VVar;
     1 % iman.sty : Isabelle Manual Page Layout
     2 %
     3 \typeout{Document Style iman. Released 17 February 1994}
     4 
     5 \hyphenation{Isa-belle man-u-script man-u-scripts ap-pen-dix mut-u-al-ly}
     6 \hyphenation{data-type data-types co-data-type co-data-types }
     7 
     8 \let\ts=\thinspace
     9 
    10 %usage: \iflabelundefined{LABEL}{if not defined}{if defined}
    11 \newcommand{\iflabelundefined}[1]{\@ifundefined{r@#1}}
    12 
    13 
    14 %%%INDEXING  use sedindex to process the index
    15 %index, putting page numbers of definitions in boldface
    16 \def\bold#1{\textbf{#1}}
    17 \newcommand\fnote[1]{#1n}
    18 \newcommand\indexbold[1]{\index{#1|bold}}
    19 
    20 %for indexing constants, symbols, theorems, ...
    21 \newcommand\cdx[1]{{\tt#1}\index{#1@{\tt#1} constant}}
    22 \newcommand\sdx[1]{{\tt#1}\index{#1@{\tt#1} symbol}}
    23 
    24 \newcommand\tdx[1]{{\tt#1}\index{#1@{\tt#1} theorem}}
    25 \newcommand\tdxbold[1]{{\tt#1}\index{#1@{\tt#1} theorem|bold}}
    26 
    27 \newcommand\mltydx[1]{{\tt#1}\index{#1@{\tt#1} ML type}}
    28 \newcommand\xdx[1]{{\tt#1}\index{#1@{\tt#1} exception}}
    29 
    30 \newcommand\ndx[1]{{\tt#1}\index{#1@{\tt#1} nonterminal}}
    31 \newcommand\ndxbold[1]{{\tt#1}\index{#1@{\tt#1} nonterminal|bold}}
    32 
    33 \newcommand\cldx[1]{{\tt#1}\index{#1@{\tt#1} class}}
    34 \newcommand\tydx[1]{\textit{#1}\index{#1@{\textit{#1}} type}}
    35 \newcommand\thydx[1]{{\tt#1}\index{#1@{\tt#1} theory}}
    36 
    37 \newcommand\tooldx[1]{{\tt#1}\index{#1@{\tt#1} tool}}
    38 \newcommand\settdx[1]{{\tt#1}\index{#1@{\tt#1} setting}}
    39 \newcommand\attdx[1]{$#1$\index{#1@$#1$ attribute}}
    40 \newcommand\methdx[1]{$#1$\index{#1@$#1$ proof method}}
    41 
    42 %for cross-references: 2nd argument (page number) is ignored
    43 \newcommand\see[2]{{\it see \/}{#1}}
    44 \newcommand\seealso[2]{{\it see also \/}{#1}}
    45 
    46 %set argument in \tt font; at the same time, index using * prefix
    47 \newcommand\rmindex[1]{{#1}\index{#1}\@}
    48 \newcommand\ttindex[1]{{\tt#1}\index{*#1}\@}
    49 \newcommand\ttindexbold[1]{{\tt#1}\index{*#1|bold}\@}
    50 
    51 %set argument in \bf font and index in ROMAN font (for definitions in text!)
    52 \newcommand\bfindex[1]{{\bf#1}\index{#1|bold}\@}
    53 
    54 
    55 %%% underscores as ordinary characters, not for subscripting
    56 %%  use @ or \sb for subscripting; use \at for @
    57 %%  only works in \tt font
    58 %%  must not make _ an active char; would make \ttindex fail!
    59 \gdef\underscoreoff{\catcode`\@=8\catcode`\_=\other}
    60 \gdef\underscoreon{\catcode`\_=8\makeatother}
    61 \chardef\other=12
    62 \chardef\at=`\@
    63 
    64 % alternative underscore
    65 \def\_{\leavevmode\kern.06em\vbox{\hrule height.2ex width.3em}\hskip0.1em}
    66 
    67 %%% \dquotes permits usage of "..." for \hbox{...} -- also taken from under.sty
    68 {\catcode`\"=\active
    69 \gdef\dquotes{\catcode`\"=\active  \let"=\@mathText}%
    70 \gdef\@mathText#1"{\hbox{\mathTextFont #1\/}}}
    71 \def\mathTextFont{\frenchspacing\tt}
    72 \def\dquotesoff{\catcode`\"=\other}
    73 
    74 %%%% meta-logical connectives
    75 
    76 \let\Forall=\bigwedge
    77 \let\Imp=\Longrightarrow
    78 \let\To=\Rightarrow
    79 \newcommand\Var[1]{{?\!#1}}
    80 \newcommand\VVar[1]{{?\!?\!#1}}
    81 \newcommand\All[1]{\Forall#1.}  %quantification
    82 
    83 %%%% ``WARNING'' environment
    84 \def\dbend{\vtop to 0pt{\vss\hbox{\Huge\bf!}\vss}}
    85 \newenvironment{warn}{\medskip\medbreak\begingroup \clubpenalty=10000 
    86          \small %%WAS\baselineskip=0.9\baselineskip
    87          \noindent \hangindent\parindent \hangafter=-2 
    88          \hbox to0pt{\hskip-\hangindent\dbend\hfill}\ignorespaces}%
    89         {\par\endgroup\medbreak}
    90 
    91 
    92 %%%% Standard logical symbols
    93 \let\turn=\vdash
    94 \let\conj=\wedge
    95 \let\disj=\vee
    96 \let\imp=\rightarrow
    97 \let\bimp=\leftrightarrow
    98 \newcommand\all[1]{\forall#1.}  %quantification
    99 \newcommand\ex[1]{\exists#1.}
   100 \newcommand{\pair}[1]{\langle#1\rangle}
   101 
   102 \newcommand{\lparr}{\mathopen{(\!|}}
   103 \newcommand{\rparr}{\mathclose{|\!)}}
   104 \newcommand{\fs}{\mathpunct{,\,}}
   105 \newcommand{\ty}{\mathrel{::}}
   106 \newcommand{\asn}{\mathrel{:=}}
   107 \newcommand{\more}{\ldots}
   108 \newcommand{\record}[1]{\lparr #1 \rparr}
   109 \newcommand{\dtt}{\mathord.}
   110 
   111 \newcommand\lbrakk{\mathopen{[\![}}
   112 \newcommand\rbrakk{\mathclose{]\!]}}
   113 \newcommand\List[1]{\lbrakk#1\rbrakk}  %was \obj
   114 \newcommand\vpile[1]{\begin{array}{c}#1\end{array}}
   115 \newenvironment{matharray}[1]{\[\begin{array}{#1}}{\end{array}\]}
   116 \newcommand{\text}[1]{\mbox{#1}}
   117 
   118 \let\int=\cap
   119 \let\un=\cup
   120 \let\inter=\bigcap
   121 \let\union=\bigcup
   122 
   123 \def\ML{{\sc ml}}
   124 \def\OBJ{{\sc obj}}
   125 \def\AST{{\sc ast}}
   126 
   127 \def\Pure{{\tt Pure}\@}
   128 \def\CPure{{\tt CPure}\@}
   129 \def\LCF{{\tt LCF}\@}
   130 \def\FOL{{\tt FOL}\@}
   131 \def\HOL{{\tt HOL}\@}
   132 \def\HOLCF{{\tt HOLCF}\@}
   133 \def\LK{{\tt LK}\@}
   134 \def\ZF{{\tt ZF}\@}
   135 \def\CTT{{\tt CTT}\@}
   136 \def\Cube{{\tt Cube}\@}
   137 \def\Modal{{\tt Modal}\@}
   138 
   139 %macros to change the treatment of symbols
   140 \def\relsemicolon{\mathcode`\;="303B}   %treat ; like a relation
   141 \def\binperiod{\mathcode`\.="213A}   %treat . like a binary operator
   142 \def\binvert{\mathcode`\|="226A}     %treat | like a binary operator
   143 
   144 %redefinition of \sloppy and \fussy to use \emergencystretch
   145 \def\sloppy{\tolerance2000 \hfuzz.5pt \vfuzz.5pt \emergencystretch=15pt}
   146 \def\fussy{\tolerance200 \hfuzz.1pt \vfuzz.1pt \emergencystretch=0pt}
   147 
   148 %non-bf version of description
   149 \def\descrlabel#1{\hspace\labelsep #1}
   150 \def\descr{\list{}{\labelwidth\z@ \itemindent-\leftmargin\let\makelabel\descrlabel}}
   151 \let\enddescr\endlist
   152 
   153 %%%% \tt things
   154 
   155 \def\ttdescriptionlabel#1{\hspace\labelsep \tt #1}
   156 \def\ttdescription{\list{}{\labelwidth\z@ \itemindent-\leftmargin
   157        \let\makelabel\ttdescriptionlabel}}
   158 
   159 \let\endttdescription\endlist
   160 
   161 \chardef\ttilde=`\~     % A tilde for \tt font
   162 \chardef\ttback=`\\     % A backslash for \tt font
   163 \chardef\ttlbrace=`\{   % A left brace for \tt font
   164 \chardef\ttrbrace=`\}   % A right brace for \tt font
   165 
   166 \newcommand\out{\ \ttfamily\slshape}   %% for output from terminal sessions
   167 
   168 % The mathcodes for the letters A, ..., Z, a, ..., z are changed to
   169 % generate text italic rather than math italic by default. This makes
   170 % multi-letter identifiers look better. The mathcode for character c
   171 % is set to |"7000| (variable family) + |"400| (text italic) + |c|.
   172 %
   173 \DeclareSymbolFont{italics}{\encodingdefault}{\rmdefault}{m}{it}%
   174 \def\@setmcodes#1#2#3{{\count0=#1 \count1=#3
   175         \loop \global\mathcode\count0=\count1 \ifnum \count0<#2
   176         \advance\count0 by1 \advance\count1 by1 \repeat}}
   177 \@setmcodes{`A}{`Z}{"7\hexnumber@\symitalics41}
   178 \@setmcodes{`a}{`z}{"7\hexnumber@\symitalics61}