doc-src/iman.sty
author lcp
Wed Mar 23 13:05:12 1994 +0100 (1994-03-23)
changeset 293 63a0077dd9f2
parent 140 3a8c68d1d466
child 301 f5ccfc4d362f
permissions -rw-r--r--
first draft of Springer volume
lcp@293
     1
% iman.sty : Isabelle Manual Page Layout
lcp@110
     2
%
lcp@293
     3
\typeout{Document Style iman. Released 17 February 1994}
lcp@110
     4
lcp@293
     5
\hyphenation{Isa-belle man-u-script man-u-scripts ap-pen-dix mut-u-al-ly}
lcp@293
     6
\hyphenation{data-type data-types co-data-type co-data-types }
lcp@293
     7
lcp@293
     8
\let\ts=\thinspace
lcp@110
     9
lcp@110
    10
%%%INDEXING  use sedindex to process the index
lcp@110
    11
%index, putting page numbers of definitions in boldface
lcp@110
    12
\newcommand\bold[1]{{\bf#1}}
lcp@293
    13
\newcommand\fnote[1]{#1n}
lcp@110
    14
\newcommand\indexbold[1]{\index{#1|bold}}
lcp@110
    15
lcp@110
    16
%for cross-references: 2nd argument (page number) is ignored
lcp@110
    17
\newcommand\see[2]{{\it see \/}{#1}}
lcp@110
    18
\newcommand\seealso[2]{{\it see also \/}{#1}}
lcp@110
    19
lcp@110
    20
%set argument in \tt font; at the sime time, index using * prefix
lcp@110
    21
\newcommand\ttindex[1]{{\tt#1}\index{*#1}\@}
lcp@110
    22
\newcommand\ttindexbold[1]{{\tt#1}\index{*#1|bold}\@}
lcp@110
    23
lcp@110
    24
%set argument in \bf font and index in ROMAN font (for definitions in text!)
lcp@110
    25
\newcommand\bfindex[1]{{\bf#1}\index{#1|bold}\@}
lcp@110
    26
lcp@110
    27
lcp@110
    28
%%% underscores as ordinary characters, not for subscripting
lcp@110
    29
%%  use @ or \sb for subscripting; use \at for @
lcp@110
    30
%%  only works in \tt font
lcp@110
    31
%%  must not make _ an active char; would make \ttindex fail!
lcp@110
    32
\gdef\underscoreoff{\catcode`\@=8\catcode`\_=\other}
lcp@110
    33
\gdef\underscoreon{\catcode`\_=8\makeatother}
lcp@110
    34
\chardef\other=12
lcp@110
    35
\chardef\at=`\@
lcp@110
    36
lcp@110
    37
% alternative underscore
lcp@110
    38
\def\_{\leavevmode\kern.06em\vbox{\hrule height.2ex width.3em}\hskip0.1em}
lcp@110
    39
lcp@110
    40
%%% \dquotes permits usage of "..." for \hbox{...} -- also taken from under.sty
lcp@110
    41
{\catcode`\"=\active
lcp@110
    42
\gdef\dquotes{\catcode`\"=\active  \let"=\@mathText}%
lcp@110
    43
\gdef\@mathText#1"{\hbox{\mathTextFont #1\/}}}
lcp@110
    44
\def\mathTextFont{\frenchspacing\tt}
lcp@110
    45
lcp@110
    46
%%%% meta-logical connectives
lcp@110
    47
lcp@110
    48
\let\Forall=\bigwedge
lcp@110
    49
\let\Imp=\Longrightarrow
lcp@110
    50
\let\To=\Rightarrow
lcp@110
    51
\newcommand\Var[1]{{?\!#1}}
lcp@110
    52
lcp@110
    53
%%%% ``WARNING'' environment
lcp@110
    54
\def\dbend{\vtop to 0pt{\vss\hbox{\Huge\bf!}\vss}}
lcp@110
    55
\newenvironment{warn}{\medskip\medbreak\begingroup \clubpenalty=10000 
lcp@293
    56
         \small %%WAS\baselineskip=0.9\baselineskip
lcp@293
    57
         \noindent \hangindent\parindent \hangafter=-2 
lcp@293
    58
         \hbox to0pt{\hskip-\hangindent\dbend\hfill}\ignorespaces}%
lcp@293
    59
        {\par\endgroup\medbreak}
lcp@110
    60
lcp@110
    61
lcp@110
    62
%%%% Standard logical symbols
lcp@110
    63
\let\turn=\vdash
lcp@110
    64
\let\conj=\wedge
lcp@110
    65
\let\disj=\vee
lcp@110
    66
\let\imp=\rightarrow
lcp@110
    67
\let\bimp=\leftrightarrow
lcp@293
    68
\newcommand\all[1]{\forall#1.}  %quantification
lcp@110
    69
\newcommand\ex[1]{\exists#1.}
lcp@110
    70
\newcommand{\pair}[1]{\langle#1\rangle}
lcp@110
    71
lcp@110
    72
\newcommand\lbrakk{\mathopen{[\![}}
lcp@110
    73
\newcommand\rbrakk{\mathclose{]\!]}}
lcp@110
    74
\newcommand\List[1]{\lbrakk#1\rbrakk}  %was \obj
lcp@110
    75
\newcommand\vpile[1]{\begin{array}{c}#1\end{array}}
lcp@110
    76
lcp@110
    77
\let\int=\cap
lcp@110
    78
\let\un=\cup
lcp@110
    79
\let\inter=\bigcap
lcp@110
    80
\let\union=\bigcup
lcp@110
    81
lcp@110
    82
\def\ML{{\sc ml}}
lcp@110
    83
\def\OBJ{{\sc obj}}
lcp@110
    84
lcp@110
    85
\def\LCF{{\tt LCF}\@}
lcp@110
    86
\def\FOL{{\tt FOL}\@}
lcp@110
    87
\def\HOL{{\tt HOL}\@}
lcp@110
    88
\def\LK{{\tt LK}\@}
lcp@110
    89
\def\ZF{{\tt ZF}\@}
lcp@110
    90
\def\CTT{{\tt CTT}\@}
lcp@110
    91
\def\Cube{{\tt Cube}}
lcp@110
    92
\def\Modal{{\tt Modal}}
lcp@110
    93
lcp@110
    94
%macros to change the treatment of symbols
lcp@110
    95
\def\relsemicolon{\mathcode`\;="303B}   %treat ; like a relation
lcp@110
    96
\def\binperiod{\mathcode`\.="213A}   %treat . like a binary operator
lcp@110
    97
\def\binvert{\mathcode`\|="226A}     %treat | like a binary operator
lcp@110
    98
lcp@110
    99
%redefinition of \sloppy and \fussy to use \emergencystretch
lcp@110
   100
\def\sloppy{\tolerance2000 \hfuzz.5pt \vfuzz.5pt \emergencystretch=15pt}
lcp@110
   101
\def\fussy{\tolerance200 \hfuzz.1pt \vfuzz.1pt \emergencystretch=0pt}
lcp@110
   102
lcp@293
   103
\chardef\ttilde=`\~     % A tilde for \tt font
lcp@293
   104
\chardef\ttback=`\\     % A backslash for \tt font
lcp@293
   105
\chardef\ttlbrace=`\{   % A left brace for \tt font
lcp@293
   106
\chardef\ttrbrace=`\}   % A right brace for \tt font
lcp@110
   107
lcp@110
   108
\newfont{\sltt}{cmsltt10}     %% for output from terminal sessions
lcp@110
   109
\newcommand\out{\ \sltt}
lcp@110
   110
nipkow@140
   111
% "itmath.sty" use cmr italic for letters in math mode and get the
lcp@293
   112
%              usual letter spacing of text mode.
nipkow@140
   113
%
nipkow@140
   114
% Michael Lawley, April 1993
nipkow@140
   115
% (lawley@cit.gu.edu.au)
nipkow@140
   116
%
nipkow@140
   117
% Derived from itma.sty (of unknown origin).
lcp@110
   118
%
lcp@110
   119
% MATHCODES
lcp@110
   120
%
lcp@110
   121
% The mathcodes for the letters A, ..., Z, a, ..., z are changed to
nipkow@140
   122
% generate text italic rather than math italic by default. This makes
lcp@110
   123
% multi-letter identifiers look better. The mathcode for character c
nipkow@140
   124
% is set to "7000 (variable class) + "400 (text italic) + c.
nipkow@140
   125
%
nipkow@140
   126
% For NFSS the mathcode is "7000 (variable class) + (hex)\itfam + c
nipkow@140
   127
% \itfam is probably equal to 7.
nipkow@140
   128
%
nipkow@140
   129
nipkow@140
   130
\ifx\undefined\hexnumber@
nipkow@140
   131
  \def\hexnumber@#1{\ifcase#1 \z@
nipkow@140
   132
  \or \@ne \or \tw@ \or \thr@@
nipkow@140
   133
  \or 4\or 5\or 6\or 7\or 8\or
nipkow@140
   134
  9\or A\or B\or C\or D\or E\or F\fi}
nipkow@140
   135
\fi
lcp@110
   136
lcp@110
   137
\def\@setmcodes#1#2#3{{\count0=#1 \count1=#3
nipkow@140
   138
        \loop \global\mathcode\count0=\count1 \ifnum \count0<#2
nipkow@140
   139
        \advance\count0 by1 \advance\count1 by1 \repeat}}
nipkow@140
   140
nipkow@140
   141
\edef\@tempa{\hexnumber@\itfam}
lcp@110
   142
nipkow@140
   143
\@setmcodes{`A}{`Z}{"7\@tempa 41}
nipkow@140
   144
\@setmcodes{`a}{`z}{"7\@tempa 61}
nipkow@140
   145
nipkow@140
   146
\ifx\define@mathgroup\undefined\else
lcp@293
   147
        \define@mathgroup\mv@normal{\itfam}{cmr}{m}{it}\fi