doc-src/TutorialI/tutorial.sty
author wenzelm
Thu, 08 Sep 2011 00:20:09 +0200
changeset 44809 df3626d1066e
parent 16523 f8a734dc0fbc
permissions -rw-r--r--
more substructural sharing to gain significant compression;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
     1
% tutorial.sty : Isabelle Tutorial Page Layout
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
     2
%
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
     3
\typeout{Document Style tutorial. Released 9 July 2001}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
     4
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
     5
\hyphenation{Isa-belle man-u-script man-u-scripts ap-pen-dix mut-u-al-ly}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
     6
\hyphenation{data-type data-types co-data-type co-data-types }
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
     7
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
     8
%usage: \iflabelundefined{LABEL}{if not defined}{if defined}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
     9
\newcommand{\iflabelundefined}[1]{\@ifundefined{r@#1}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    10
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    11
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    12
%%%INDEXING  use isa-index to process the index
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    13
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    14
\newcommand\seealso[2]{\emph{see also} #1}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    15
\usepackage{makeidx}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    16
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    17
%index, putting page numbers of definitions in boldface
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    18
\def\bold#1{\textbf{#1}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    19
\newcommand\fnote[1]{#1n}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    20
\newcommand\indexbold[1]{\index{#1|bold}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    21
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    22
% The alternative to \protect\isa in the indexing macros is
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    23
% \noexpand\noexpand \noexpand\isa
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    24
% need TWO levels of \noexpand to delay the expansion of \isa:
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    25
%  the \noexpand\noexpand will leave one \noexpand, to be given to the
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    26
%  (still unexpanded) \isa token.  See TeX by Topic, page 122.
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    27
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    28
%%%% for indexing constants, symbols, theorems, ...
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    29
\newcommand\cdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (constant)}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    30
\newcommand\sdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (symbol)}}
15364
0c3891c3528f *** empty log message ***
nipkow
parents: 14400
diff changeset
    31
\newcommand\sdxpos[2]{\isa{#1}\index{#2@\protect\isa{#1} (symbol)}}
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    32
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    33
\newcommand\tdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (theorem)}}
11422
a3487304489a fixed bad error in tdxbold; also removed default indexing in \\rulename
paulson
parents: 11403
diff changeset
    34
\newcommand\tdxbold[1]{\isa{#1}\index{#1@\protect\isa{#1} (theorem)|bold}}
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    35
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    36
\newcommand\cldx[1]{\isa{#1}\index{#1@\protect\isa{#1} (class)}}
11457
279da0358aa9 additional revisions to chapters 1, 2
paulson
parents: 11456
diff changeset
    37
\newcommand\tydx[1]{\isa{#1}\index{#1@\protect\isa{#1} (type)}}
14400
6069098854b9 new numerics section using type classes
paulson
parents: 13111
diff changeset
    38
\newcommand\tcdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (type class)}}
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    39
\newcommand\thydx[1]{\isa{#1}\index{#1@\protect\isa{#1} (theory)}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    40
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    41
\newcommand\attrdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (attribute)}}
13111
2d6782e71702 *** empty log message ***
nipkow
parents: 12638
diff changeset
    42
\newcommand\cmmdx[1]{\index{#1@\protect\isacommand{#1} (command)}}
2d6782e71702 *** empty log message ***
nipkow
parents: 12638
diff changeset
    43
\newcommand\commdx[1]{\isacommand{#1}\index{#1@\protect\isacommand{#1} (command)}}
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    44
\newcommand\methdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (method)}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    45
\newcommand\tooldx[1]{\isa{#1}\index{#1@\protect\isa{#1} (tool)}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    46
\newcommand\settdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (setting)}}
16523
f8a734dc0fbc *** empty log message ***
nipkow
parents: 16087
diff changeset
    47
\newcommand\pgdx[1]{\pgmenu{#1}\index{#1@\protect\pgmenu{#1} (Proof General)}}
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    48
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    49
%set argument in \bf font and index in ROMAN font (for definitions in text!)
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    50
\newcommand\bfindex[1]{{\bf#1}\index{#1|bold}\@}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    51
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    52
\newcommand\rmindex[1]{{#1}\index{#1}\@}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    53
\newcommand\ttindex[1]{\texttt{#1}\index{#1@\texttt{#1}}\@}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    54
\newcommand\ttindexbold[1]{\texttt{#1}\index{#1@\texttt{#1}|bold}\@}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    55
15364
0c3891c3528f *** empty log message ***
nipkow
parents: 14400
diff changeset
    56
\newcommand{\isadxpos}[2]{\isa{#1}\index{#2@\protect\isa{#1}}\@}
0c3891c3528f *** empty log message ***
nipkow
parents: 14400
diff changeset
    57
\newcommand{\isadxboldpos}[2]{\isa{#1}\index{#2@\protect\isa{#1}|bold}\@}
0c3891c3528f *** empty log message ***
nipkow
parents: 14400
diff changeset
    58
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11428
diff changeset
    59
%Commented-out the original versions to see what the index looks like without them.
7eb63f63e6c6 revisions and indexing
paulson
parents: 11428
diff changeset
    60
%   In any event, they need to use \isa or \protect\isa rather than \texttt.
7eb63f63e6c6 revisions and indexing
paulson
parents: 11428
diff changeset
    61
%%\newcommand{\indexboldpos}[2]{#1\index{#2@#1|bold}\@}
7eb63f63e6c6 revisions and indexing
paulson
parents: 11428
diff changeset
    62
%%\newcommand{\ttindexboldpos}[2]{\texttt{#1}\index{#2@\texttt{#1}|bold}\@}
7eb63f63e6c6 revisions and indexing
paulson
parents: 11428
diff changeset
    63
\newcommand{\indexboldpos}[2]{#1\@}
7eb63f63e6c6 revisions and indexing
paulson
parents: 11428
diff changeset
    64
\newcommand{\ttindexboldpos}[2]{\isa{#1}\@}
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    65
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    66
%\newtheorem{theorem}{Theorem}[section]
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    67
\newtheorem{Exercise}{Exercise}[section]
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    68
\newenvironment{exercise}{\begin{Exercise}\rm}{\end{Exercise}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    69
\newcommand{\ttlbr}{\texttt{[|}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    70
\newcommand{\ttrbr}{\texttt{|]}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    71
\newcommand{\ttor}{\texttt{|}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    72
\newcommand{\ttall}{\texttt{!}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    73
\newcommand{\ttuniquex}{\texttt{?!}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    74
\newcommand{\ttEXU}{\texttt{EX!}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    75
\newcommand{\ttAnd}{\texttt{!!}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    76
12638
812ce0d9fc85 \newcommand{\isasymignore}{}, so we may use \<ignore> to disambiguate
wenzelm
parents: 11457
diff changeset
    77
\newcommand{\isasymignore}{}
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    78
\newcommand{\isasymimp}{\isasymlongrightarrow}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    79
\newcommand{\isasymImp}{\isasymLongrightarrow}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    80
\newcommand{\isasymFun}{\isasymRightarrow}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    81
\newcommand{\isasymuniqex}{\isamath{\exists!\,}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    82
\renewcommand{\S}{Sect.\ts}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    83
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    84
\renewenvironment{isamarkuptxt}{\begin{isamarkuptext}}{\end{isamarkuptext}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    85
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    86
\newif\ifremarks
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    87
\newcommand{\REMARK}[1]{\ifremarks\marginpar{\raggedright\footnotesize#1}\fi}
11422
a3487304489a fixed bad error in tdxbold; also removed default indexing in \\rulename
paulson
parents: 11403
diff changeset
    88
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    89
%names of Isabelle rules
11422
a3487304489a fixed bad error in tdxbold; also removed default indexing in \\rulename
paulson
parents: 11403
diff changeset
    90
\newcommand{\rulename}[1]{\hfill(#1)}
a3487304489a fixed bad error in tdxbold; also removed default indexing in \\rulename
paulson
parents: 11403
diff changeset
    91
\newcommand{\rulenamedx}[1]{\hfill(#1\index{#1@\protect\isa{#1} (theorem)|bold})}
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    92
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    93
%%%% meta-logical connectives
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    94
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    95
\let\Forall=\bigwedge
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    96
\let\Imp=\Longrightarrow
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    97
\let\To=\Rightarrow
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    98
\newcommand{\Var}[1]{{?\!#1}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
    99
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   100
%%% underscores as ordinary characters, not for subscripting
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   101
%%  use @ or \sb for subscripting; use \at for @
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   102
%%  only works in \tt font
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   103
%%  must not make _ an active char; would make \ttindex fail!
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   104
\gdef\underscoreoff{\catcode`\@=8\catcode`\_=\other}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   105
\gdef\underscoreon{\catcode`\_=8\makeatother}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   106
\chardef\other=12
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   107
\chardef\at=`\@
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   108
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   109
% alternative underscore
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   110
\def\_{\leavevmode\kern.06em\vbox{\hrule height.2ex width.3em}\hskip0.1em}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   111
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   112
16072
d8a6afbb71ec new environments for Proof General notes
paulson
parents: 15364
diff changeset
   113
%%%% ``WARNING'' environment: 2 ! characters separated by negative thin space
d8a6afbb71ec new environments for Proof General notes
paulson
parents: 15364
diff changeset
   114
\def\warnbang{\vtop to 0pt{\vss\hbox{\Huge\bf!\!!}\vss}}
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   115
\newenvironment{warn}{\medskip\medbreak\begingroup \clubpenalty=10000 
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   116
         \small %%WAS\baselineskip=0.9\baselineskip
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   117
         \noindent \hangindent\parindent \hangafter=-2 
16072
d8a6afbb71ec new environments for Proof General notes
paulson
parents: 15364
diff changeset
   118
         \hbox to0pt{\hskip-\hangindent\warnbang\hfill}\ignorespaces}%
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   119
        {\par\endgroup\medbreak}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   120
16087
89d0ee1fb198 Narrower version of the Proof General's head; removal of the alternative icon and environment
paulson
parents: 16072
diff changeset
   121
%%%% ``PROOF GENERAL'' environment
89d0ee1fb198 Narrower version of the Proof General's head; removal of the alternative icon and environment
paulson
parents: 16072
diff changeset
   122
\def\pghead{\lower3pt\vbox to 0pt{\vss\hbox{\includegraphics[width=12pt]{pghead}}\vss}}
16072
d8a6afbb71ec new environments for Proof General notes
paulson
parents: 15364
diff changeset
   123
\newenvironment{pgnote}{\medskip\medbreak\begingroup \clubpenalty=10000 
d8a6afbb71ec new environments for Proof General notes
paulson
parents: 15364
diff changeset
   124
         \small \noindent \hangindent\parindent \hangafter=-2 
d8a6afbb71ec new environments for Proof General notes
paulson
parents: 15364
diff changeset
   125
         \hbox to0pt{\hskip-\hangindent \pghead\hfill}\ignorespaces}%
d8a6afbb71ec new environments for Proof General notes
paulson
parents: 15364
diff changeset
   126
  {\par\endgroup\medbreak}
16523
f8a734dc0fbc *** empty log message ***
nipkow
parents: 16087
diff changeset
   127
\newcommand{\pgmenu}[1]{\textsf{#1}}
16072
d8a6afbb71ec new environments for Proof General notes
paulson
parents: 15364
diff changeset
   128
11403
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   129
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   130
%%%% Standard logical symbols
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   131
\let\turn=\vdash
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   132
\let\conj=\wedge
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   133
\let\disj=\vee
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   134
\let\imp=\rightarrow
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   135
\let\bimp=\leftrightarrow
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   136
\newcommand\all[1]{\forall#1.}  %quantification
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   137
\newcommand\ex[1]{\exists#1.}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   138
\newcommand{\pair}[1]{\langle#1\rangle}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   139
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   140
\newcommand{\lparr}{\mathopen{(\!|}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   141
\newcommand{\rparr}{\mathclose{|\!)}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   142
\newcommand{\fs}{\mathpunct{,\,}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   143
\newcommand{\ty}{\mathrel{::}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   144
\newcommand{\asn}{\mathrel{:=}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   145
\newcommand{\more}{\ldots}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   146
\newcommand{\record}[1]{\lparr #1 \rparr}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   147
\newcommand{\dtt}{\mathord.}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   148
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   149
\newcommand\lbrakk{\mathopen{[\![}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   150
\newcommand\rbrakk{\mathclose{]\!]}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   151
\newcommand\List[1]{\lbrakk#1\rbrakk}  %was \obj
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   152
\newcommand\vpile[1]{\begin{array}{c}#1\end{array}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   153
\newenvironment{matharray}[1]{\[\begin{array}{#1}}{\end{array}\]}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   154
\newcommand{\Text}[1]{\mbox{#1}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   155
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   156
\DeclareMathSymbol{\dshsym}{\mathalpha}{letters}{"2D}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   157
\newcommand{\dsh}{\mathit{\dshsym}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   158
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   159
\let\int=\cap
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   160
\let\un=\cup
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   161
\let\inter=\bigcap
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   162
\let\union=\bigcup
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   163
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   164
\def\ML{{\sc ml}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   165
\def\AST{{\sc ast}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   166
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   167
%macros to change the treatment of symbols
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   168
\def\relsemicolon{\mathcode`\;="303B}   %treat ; like a relation
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   169
\def\binperiod{\mathcode`\.="213A}   %treat . like a binary operator
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   170
\def\binvert{\mathcode`\|="226A}     %treat | like a binary operator
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   171
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   172
%redefinition of \sloppy and \fussy to use \emergencystretch
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   173
\def\sloppy{\tolerance2000 \hfuzz.5pt \vfuzz.5pt \emergencystretch=15pt}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   174
\def\fussy{\tolerance200 \hfuzz.1pt \vfuzz.1pt \emergencystretch=0pt}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   175
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   176
%non-bf version of description
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   177
\def\descrlabel#1{\hspace\labelsep #1}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   178
\def\descr{\list{}{\labelwidth\z@ \itemindent-\leftmargin\let\makelabel\descrlabel}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   179
\let\enddescr\endlist
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   180
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   181
% The mathcodes for the letters A, ..., Z, a, ..., z are changed to
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   182
% generate text italic rather than math italic by default. This makes
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   183
% multi-letter identifiers look better. The mathcode for character c
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   184
% is set to |"7000| (variable family) + |"400| (text italic) + |c|.
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   185
%
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   186
\DeclareSymbolFont{italics}{\encodingdefault}{\rmdefault}{m}{it}%
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   187
\def\@setmcodes#1#2#3{{\count0=#1 \count1=#3
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   188
        \loop \global\mathcode\count0=\count1 \ifnum \count0<#2
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   189
        \advance\count0 by1 \advance\count1 by1 \repeat}}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   190
\@setmcodes{`A}{`Z}{"7\hexnumber@\symitalics41}
b3b95a228d37 new macro file for the tutorial
paulson
parents:
diff changeset
   191
\@setmcodes{`a}{`z}{"7\hexnumber@\symitalics61}