lib/texinputs/isabelle.sty
author wenzelm
Mon Sep 11 17:34:42 2000 +0200 (2000-09-11)
changeset 9913 b9ecbe4667d0
parent 9818 71de955e8fc9
child 9975 236cf072264d
permissions -rw-r--r--
added \isabellecontext;
tuned;
wenzelm@7709
     1
%%
wenzelm@7709
     2
%% $Id$
wenzelm@9818
     3
%% Author: Markus Wenzel, TU Muenchen
wenzelm@9818
     4
%% License: GPL (GNU GENERAL PUBLIC LICENSE)
wenzelm@7709
     5
%%
wenzelm@7709
     6
%% macros for Isabelle generated LaTeX output
wenzelm@7709
     7
%%
wenzelm@7709
     8
wenzelm@9913
     9
%%% Simple document preparation (based on theory token language and symbols)
wenzelm@7709
    10
wenzelm@8714
    11
% isabelle environments
wenzelm@7788
    12
wenzelm@9913
    13
\newcommand{\isabellecontext}{UNKNOWN}
wenzelm@9913
    14
wenzelm@9657
    15
\newcommand{\isastyle}{\small\tt\slshape}
wenzelm@9669
    16
\newcommand{\isastyleminor}{\small\tt\slshape}
wenzelm@9657
    17
\newcommand{\isastyletext}{\normalsize\rm}
wenzelm@9657
    18
\newcommand{\isastyletxt}{\rm}
wenzelm@9657
    19
\newcommand{\isastylecmt}{\rm}
wenzelm@8713
    20
wenzelm@8713
    21
\newdimen\isa@parindent\newdimen\isa@parskip
wenzelm@9657
    22
wenzelm@9702
    23
\newenvironment{isabellebody}{%
wenzelm@9702
    24
\isa@parindent\parindent\parindent0pt%
wenzelm@8713
    25
\isa@parskip\parskip\parskip0pt%
wenzelm@9702
    26
\isastyle}{}
wenzelm@9702
    27
wenzelm@9702
    28
\newenvironment{isabelle}
wenzelm@9702
    29
{\begin{isabellebody}\begin{trivlist}\item\relax}
wenzelm@9702
    30
{\end{trivlist}\end{isabellebody}}
wenzelm@8713
    31
wenzelm@9669
    32
