| author | Fabian Huch <huch@in.tum.de> | 
| Thu, 23 Nov 2023 19:56:27 +0100 | |
| changeset 79025 | f78ee2d48bf5 | 
| parent 73746 | b2d47981c8dc | 
| permissions | -rw-r--r-- | 
| 293 | 1 | % iman.sty : Isabelle Manual Page Layout | 
| 110 | 2 | % | 
| 293 | 3 | \typeout{Document Style iman. Released 17 February 1994}
 | 
| 110 | 4 | |
| 293 | 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 | |
| 110 | 9 | |
| 301 | 10 | %usage: \iflabelundefined{LABEL}{if not defined}{if defined}
 | 
| 11 | \newcommand{\iflabelundefined}[1]{\@ifundefined{r@#1}}
 | |
| 12 | ||
| 13 | ||
| 110 | 14 | %%%INDEXING use sedindex to process the index | 
| 8827 | 15 | |
| 10092 
4295180d6bab
exchanged the declaration of "seealso" and loading of "makeidx" because the
 paulson parents: 
9693diff
changeset | 16 | \newcommand\seealso[2]{\emph{see also} #1}
 | 
| 8827 | 17 | \usepackage{makeidx}
 | 
| 18 | ||
| 110 | 19 | %index, putting page numbers of definitions in boldface | 
| 6747 | 20 | \def\bold#1{\textbf{#1}}
 | 
| 293 | 21 | \newcommand\fnote[1]{#1n}
 | 
| 110 | 22 | \newcommand\indexbold[1]{\index{#1|bold}}
 | 
| 23 | ||
| 350 | 24 | %for indexing constants, symbols, theorems, ... | 
| 25 | \newcommand\cdx[1]{{\tt#1}\index{#1@{\tt#1} constant}}
 | |
| 26 | \newcommand\sdx[1]{{\tt#1}\index{#1@{\tt#1} symbol}}
 | |
| 27 | ||
| 28 | \newcommand\tdx[1]{{\tt#1}\index{#1@{\tt#1} theorem}}
 | |
| 29 | \newcommand\tdxbold[1]{{\tt#1}\index{#1@{\tt#1} theorem|bold}}
 | |
| 30 | ||
| 31 | \newcommand\mltydx[1]{{\tt#1}\index{#1@{\tt#1} ML type}}
 | |
| 32 | \newcommand\xdx[1]{{\tt#1}\index{#1@{\tt#1} exception}}
 | |
| 33 | ||
| 34 | \newcommand\cldx[1]{{\tt#1}\index{#1@{\tt#1} class}}
 | |
| 3491 
59ffc1c83403
Modified the \tydx command to set types in italics instead of \tt
 paulson parents: 
3211diff
changeset | 35 | \newcommand\tydx[1]{\textit{#1}\index{#1@{\textit{#1}} type}}
 | 
| 350 | 36 | \newcommand\thydx[1]{{\tt#1}\index{#1@{\tt#1} theory}}
 | 
| 37 | ||
| 3100 | 38 | %set argument in \tt font; at the same time, index using * prefix | 
| 350 | 39 | \newcommand\rmindex[1]{{#1}\index{#1}\@}
 | 
| 110 | 40 | \newcommand\ttindex[1]{{\tt#1}\index{*#1}\@}
 | 
| 41 | \newcommand\ttindexbold[1]{{\tt#1}\index{*#1|bold}\@}
 | |
| 42 | ||
| 43 | %set argument in \bf font and index in ROMAN font (for definitions in text!) | |
| 44 | \newcommand\bfindex[1]{{\bf#1}\index{#1|bold}\@}
 | |
| 45 | ||
| 46 | ||
| 47 | %%% underscores as ordinary characters, not for subscripting | |
| 48 | %% use @ or \sb for subscripting; use \at for @ | |
| 49 | %% only works in \tt font | |
| 50 | %% must not make _ an active char; would make \ttindex fail! | |
| 51 | \gdef\underscoreoff{\catcode`\@=8\catcode`\_=\other}
 | |
| 52 | \gdef\underscoreon{\catcode`\_=8\makeatother}
 | |
| 53 | \chardef\other=12 | |
| 54 | \chardef\at=`\@ | |
| 55 | ||
| 56 | % alternative underscore | |
| 57 | \def\_{\leavevmode\kern.06em\vbox{\hrule height.2ex width.3em}\hskip0.1em}
 | |
| 58 | ||
| 59 | %%% \dquotes permits usage of "..." for \hbox{...} -- also taken from under.sty
 | |
| 60 | {\catcode`\"=\active
 | |
| 61 | \gdef\dquotes{\catcode`\"=\active  \let"=\@mathText}%
 | |
| 62 | \gdef\@mathText#1"{\hbox{\mathTextFont #1\/}}}
 | |
| 63 | \def\mathTextFont{\frenchspacing\tt}
 | |
| 6123 | 64 | \def\dquotesoff{\catcode`\"=\other}
 | 
| 110 | 65 | |
| 66 | %%%% meta-logical connectives | |
| 67 | ||
| 68 | \let\Forall=\bigwedge | |
| 69 | \let\Imp=\Longrightarrow | |
| 70 | \let\To=\Rightarrow | |
| 7455 | 71 | \newcommand{\PROP}{\mathop{\mathrm{PROP}}}
 | 
| 72 | \newcommand{\Var}[1]{{?\!#1}}
 | |
| 73 | \newcommand{\All}[1]{\Forall#1.}  %quantification
 | |
| 110 | 74 | |
| 75 | %%%% ``WARNING'' environment | |
| 76 | \def\dbend{\vtop to 0pt{\vss\hbox{\Huge\bf!}\vss}}
 | |
| 77 | \newenvironment{warn}{\medskip\medbreak\begingroup \clubpenalty=10000 
 | |
| 293 | 78 | \small %%WAS\baselineskip=0.9\baselineskip | 
| 39860 
788e902f3c59
robustified "warn" environment if \parindent is zero (e.g. within itemize, description etc.);
 wenzelm parents: 
10092diff
changeset | 79 | \noindent \ifdim\parindent > 0pt\hangindent\parindent\else\hangindent1.5em\fi | 
| 
788e902f3c59
robustified "warn" environment if \parindent is zero (e.g. within itemize, description etc.);
 wenzelm parents: 
10092diff
changeset | 80 | \hangafter=-2 | 
| 293 | 81 |          \hbox to0pt{\hskip-\hangindent\dbend\hfill}\ignorespaces}%
 | 
| 82 |         {\par\endgroup\medbreak}
 | |
| 110 | 83 | |
| 84 | ||
| 85 | %%%% Standard logical symbols | |
| 86 | \let\turn=\vdash | |
| 87 | \let\conj=\wedge | |
| 88 | \let\disj=\vee | |
| 89 | \let\imp=\rightarrow | |
| 90 | \let\bimp=\leftrightarrow | |
| 293 | 91 | \newcommand\all[1]{\forall#1.}  %quantification
 | 
| 110 | 92 | \newcommand\ex[1]{\exists#1.}
 | 
| 93 | \newcommand{\pair}[1]{\langle#1\rangle}
 | |
| 94 | ||
| 5752 | 95 | \newcommand{\lparr}{\mathopen{(\!|}}
 | 
| 96 | \newcommand{\rparr}{\mathclose{|\!)}}
 | |
| 97 | \newcommand{\fs}{\mathpunct{,\,}}
 | |
| 98 | \newcommand{\ty}{\mathrel{::}}
 | |
| 99 | \newcommand{\asn}{\mathrel{:=}}
 | |
| 100 | \newcommand{\more}{\ldots}
 | |
| 101 | \newcommand{\record}[1]{\lparr #1 \rparr}
 | |
| 5765 | 102 | \newcommand{\dtt}{\mathord.}
 | 
| 5752 | 103 | |
| 110 | 104 | \newcommand\lbrakk{\mathopen{[\![}}
 | 
| 105 | \newcommand\rbrakk{\mathclose{]\!]}}
 | |
| 106 | \newcommand\List[1]{\lbrakk#1\rbrakk}  %was \obj
 | |
| 107 | \newcommand\vpile[1]{\begin{array}{c}#1\end{array}}
 | |
| 5752 | 108 | \newenvironment{matharray}[1]{\[\begin{array}{#1}}{\end{array}\]}
 | 
| 9693 | 109 | \newcommand{\Text}[1]{\mbox{#1}}
 | 
| 110 | 110 | |
| 7976 | 111 | \DeclareMathSymbol{\dshsym}{\mathalpha}{letters}{"2D}
 | 
| 112 | \newcommand{\dsh}{\mathit{\dshsym}}
 | |
| 113 | ||
| 110 | 114 | \let\int=\cap | 
| 115 | \let\un=\cup | |
| 116 | \let\inter=\bigcap | |
| 117 | \let\union=\bigcup | |
| 118 | ||
| 119 | \def\ML{{\sc ml}}
 | |
| 120 | \def\OBJ{{\sc obj}}
 | |
| 350 | 121 | \def\AST{{\sc ast}}
 | 
| 110 | 122 | |
| 123 | %macros to change the treatment of symbols | |
| 124 | \def\relsemicolon{\mathcode`\;="303B}   %treat ; like a relation
 | |
| 125 | \def\binperiod{\mathcode`\.="213A}   %treat . like a binary operator
 | |
| 126 | \def\binvert{\mathcode`\|="226A}     %treat | like a binary operator
 | |
| 127 | ||
| 128 | %redefinition of \sloppy and \fussy to use \emergencystretch | |
| 129 | \def\sloppy{\tolerance2000 \hfuzz.5pt \vfuzz.5pt \emergencystretch=15pt}
 | |
| 130 | \def\fussy{\tolerance200 \hfuzz.1pt \vfuzz.1pt \emergencystretch=0pt}
 | |
| 131 | ||
| 7169 | 132 | %non-bf version of description | 
| 133 | \def\descrlabel#1{\hspace\labelsep #1}
 | |
| 134 | \def\descr{\list{}{\labelwidth\z@ \itemindent-\leftmargin\let\makelabel\descrlabel}}
 | |
| 135 | \let\enddescr\endlist | |
| 136 | ||
| 110 | 137 | % The mathcodes for the letters A, ..., Z, a, ..., z are changed to | 
| 140 
3a8c68d1d466
changed itmath trickery to be compatible with NFSS (itmath.sty)
 nipkow parents: 
110diff
changeset | 138 | % generate text italic rather than math italic by default. This makes | 
| 110 | 139 | % multi-letter identifiers look better. The mathcode for character c | 
| 3096 | 140 | % is set to |"7000| (variable family) + |"400| (text italic) + |c|. | 
| 140 
3a8c68d1d466
changed itmath trickery to be compatible with NFSS (itmath.sty)
 nipkow parents: 
110diff
changeset | 141 | % | 
| 3096 | 142 | \DeclareSymbolFont{italics}{\encodingdefault}{\rmdefault}{m}{it}%
 | 
| 110 | 143 | \def\@setmcodes#1#2#3{{\count0=#1 \count1=#3
 | 
| 140 
3a8c68d1d466
changed itmath trickery to be compatible with NFSS (itmath.sty)
 nipkow parents: 
110diff
changeset | 144 | \loop \global\mathcode\count0=\count1 \ifnum \count0<#2 | 
| 
3a8c68d1d466
changed itmath trickery to be compatible with NFSS (itmath.sty)
 nipkow parents: 
110diff
changeset | 145 | \advance\count0 by1 \advance\count1 by1 \repeat}} | 
| 3096 | 146 | \@setmcodes{`A}{`Z}{"7\hexnumber@\symitalics41}
 | 
| 147 | \@setmcodes{`a}{`z}{"7\hexnumber@\symitalics61}
 |