doc-src/TutorialI/isabelle.sty
author wenzelm
Sun, 15 Oct 2000 19:50:35 +0200
changeset 10220 2a726de6e124
parent 10211 1bece7f35762
child 10226 2c0ad01ddaf7
permissions -rw-r--r--
proper symbol markup with \isamath, \isatext; support sub/super scripts:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8751
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
     1
%%
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
     2
%% $Id$
9845
1206c7615a47 updated;
wenzelm
parents: 9812
diff changeset
     3
%% Author: Markus Wenzel, TU Muenchen
1206c7615a47 updated;
wenzelm
parents: 9812
diff changeset
     4
%% License: GPL (GNU GENERAL PUBLIC LICENSE)
8751
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
     5
%%
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
     6
%% macros for Isabelle generated LaTeX output
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
     7
%%
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
     8
9924
3370f6aa3200 updated;
wenzelm
parents: 9845
diff changeset
     9
%%% Simple document preparation (based on theory token language and symbols)
8751
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    10
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    11
% isabelle environments
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    12
9924
3370f6aa3200 updated;
wenzelm
parents: 9845
diff changeset
    13
\newcommand{\isabellecontext}{UNKNOWN}
3370f6aa3200 updated;
wenzelm
parents: 9845
diff changeset
    14
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    15
\newcommand{\isastyle}{\small\tt\slshape}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    16
\newcommand{\isastyleminor}{\small\tt\slshape}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    17
\newcommand{\isastyletext}{\normalsize\rm}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    18
\newcommand{\isastyletxt}{\rm}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    19
\newcommand{\isastylecmt}{\rm}
8751
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    20
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    21
\newdimen\isa@parindent\newdimen\isa@parskip
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    22
9717
699de91b15e2 updated;
wenzelm
parents: 9698
diff changeset
    23
\newenvironment{isabellebody}{%
699de91b15e2 updated;
wenzelm
parents: 9698
diff changeset
    24
\isa@parindent\parindent\parindent0pt%
8751
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    25
\isa@parskip\parskip\parskip0pt%
9717
699de91b15e2 updated;
wenzelm
parents: 9698
diff changeset
    26
\isastyle}{}
699de91b15e2 updated;
wenzelm
parents: 9698
diff changeset
    27
699de91b15e2 updated;
wenzelm
parents: 9698
diff changeset
    28