\newcommand{\isa}[1]{\emph{\isastyleminor #1}}
wenzelm@8714
    33
wenzelm@7709
    34
\newcommand{\isanewline}{\mbox{}\\\mbox{}}
wenzelm@9669
    35
\newcommand{\isadigit}[1]{#1}
wenzelm@7752
    36
wenzelm@9669
    37
\chardef\isacharbang=`\!
wenzelm@9669
    38
\chardef\isachardoublequote=`\"
wenzelm@9657
    39
\chardef\isacharhash=`\#
wenzelm@9657
    40
\chardef\isachardollar=`\$
wenzelm@9657
    41
\chardef\isacharpercent=`\%
wenzelm@9657
    42
\chardef\isacharampersand=`\&
wenzelm@9657
    43
\chardef\isacharprime=`\'
wenzelm@9657
    44
\chardef\isacharparenleft=`\(
wenzelm@9657
    45
\chardef\isacharparenright=`\)
wenzelm@9657
    46
\chardef\isacharasterisk=`\*
wenzelm@9669
    47
\chardef\isacharplus=`\+
wenzelm@9669
    48
\chardef\isacharcomma=`\,
wenzelm@9657
    49
\chardef\isacharminus=`\-
wenzelm@9669
    50
\chardef\isachardot=`\.
wenzelm@9669
    51
\chardef\isacharslash=`\/
wenzelm@9669
    52
\chardef\isacharcolon=`\:
wenzelm@9669
    53
\chardef\isacharsemicolon=`\;
wenzelm@9657
    54
\chardef\isacharless=`\<
wenzelm@9669
    55
\chardef\isacharequal=`\=
wenzelm@9657
    56
\chardef\isachargreater=`\>
wenzelm@9669
    57
\chardef\isacharquery=`\?
wenzelm@9669
    58
\chardef\isacharat=`\@
wenzelm@9657
    59
\chardef\isacharbrackleft=`\[
wenzelm@9657
    60
\chardef\isacharbackslash=`\\
wenzelm@9657
    61
\chardef\isacharbrackright=`\]
wenzelm@9657
    62
\chardef\isacharcircum=`\^
wenzelm@9657
    63
\chardef\isacharunderscore=`\_
wenzelm@9669
    64
\chardef\isacharbackquote=`\`
wenzelm@9657
    65
\chardef\isacharbraceleft=`\{
wenzelm@9657
    66
\chardef\isacharbar=`\|
wenzelm@9657
    67
\chardef\isacharbraceright=`\}
wenzelm@9657
    68
\chardef\isachartilde=`\~
wenzelm@7788
    69
wenzelm@7797
    70
wenzelm@7797
    71
% keyword and section markup
wenzelm@7788
    72
wenzelm@9710
    73
\newcommand{\isakeywordcharunderscore}{\_}
wenzelm@9669
    74
\newcommand{\isakeyword}[1]
wenzelm@9710
    75
{\emph{\bf\def\isachardot{.}\def\isacharunderscore{\isakeywordcharunderscore}%
wenzelm@9669
    76
\def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}}
wenzelm@9669
    77
\newcommand{\isacommand}[1]{\isakeyword{#1}}
wenzelm@7758
    78
wenzelm@8501
    79
\newcommand{\isamarkupheader}[1]{\section{#1}}
wenzelm@7752
    80
\newcommand{\isamarkupchapter}[1]{\chapter{#1}}
wenzelm@7752
    81
\newcommand{\isamarkupsection}[1]{\section{#1}}
wenzelm@7752
    82
\newcommand{\isamarkupsubsection}[1]{\subsection{#1}}
wenzelm@7752
    83
\newcommand{\isamarkupsubsubsection}[1]{\subsubsection{#1}}
wenzelm@7752
    84
\newcommand{\isamarkupsect}[1]{\section{#1}}
wenzelm@7752
    85
\newcommand{\isamarkupsubsect}[1]{\subsection{#1}}
wenzelm@7752
    86
\newcommand{\isamarkupsubsubsect}[1]{\subsubsection{#1}}
wenzelm@8662
    87
wenzelm@8713
    88
\newenvironment{isapar}{\parindent\isa@parindent\parskip\isa@parskip\par\medskip}{\par\smallskip}
wenzelm@9657
    89
\newenvironment{isamarkuptext}{\isastyletext\begin{isapar}}{\end{isapar}}
wenzelm@9657
    90
\newenvironment{isamarkuptxt}{\isastyletxt\begin{isapar}}{\end{isapar}}
wenzelm@9657
    91
\newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}}
wenzelm@9657
    92
wenzelm@9657
    93
wenzelm@9657
    94
% alternative styles -- default is "tt"
wenzelm@9657
    95
wenzelm@9657
    96
\newcommand{\isabellestyle}{}
wenzelm@9669
    97
\def\isabellestyle#1{\csname isabellestyle#1\endcsname}
wenzelm@9657
    98
wenzelm@9669
    99
\newcommand{\isabellestyleit}{%
wenzelm@9669
   100
\renewcommand{\isastyle}{\small\it}%
wenzelm@9669
   101
\renewcommand{\isastyleminor}{\it}%
wenzelm@9725
   102
\renewcommand{\isakeywordcharunderscore}{\mbox{-}}%
wenzelm@9669
   103
\renewcommand{\isacharbang}{\emph{$!$}}%
wenzelm@9669
   104
\renewcommand{\isachardoublequote}{}%
wenzelm@9669
   105
\renewcommand{\isacharhash}{\emph{$\#$}}%
wenzelm@9669
   106
\renewcommand{\isachardollar}{\emph{$\$$}}%
wenzelm@9669
   107
\renewcommand{\isacharpercent}{\emph{$\%$}}%
wenzelm@9669
   108
\renewcommand{\isacharampersand}{\emph{$\&$}}%
wenzelm@9669
   109
\renewcommand{\isacharprime}{$\mskip2mu{'}\mskip-2mu$}%
wenzelm@9657
   110
\renewcommand{\isacharparenleft}{\emph{$($}}%
wenzelm@9657
   111
\renewcommand{\isacharparenright}{\emph{$)$}}%
wenzelm@9657
   112
\renewcommand{\isacharasterisk}{\emph{$*$}}%
wenzelm@9669
   113
\renewcommand{\isacharplus}{\emph{$+$}}%
wenzelm@9669
   114
\renewcommand{\isacharcomma}{\emph{$\mathord,$}}%
wenzelm@9657
   115
\renewcommand{\isacharminus}{\emph{$-$}}%
wenzelm@9669
   116
\renewcommand{\isachardot}{\emph{$\mathord.$}}%
wenzelm@9669
   117
\renewcommand{\isacharslash}{\emph{$/$}}%
wenzelm@9669
   118
\renewcommand{\isacharcolon}{\emph{$\mathord:$}}%
wenzelm@9669
   119
\renewcommand{\isacharsemicolon}{\emph{$\mathord;$}}%
wenzelm@9657
   120
\renewcommand{\isacharless}{\emph{$<$}}%
wenzelm@9669
   121
\renewcommand{\isacharequal}{\emph{$=$}}%
wenzelm@9657
   122
\renewcommand{\isachargreater}{\emph{$>$}}%
wenzelm@9669
   123
\renewcommand{\isacharat}{\emph{$@$}}%
wenzelm@9657
   124
\renewcommand{\isacharbrackleft}{\emph{$[$}}%
wenzelm@9657
   125
\renewcommand{\isacharbrackright}{\emph{$]$}}%
wenzelm@9725
   126
\renewcommand{\isacharunderscore}{\mbox{-}}%
wenzelm@9657
   127
\renewcommand{\isacharbraceleft}{\emph{$\{$}}%
wenzelm@9657
   128
\renewcommand{\isacharbar}{\emph{$\mid$}}%
wenzelm@9657
   129
\renewcommand{\isacharbraceright}{\emph{$\}$}}%
wenzelm@9657
   130
}
wenzelm@9657
   131
wenzelm@9669
   132
\newcommand{\isabellestylesl}{\isabellestyleit\renewcommand{\isastyle}{\small\slshape}}