%%
%% $Id$
%% Author: Markus Wenzel, TU Muenchen
%% License: GPL (GNU GENERAL PUBLIC LICENSE)
%%
%% macros for Isabelle generated LaTeX output
%%
%%% Simple document preparation (based on theory token language)
% isabelle environments
\newcommand{\isastyle}{\small\tt\slshape}
\newcommand{\isastyleminor}{\small\tt\slshape}
\newcommand{\isastyletext}{\normalsize\rm}
\newcommand{\isastyletxt}{\rm}
\newcommand{\isastylecmt}{\rm}
\newdimen\isa@parindent\newdimen\isa@parskip
\newenvironment{isabellebody}{%
\isa@parindent\parindent\parindent0pt%
\isa@parskip\parskip\parskip0pt%
\isastyle}{}
\newenvironment{isabelle}
{\begin{isabellebody}\begin{trivlist}\item\relax}
{\end{trivlist}\end{isabellebody}}
\newcommand{\isa}[1]{\emph{\isastyleminor #1}}
\newcommand{\isanewline}{\mbox{}\\\mbox{}}
\newcommand{\isadigit}[1]{#1}
\chardef\isacharbang=`\!
\chardef\isachardoublequote=`\"
\chardef\isacharhash=`\#
\chardef\isachardollar=`\$
\chardef\isacharpercent=`\%
\chardef\isacharampersand=`\&
\chardef\isacharprime=`\'
\chardef\isacharparenleft=`\(
\chardef\isacharparenright=`\)
\chardef\isacharasterisk=`\*
\chardef\isacharplus=`\+
\chardef\isacharcomma=`\,
\chardef\isacharminus=`\-
\chardef\isachardot=`\.
\chardef\isacharslash=`\/
\chardef\isacharcolon=`\:
\chardef\isacharsemicolon=`\;
\chardef\isacharless=`\<
\chardef\isacharequal=`\=
\chardef\isachargreater=`\>
\chardef\isacharquery=`\?
\chardef\isacharat=`\@
\chardef\isacharbrackleft=`\[
\chardef\isacharbackslash=`\\
\chardef\isacharbrackright=`\]
\chardef\isacharcircum=`\^
\chardef\isacharunderscore=`\_
\chardef\isacharbackquote=`\`
\chardef\isacharbraceleft=`\{
\chardef\isacharbar=`\|
\chardef\isacharbraceright=`\}
\chardef\isachartilde=`\~
% keyword and section markup
\newcommand{\isakeywordcharunderscore}{\_}
\newcommand{\isakeyword}[1]
{\emph{\bf\def\isachardot{.}\def\isacharunderscore{\isakeywordcharunderscore}%
\def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}}
\newcommand{\isacommand}[1]{\isakeyword{#1}}
\newcommand{\isamarkupheader}[1]{\section{#1}}
\newcommand{\isamarkupchapter}[1]{\chapter{#1}}
\newcommand{\isamarkupsection}[1]{\section{#1}}
\newcommand{\isamarkupsubsection}[1]{\subsection{#1}}
\newcommand{\isamarkupsubsubsection}[1]{\subsubsection{#1}}
\newcommand{\isamarkupsect}[1]{\section{#1}}
\newcommand{\isamarkupsubsect}[1]{\subsection{#1}}
\newcommand{\isamarkupsubsubsect}[1]{\subsubsection{#1}}
\newenvironment{isapar}{\parindent\isa@parindent\parskip\isa@parskip\par\medskip}{\par\smallskip}
\newenvironment{isamarkuptext}{\isastyletext\begin{isapar}}{\end{isapar}}
\newenvironment{isamarkuptxt}{\isastyletxt\begin{isapar}}{\end{isapar}}
\newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}}
% alternative styles -- default is "tt"
\newcommand{\isabellestyle}{}
\def\isabellestyle#1{\csname isabellestyle#1\endcsname}
\newcommand{\isabellestyleit}{%
\renewcommand{\isastyle}{\small\it}%
\renewcommand{\isastyleminor}{\it}%
\renewcommand{\isakeywordcharunderscore}{\mbox{-}}%
\renewcommand{\isacharbang}{\emph{$!$}}%
\renewcommand{\isachardoublequote}{}%
\renewcommand{\isacharhash}{\emph{$\#$}}%
\renewcommand{\isachardollar}{\emph{$\$$}}%
\renewcommand{\isacharpercent}{\emph{$\%$}}%
\renewcommand{\isacharampersand}{\emph{$\&$}}%
\renewcommand{\isacharprime}{$\mskip2mu{'}\mskip-2mu$}%
\renewcommand{\isacharparenleft}{\emph{$($}}%
\renewcommand{\isacharparenright}{\emph{$)$}}%
\renewcommand{\isacharasterisk}{\emph{$*$}}%
\renewcommand{\isacharplus}{\emph{$+$}}%
\renewcommand{\isacharcomma}{\emph{$\mathord,$}}%
\renewcommand{\isacharminus}{\emph{$-$}}%
\renewcommand{\isachardot}{\emph{$\mathord.$}}%
\renewcommand{\isacharslash}{\emph{$/$}}%
\renewcommand{\isacharcolon}{\emph{$\mathord:$}}%
\renewcommand{\isacharsemicolon}{\emph{$\mathord;$}}%
\renewcommand{\isacharless}{\emph{$<$}}%
\renewcommand{\isacharequal}{\emph{$=$}}%
\renewcommand{\isachargreater}{\emph{$>$}}%
\renewcommand{\isacharat}{\emph{$@$}}%
\renewcommand{\isacharbrackleft}{\emph{$[$}}%
\renewcommand{\isacharbrackright}{\emph{$]$}}%
\renewcommand{\isacharunderscore}{\mbox{-}}%
\renewcommand{\isacharbraceleft}{\emph{$\{$}}%
\renewcommand{\isacharbar}{\emph{$\mid$}}%
\renewcommand{\isacharbraceright}{\emph{$\}$}}%
}
\newcommand{\isabellestylesl}{\isabellestyleit\renewcommand{\isastyle}{\small\slshape}}