1 % iman.sty : Isabelle Manual Page Layout
3 \typeout{Document Style iman. Released 17 February 1994}
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 }
10 %usage: \iflabelundefined{LABEL}{if not defined}{if defined}
11 \newcommand{\iflabelundefined}[1]{\@ifundefined{r@#1}}
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}}
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}}
24 \newcommand\tdx[1]{{\tt#1}\index{#1@{\tt#1} theorem}}
25 \newcommand\tdxbold[1]{{\tt#1}\index{#1@{\tt#1} theorem|bold}}
27 \newcommand\mltydx[1]{{\tt#1}\index{#1@{\tt#1} ML type}}
28 \newcommand\xdx[1]{{\tt#1}\index{#1@{\tt#1} exception}}
30 \newcommand\ndx[1]{{\tt#1}\index{#1@{\tt#1} nonterminal}}
31 \newcommand\ndxbold[1]{{\tt#1}\index{#1@{\tt#1} nonterminal|bold}}
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}}
37 \newcommand\tooldx[1]{{\tt#1}\index{#1@{\tt#1} tool}}
38 \newcommand\settdx[1]{{\tt#1}\index{#1@{\tt#1} setting}}
40 %for cross-references: 2nd argument (page number) is ignored
41 \newcommand\see[2]{{\it see \/}{#1}}
42 \newcommand\seealso[2]{{\it see also \/}{#1}}
44 %set argument in \tt font; at the same time, index using * prefix
45 \newcommand\rmindex[1]{{#1}\index{#1}\@}
46 \newcommand\ttindex[1]{{\tt#1}\index{*#1}\@}
47 \newcommand\ttindexbold[1]{{\tt#1}\index{*#1|bold}\@}
49 %set argument in \bf font and index in ROMAN font (for definitions in text!)
50 \newcommand\bfindex[1]{{\bf#1}\index{#1|bold}\@}
53 %%% underscores as ordinary characters, not for subscripting
54 %% use @ or \sb for subscripting; use \at for @
55 %% only works in \tt font
56 %% must not make _ an active char; would make \ttindex fail!
57 \gdef\underscoreoff{\catcode`\@=8\catcode`\_=\other}
58 \gdef\underscoreon{\catcode`\_=8\makeatother}
62 % alternative underscore
63 \def\_{\leavevmode\kern.06em\vbox{\hrule height.2ex width.3em}\hskip0.1em}
65 %%% \dquotes permits usage of "..." for \hbox{...} -- also taken from under.sty
67 \gdef\dquotes{\catcode`\"=\active \let"=\@mathText}%
68 \gdef\@mathText#1"{\hbox{\mathTextFont #1\/}}}
69 \def\mathTextFont{\frenchspacing\tt}
70 \def\dquotesoff{\catcode`\"=\other}
72 %%%% meta-logical connectives
75 \let\Imp=\Longrightarrow
77 \newcommand\Var[1]{{?\!#1}}
78 \newcommand\VVar[1]{{?\!?\!#1}}
79 \newcommand\All[1]{\Forall#1.} %quantification
81 %%%% ``WARNING'' environment
82 \def\dbend{\vtop to 0pt{\vss\hbox{\Huge\bf!}\vss}}
83 \newenvironment{warn}{\medskip\medbreak\begingroup \clubpenalty=10000
84 \small %%WAS\baselineskip=0.9\baselineskip
85 \noindent \hangindent\parindent \hangafter=-2
86 \hbox to0pt{\hskip-\hangindent\dbend\hfill}\ignorespaces}%
87 {\par\endgroup\medbreak}
90 %%%% Standard logical symbols
95 \let\bimp=\leftrightarrow
96 \newcommand\all[1]{\forall#1.} %quantification
97 \newcommand\ex[1]{\exists#1.}
98 \newcommand{\pair}[1]{\langle#1\rangle}
100 \newcommand{\lparr}{\mathopen{(\!|}}
101 \newcommand{\rparr}{\mathclose{|\!)}}
102 \newcommand{\fs}{\mathpunct{,\,}}
103 \newcommand{\ty}{\mathrel{::}}
104 \newcommand{\asn}{\mathrel{:=}}
105 \newcommand{\more}{\ldots}
106 \newcommand{\record}[1]{\lparr #1 \rparr}
107 \newcommand{\dtt}{\mathord.}
109 \newcommand\lbrakk{\mathopen{[\![}}
110 \newcommand\rbrakk{\mathclose{]\!]}}
111 \newcommand\List[1]{\lbrakk#1\rbrakk} %was \obj
112 \newcommand\vpile[1]{\begin{array}{c}#1\end{array}}
113 \newenvironment{matharray}[1]{\[\begin{array}{#1}}{\end{array}\]}
114 \newcommand{\text}[1]{\mbox{#1}}
125 \def\Pure{{\tt Pure}\@}
126 \def\CPure{{\tt CPure}\@}
127 \def\LCF{{\tt LCF}\@}
128 \def\FOL{{\tt FOL}\@}
129 \def\HOL{{\tt HOL}\@}
130 \def\HOLCF{{\tt HOLCF}\@}
133 \def\CTT{{\tt CTT}\@}
134 \def\Cube{{\tt Cube}\@}
135 \def\Modal{{\tt Modal}\@}
137 %macros to change the treatment of symbols
138 \def\relsemicolon{\mathcode`\;="303B} %treat ; like a relation
139 \def\binperiod{\mathcode`\.="213A} %treat . like a binary operator
140 \def\binvert{\mathcode`\|="226A} %treat | like a binary operator
142 %redefinition of \sloppy and \fussy to use \emergencystretch
143 \def\sloppy{\tolerance2000 \hfuzz.5pt \vfuzz.5pt \emergencystretch=15pt}
144 \def\fussy{\tolerance200 \hfuzz.1pt \vfuzz.1pt \emergencystretch=0pt}
146 %non-bf version of description
147 \def\descrlabel#1{\hspace\labelsep #1}
148 \def\descr{\list{}{\labelwidth\z@ \itemindent-\leftmargin\let\makelabel\descrlabel}}
149 \let\enddescr\endlist
153 \def\ttdescriptionlabel#1{\hspace\labelsep \tt #1}
154 \def\ttdescription{\list{}{\labelwidth\z@ \itemindent-\leftmargin
155 \let\makelabel\ttdescriptionlabel}}
157 \let\endttdescription\endlist
159 \chardef\ttilde=`\~ % A tilde for \tt font
160 \chardef\ttback=`\\ % A backslash for \tt font
161 \chardef\ttlbrace=`\{ % A left brace for \tt font
162 \chardef\ttrbrace=`\} % A right brace for \tt font
164 \newcommand\out{\ \ttfamily\slshape} %% for output from terminal sessions
166 % The mathcodes for the letters A, ..., Z, a, ..., z are changed to
167 % generate text italic rather than math italic by default. This makes
168 % multi-letter identifiers look better. The mathcode for character c
169 % is set to |"7000| (variable family) + |"400| (text italic) + |c|.
171 \DeclareSymbolFont{italics}{\encodingdefault}{\rmdefault}{m}{it}%
172 \def\@setmcodes#1#2#3{{\count0=#1 \count1=#3
173 \loop \global\mathcode\count0=\count1 \ifnum \count0<#2
174 \advance\count0 by1 \advance\count1 by1 \repeat}}
175 \@setmcodes{`A}{`Z}{"7\hexnumber@\symitalics41}
176 \@setmcodes{`a}{`z}{"7\hexnumber@\symitalics61}