\newenvironment{isabelle}
699de91b15e2 updated;
wenzelm
parents: 9698
diff changeset
    29
{\begin{isabellebody}\begin{trivlist}\item\relax}
699de91b15e2 updated;
wenzelm
parents: 9698
diff changeset
    30
{\end{trivlist}\end{isabellebody}}
8751
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    31
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    32
\newcommand{\isa}[1]{\emph{\isastyleminor #1}}
8771
026f37a86ea7 *** empty log message ***
nipkow
parents: 8751
diff changeset
    33
8751
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    34
\newcommand{\isanewline}{\mbox{}\\\mbox{}}
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    35
\newcommand{\isadigit}[1]{#1}
8751
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    36
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    37
\chardef\isacharbang=`\!
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    38
\chardef\isachardoublequote=`\"
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    39
\chardef\isacharhash=`\#
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    40
\chardef\isachardollar=`\$
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    41
\chardef\isacharpercent=`\%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    42
\chardef\isacharampersand=`\&
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    43
\chardef\isacharprime=`\'
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    44
\chardef\isacharparenleft=`\(
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    45
\chardef\isacharparenright=`\)
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    46
\chardef\isacharasterisk=`\*
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    47
\chardef\isacharplus=`\+
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    48
\chardef\isacharcomma=`\,
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    49
\chardef\isacharminus=`\-
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    50
\chardef\isachardot=`\.
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    51
\chardef\isacharslash=`\/
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    52
\chardef\isacharcolon=`\:
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    53
\chardef\isacharsemicolon=`\;
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    54
\chardef\isacharless=`\<
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    55
\chardef\isacharequal=`\=
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    56
\chardef\isachargreater=`\>
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    57
\chardef\isacharquery=`\?
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    58
\chardef\isacharat=`\@
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    59
\chardef\isacharbrackleft=`\[
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    60
\chardef\isacharbackslash=`\\
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    61
\chardef\isacharbrackright=`\]
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    62
\chardef\isacharcircum=`\^
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    63
\chardef\isacharunderscore=`\_
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    64
\chardef\isacharbackquote=`\`
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    65
\chardef\isacharbraceleft=`\{
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    66
\chardef\isacharbar=`\|
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    67
\chardef\isacharbraceright=`\}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    68
\chardef\isachartilde=`\~
8751
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    69
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    70
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    71
% keyword and section markup
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    72
9717
699de91b15e2 updated;
wenzelm
parents: 9698
diff changeset
    73
\newcommand{\isakeywordcharunderscore}{\_}
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    74
\newcommand{\isakeyword}[1]
9717
699de91b15e2 updated;
wenzelm
parents: 9698
diff changeset
    75
{\emph{\bf\def\isachardot{.}\def\isacharunderscore{\isakeywordcharunderscore}%
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    76
\def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    77
\newcommand{\isacommand}[1]{\isakeyword{#1}}
8751
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    78
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    79
\newcommand{\isamarkupheader}[1]{\section{#1}}
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    80
\newcommand{\isamarkupchapter}[1]{\chapter{#1}}
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    81
\newcommand{\isamarkupsection}[1]{\section{#1}}
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    82
\newcommand{\isamarkupsubsection}[1]{\subsection{#1}}
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    83
\newcommand{\isamarkupsubsubsection}[1]{\subsubsection{#1}}
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    84
\newcommand{\isamarkupsect}[1]{\section{#1}}
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    85
\newcommand{\isamarkupsubsect}[1]{\subsection{#1}}
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    86
\newcommand{\isamarkupsubsubsect}[1]{\subsubsection{#1}}
9ed0548177fb *** empty log message ***
nipkow
parents:
diff changeset
    87
10132
8e9a8ede2f11 updated;
wenzelm
parents: 10089
diff changeset
    88
\newenvironment{isapar}{\parindent\isa@parindent\parskip\isa@parskip\par\medskip}{\par\medskip}
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    89
\newenvironment{isamarkuptext}{\isastyletext\begin{isapar}}{\end{isapar}}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    90
\newenvironment{isamarkuptxt}{\isastyletxt\begin{isapar}}{\end{isapar}}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    91
\newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    92
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    93
10037
0d2a6feeb634 updated;
wenzelm
parents: 9992
diff changeset
    94
% alternative styles
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    95
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    96
\newcommand{\isabellestyle}{}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    97
\def\isabellestyle#1{\csname isabellestyle#1\endcsname}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
    98
10037
0d2a6feeb634 updated;
wenzelm
parents: 9992
diff changeset
    99
\newcommand{\isabellestylett}{%
0d2a6feeb634 updated;
wenzelm
parents: 9992
diff changeset
   100
\renewcommand{\isastyle}{\small\tt}%
10211
1bece7f35762 updated;
wenzelm
parents: 10132
diff changeset
   101
\renewcommand{\isastyleminor}{\small\tt}%
10037
0d2a6feeb634 updated;
wenzelm
parents: 9992
diff changeset
   102
}
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   103
\newcommand{\isabellestyleit}{%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   104
\renewcommand{\isastyle}{\small\it}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   105
\renewcommand{\isastyleminor}{\it}%
9812
87ba969d069c updated;
wenzelm
parents: 9717
diff changeset
   106
\renewcommand{\isakeywordcharunderscore}{\mbox{-}}%
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   107
\renewcommand{\isacharbang}{\emph{$!$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   108
\renewcommand{\isachardoublequote}{}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   109
\renewcommand{\isacharhash}{\emph{$\#$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   110
\renewcommand{\isachardollar}{\emph{$\$$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   111
\renewcommand{\isacharpercent}{\emph{$\%$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   112
\renewcommand{\isacharampersand}{\emph{$\&$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   113
\renewcommand{\isacharprime}{$\mskip2mu{'}\mskip-2mu$}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   114
\renewcommand{\isacharparenleft}{\emph{$($}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   115
\renewcommand{\isacharparenright}{\emph{$)$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   116
\renewcommand{\isacharasterisk}{\emph{$*$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   117
\renewcommand{\isacharplus}{\emph{$+$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   118
\renewcommand{\isacharcomma}{\emph{$\mathord,$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   119
\renewcommand{\isacharminus}{\emph{$-$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   120
\renewcommand{\isachardot}{\emph{$\mathord.$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   121
\renewcommand{\isacharslash}{\emph{$/$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   122
\renewcommand{\isacharcolon}{\emph{$\mathord:$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   123
\renewcommand{\isacharsemicolon}{\emph{$\mathord;$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   124
\renewcommand{\isacharless}{\emph{$<$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   125
\renewcommand{\isacharequal}{\emph{$=$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   126
\renewcommand{\isachargreater}{\emph{$>$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   127
\renewcommand{\isacharat}{\emph{$@$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   128
\renewcommand{\isacharbrackleft}{\emph{$[$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   129
\renewcommand{\isacharbrackright}{\emph{$]$}}%
9812
87ba969d069c updated;
wenzelm
parents: 9717
diff changeset
   130
\renewcommand{\isacharunderscore}{\mbox{-}}%
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   131
\renewcommand{\isacharbraceleft}{\emph{$\{$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   132
\renewcommand{\isacharbar}{\emph{$\mid$}}%
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   133
\renewcommand{\isacharbraceright}{\emph{$\}$}}%
10089
39f94bf02706 updated;
wenzelm
parents: 10037
diff changeset
   134
\renewcommand{\isachartilde}{\emph{${}^\sim$}}%
9673
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   135
}
1b2d4f995b13 updated;
wenzelm
parents: 8824
diff changeset
   136
9992
4281ccea43f0 *** empty log message ***
nipkow
parents: 9924
diff changeset
   137
\newcommand{\isabellestylesl}{%
4281ccea43f0 *** empty log message ***
nipkow
parents: 9924
diff changeset
   138
\isabellestyleit%
4281ccea43f0 *** empty log message ***
nipkow
parents: 9924
diff changeset
   139
\renewcommand{\isastyle}{\small\sl}%
4281ccea43f0 *** empty log message ***
nipkow
parents: 9924
diff changeset
   140
\renewcommand{\isastyleminor}{\sl}%
4281ccea43f0 *** empty log message ***
nipkow
parents: 9924
diff changeset
   141
}