doc-src/ZF/isabelle.sty
author paulson
Tue, 19 Aug 2003 13:53:58 +0200
changeset 14152 12f6f18e7afc
child 14981 e73f8140af78
permissions -rw-r--r--
For the Isar version of the ZF logics manual
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14152
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
     1
%%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
     2
%% Author: Markus Wenzel, TU Muenchen
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
     3
%% License: GPL (GNU GENERAL PUBLIC LICENSE)
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
     4
%%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
     5
%% macros for Isabelle generated LaTeX output
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
     6
%%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
     7
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
     8
%%% Simple document preparation (based on theory token language and symbols)
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
     9
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    10
% isabelle environments
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    11
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    12
\newcommand{\isabellecontext}{UNKNOWN}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    13
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    14
\newcommand{\isastyle}{\small\tt\slshape}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    15
\newcommand{\isastyleminor}{\small\tt\slshape}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    16
\newcommand{\isastylescript}{\footnotesize\tt\slshape}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    17
\newcommand{\isastyletext}{\normalsize\rm}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    18
\newcommand{\isastyletxt}{\rm}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    19
\newcommand{\isastylecmt}{\rm}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    20
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    21
%symbol markup -- \emph achieves decent spacing via italic corrections
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    22
\newcommand{\isamath}[1]{\emph{$#1$}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    23
\newcommand{\isatext}[1]{\emph{#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    24
\newcommand{\isascriptstyle}{\def\isamath##1{##1}\def\isatext##1{\mbox{\isastylescript##1}}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    25
\newcommand{\isactrlsub}[1]{\emph{\isascriptstyle${}\sb{#1}$}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    26
\newcommand{\isactrlsup}[1]{\emph{\isascriptstyle${}\sp{#1}$}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    27
\newcommand{\isactrlbold}[1]{{\bfseries\upshape\boldmath#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    28
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    29
\newdimen\isa@parindent\newdimen\isa@parskip
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    30
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    31
\newenvironment{isabellebody}{%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    32
\isamarkuptrue\par%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    33
\isa@parindent\parindent\parindent0pt%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    34
\isa@parskip\parskip\parskip0pt%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    35
\isastyle}{\par}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    36
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    37
\newenvironment{isabelle}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    38
{\begin{trivlist}\begin{isabellebody}\item\relax}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    39
{\end{isabellebody}\end{trivlist}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    40
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    41
\newcommand{\isa}[1]{\emph{\isastyleminor #1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    42
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    43
\newcommand{\isaindent}[1]{\hphantom{#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    44
\newcommand{\isanewline}{\mbox{}\par\mbox{}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    45
\newcommand{\isadigit}[1]{#1}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    46
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    47
\chardef\isacharbang=`\!
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    48
\chardef\isachardoublequote=`\"
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    49
\chardef\isacharhash=`\#
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    50
\chardef\isachardollar=`\$
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    51
\chardef\isacharpercent=`\%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    52
\chardef\isacharampersand=`\&
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    53
\chardef\isacharprime=`\'
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    54
\chardef\isacharparenleft=`\(
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    55
\chardef\isacharparenright=`\)
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    56
\chardef\isacharasterisk=`\*
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    57
\chardef\isacharplus=`\+
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    58
\chardef\isacharcomma=`\,
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    59
\chardef\isacharminus=`\-
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    60
\chardef\isachardot=`\.
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    61
\chardef\isacharslash=`\/
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    62
\chardef\isacharcolon=`\:
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    63
\chardef\isacharsemicolon=`\;
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    64
\chardef\isacharless=`\<
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    65
\chardef\isacharequal=`\=
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    66
\chardef\isachargreater=`\>
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    67
\chardef\isacharquery=`\?
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    68
\chardef\isacharat=`\@
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    69
\chardef\isacharbrackleft=`\[
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    70
\chardef\isacharbackslash=`\\
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    71
\chardef\isacharbrackright=`\]
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    72
\chardef\isacharcircum=`\^
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    73
\chardef\isacharunderscore=`\_
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    74
\chardef\isacharbackquote=`\`
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    75
\chardef\isacharbraceleft=`\{
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    76
\chardef\isacharbar=`\|
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    77
\chardef\isacharbraceright=`\}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    78
\chardef\isachartilde=`\~
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    79
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    80
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    81
% keyword and section markup
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    82
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    83
\newcommand{\isakeywordcharunderscore}{\_}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    84
\newcommand{\isakeyword}[1]
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    85
{\emph{\bf\def\isachardot{.}\def\isacharunderscore{\isakeywordcharunderscore}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    86
\def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    87
\newcommand{\isacommand}[1]{\isakeyword{#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    88
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    89
\newcommand{\isamarkupheader}[1]{\section{#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    90
\newcommand{\isamarkupchapter}[1]{\chapter{#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    91
\newcommand{\isamarkupsection}[1]{\section{#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    92
\newcommand{\isamarkupsubsection}[1]{\subsection{#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    93
\newcommand{\isamarkupsubsubsection}[1]{\subsubsection{#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    94
\newcommand{\isamarkupsect}[1]{\section{#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    95
\newcommand{\isamarkupsubsect}[1]{\subsection{#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    96
\newcommand{\isamarkupsubsubsect}[1]{\subsubsection{#1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    97
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    98
\newif\ifisamarkup
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
    99
\newcommand{\isabeginpar}{\par\ifisamarkup\relax\else\medskip\fi}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   100
\newcommand{\isaendpar}{\par\medskip}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   101
\newenvironment{isapar}{\parindent\isa@parindent\parskip\isa@parskip\isabeginpar}{\isaendpar}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   102
\newenvironment{isamarkuptext}{\isastyletext\begin{isapar}}{\end{isapar}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   103
\newenvironment{isamarkuptxt}{\isastyletxt\begin{isapar}}{\end{isapar}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   104
\newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   105
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   106
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   107
% alternative styles
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   108
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   109
\newcommand{\isabellestyle}{}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   110
\def\isabellestyle#1{\csname isabellestyle#1\endcsname}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   111
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   112
\newcommand{\isabellestylett}{%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   113
\renewcommand{\isastyle}{\small\tt}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   114
\renewcommand{\isastyleminor}{\small\tt}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   115
\renewcommand{\isastylescript}{\footnotesize\tt}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   116
}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   117
\newcommand{\isabellestyleit}{%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   118
\renewcommand{\isastyle}{\small\it}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   119
\renewcommand{\isastyleminor}{\it}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   120
\renewcommand{\isastylescript}{\footnotesize\it}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   121
\renewcommand{\isakeywordcharunderscore}{\mbox{-}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   122
\renewcommand{\isacharbang}{\isamath{!}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   123
\renewcommand{\isachardoublequote}{}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   124
\renewcommand{\isacharhash}{\isamath{\#}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   125
\renewcommand{\isachardollar}{\isamath{\$}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   126
\renewcommand{\isacharpercent}{\isamath{\%}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   127
\renewcommand{\isacharampersand}{\isamath{\&}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   128
\renewcommand{\isacharprime}{\isamath{\mskip2mu{'}\mskip-2mu}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   129
\renewcommand{\isacharparenleft}{\isamath{(}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   130
\renewcommand{\isacharparenright}{\isamath{)}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   131
\renewcommand{\isacharasterisk}{\isamath{*}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   132
\renewcommand{\isacharplus}{\isamath{+}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   133
\renewcommand{\isacharcomma}{\isamath{\mathord,}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   134
\renewcommand{\isacharminus}{\isamath{-}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   135
\renewcommand{\isachardot}{\isamath{\mathord.}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   136
\renewcommand{\isacharslash}{\isamath{/}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   137
\renewcommand{\isacharcolon}{\isamath{\mathord:}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   138
\renewcommand{\isacharsemicolon}{\isamath{\mathord;}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   139
\renewcommand{\isacharless}{\isamath{<}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   140
\renewcommand{\isacharequal}{\isamath{=}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   141
\renewcommand{\isachargreater}{\isamath{>}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   142
\renewcommand{\isacharat}{\isamath{@}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   143
\renewcommand{\isacharbrackleft}{\isamath{[}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   144
\renewcommand{\isacharbrackright}{\isamath{]}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   145
\renewcommand{\isacharunderscore}{\mbox{-}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   146
\renewcommand{\isacharbraceleft}{\isamath{\{}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   147
\renewcommand{\isacharbar}{\isamath{\mid}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   148
\renewcommand{\isacharbraceright}{\isamath{\}}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   149
\renewcommand{\isachartilde}{\isamath{{}\sp{\sim}}}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   150
}
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   151
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   152
\newcommand{\isabellestylesl}{%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   153
\isabellestyleit%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   154
\renewcommand{\isastyle}{\small\sl}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   155
\renewcommand{\isastyleminor}{\sl}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   156
\renewcommand{\isastylescript}{\footnotesize\sl}%
12f6f18e7afc For the Isar version of the ZF logics manual
paulson
parents:
diff changeset
   157
}