
jan@42252: %%
jan@42252: %% macros for Isabelle generated LaTeX output
jan@42252: %%
jan@42252: 
jan@42252: %%% Simple document preparation (based on theory token language and symbols)
jan@42252: 
jan@42252: % isabelle environments
jan@42252: 
jan@42252: \newcommand{\isabellecontext}{UNKNOWN}
jan@42252: 
jan@42252: \newcommand{\isastyle}{\UNDEF}
jan@42252: \newcommand{\isastyleminor}{\UNDEF}
jan@42252: \newcommand{\isastylescript}{\UNDEF}
jan@42252: \newcommand{\isastyletext}{\normalsize\rm}
jan@42252: \newcommand{\isastyletxt}{\rm}
jan@42252: \newcommand{\isastylecmt}{\rm}
jan@42252: 
jan@42252: %symbol markup -- \emph achieves decent spacing via italic corrections
jan@42252: \newcommand{\isamath}[1]{\emph{$#1$}}
jan@42252: \newcommand{\isatext}[1]{\emph{#1}}
jan@42252: \DeclareRobustCommand{\isascriptstyle}{\def\isamath##1{##1}\def\isatext##1{\mbox{\isastylescript##1}}}
jan@42252: \newcommand{\isactrlsub}[1]{\emph{\isascriptstyle${}\sb{#1}$}}
jan@42252: \newcommand{\isactrlsup}[1]{\emph{\isascriptstyle${}\sp{#1}$}}
jan@42252: \newcommand{\isactrlisub}[1]{\emph{\isascriptstyle${}\sb{#1}$}}
jan@42252: \newcommand{\isactrlisup}[1]{\emph{\isascriptstyle${}\sp{#1}$}}
jan@42252: \DeclareRobustCommand{\isactrlbsub}{\emph\bgroup\math{}\sb\bgroup\mbox\bgroup\isastylescript}
jan@42252: \DeclareRobustCommand{\isactrlesub}{\egroup\egroup\endmath\egroup}
jan@42252: \DeclareRobustCommand{\isactrlbsup}{\emph\bgroup\math{}\sp\bgroup\mbox\bgroup\isastylescript}
jan@42252: \DeclareRobustCommand{\isactrlesup}{\egroup\egroup\endmath\egroup}
jan@42252: \newcommand{\isactrlbold}[1]{{\bfseries\upshape\boldmath#1}}
jan@42252: \newcommand{\isactrlloc}[1]{{\bfseries\upshape\boldmath#1}}
jan@42252: 
jan@42252: \newenvironment{isaantiq}{{\isacharat\isacharbraceleft}}{{\isacharbraceright}}
jan@42252: \newcommand{\isaantiqopen}{\isakeyword{\isacharbraceleft}}
jan@42252: \newcommand{\isaantiqclose}{\isakeyword{\isacharbraceright}}
jan@42252: 
jan@42252: \newdimen\isa@parindent\newdimen\isa@parskip
jan@42252: 
jan@42252: \newenvironment{isabellebody}{%
jan@42252: \isamarkuptrue\par%
jan@42252: \isa@parindent\parindent\parindent0pt%
jan@42252: \isa@parskip\parskip\parskip0pt%
jan@42252: \isastyle}{\par}
jan@42252: 
jan@42252: \newenvironment{isabelle}
jan@42252: {\begin{trivlist}\begin{isabellebody}\item\relax}
jan@42252: {\end{isabellebody}\end{trivlist}}
jan@42252: 
jan@42252: \newcommand{\isa}[1]{\emph{\isastyleminor #1}}
jan@42252: 
jan@42252: \newcommand{\isaindent}[1]{\hphantom{#1}}
jan@42252: \newcommand{\isanewline}{\mbox{}\par\mbox{}}
jan@42252: \newcommand{\isasep}{}
jan@42252: \newcommand{\isadigit}[1]{#1}
jan@42252: 
jan@42252: \newcommand{\isachardefaults}{%
jan@42252: \chardef\isacharbang=`\!%
jan@42252: \chardef\isachardoublequote=`\"%
jan@42252: \chardef\isachardoublequoteopen=`\"%
jan@42252: \chardef\isachardoublequoteclose=`\"%
jan@42252: \chardef\isacharhash=`\#%
jan@42252: \chardef\isachardollar=`\$%
jan@42252: \chardef\isacharpercent=`\%%
jan@42252: \chardef\isacharampersand=`\&%
jan@42252: \chardef\isacharprime=`\'%
jan@42252: \chardef\isacharparenleft=`\(%
jan@42252: \chardef\isacharparenright=`\)%
jan@42252: \chardef\isacharasterisk=`\*%
jan@42252: \chardef\isacharplus=`\+%
jan@42252: \chardef\isacharcomma=`\,%
jan@42252: \chardef\isacharminus=`\-%
jan@42252: \chardef\isachardot=`\.%
jan@42252: \chardef\isacharslash=`\/%
jan@42252: \chardef\isacharcolon=`\:%
jan@42252: \chardef\isacharsemicolon=`\;%
jan@42252: \chardef\isacharless=`\<%
jan@42252: \chardef\isacharequal=`\=%
jan@42252: \chardef\isachargreater=`\>%
jan@42252: \chardef\isacharquery=`\?%
jan@42252: \chardef\isacharat=`\@%
jan@42252: \chardef\isacharbrackleft=`\[%
jan@42252: \chardef\isacharbackslash=`\\%
jan@42252: \chardef\isacharbrackright=`\]%
jan@42252: \chardef\isacharcircum=`\^%
jan@42252: \chardef\isacharunderscore=`\_%
jan@42252: \def\isacharunderscorekeyword{\_}%
jan@42252: \chardef\isacharbackquote=`\`%
jan@42252: \chardef\isacharbackquoteopen=`\`%
jan@42252: \chardef\isacharbackquoteclose=`\`%
jan@42252: \chardef\isacharbraceleft=`\{%
jan@42252: \chardef\isacharbar=`\|%
jan@42252: \chardef\isacharbraceright=`\}%
jan@42252: \chardef\isachartilde=`\~%
jan@42252: \def\isacharverbatimopen{\isacharbraceleft\isacharasterisk}%
jan@42252: \def\isacharverbatimclose{\isacharasterisk\isacharbraceright}%
jan@42252: }
jan@42252: 
jan@42252: \newcommand{\isaliteral}[2]{#2}
jan@42252: \newcommand{\isanil}{}
jan@42252: 
jan@42252: 
jan@42252: % keyword and section markup
jan@42252: 
jan@42252: \newcommand{\isakeyword}[1]
jan@42252: {\emph{\bf\def\isachardot{.}\def\isacharunderscore{\isacharunderscorekeyword}%
jan@42252: \def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}}
jan@42252: \newcommand{\isacommand}[1]{\isakeyword{#1}}
jan@42252: 
jan@42252: \newcommand{\isamarkupheader}[1]{\section{#1}}
jan@42252: \newcommand{\isamarkupchapter}[1]{\chapter{#1}}
jan@42252: \newcommand{\isamarkupsection}[1]{\section{#1}}
jan@42252: \newcommand{\isamarkupsubsection}[1]{\subsection{#1}}
jan@42252: \newcommand{\isamarkupsubsubsection}[1]{\subsubsection{#1}}
jan@42252: \newcommand{\isamarkupsect}[1]{\section{#1}}
jan@42252: \newcommand{\isamarkupsubsect}[1]{\subsection{#1}}
jan@42252: \newcommand{\isamarkupsubsubsect}[1]{\subsubsection{#1}}
jan@42252: 
jan@42252: \newif\ifisamarkup
jan@42252: \newcommand{\isabeginpar}{\par\ifisamarkup\relax\else\medskip\fi}
jan@42252: \newcommand{\isaendpar}{\par\medskip}
jan@42252: \newenvironment{isapar}{\parindent\isa@parindent\parskip\isa@parskip\isabeginpar}{\isaendpar}
jan@42252: \newenvironment{isamarkuptext}{\par\isastyletext\begin{isapar}}{\end{isapar}}
jan@42252: \newenvironment{isamarkuptxt}{\par\isastyletxt\begin{isapar}}{\end{isapar}}
jan@42252: \newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}}
jan@42252: 
jan@42252: 
jan@42252: % styles
jan@42252: 
jan@42252: \def\isabellestyle#1{\csname isabellestyle#1\endcsname}
jan@42252: 
jan@42252: \newcommand{\isabellestyledefault}{%
jan@42252: \renewcommand{\isastyle}{\small\tt\slshape}%
jan@42252: \renewcommand{\isastyleminor}{\small\tt\slshape}%
jan@42252: \renewcommand{\isastylescript}{\footnotesize\tt\slshape}%
jan@42252: \isachardefaults%
jan@42252: }
jan@42252: \isabellestyledefault
jan@42252: 
jan@42252: \newcommand{\isabellestylett}{%
jan@42252: \renewcommand{\isastyle}{\small\tt}%
jan@42252: \renewcommand{\isastyleminor}{\small\tt}%
jan@42252: \renewcommand{\isastylescript}{\footnotesize\tt}%
jan@42252: \isachardefaults%
jan@42252: }
jan@42252: 
jan@42252: \newcommand{\isabellestyleit}{%
jan@42252: \renewcommand{\isastyle}{\small\it}%
jan@42252: \renewcommand{\isastyleminor}{\it}%
jan@42252: \renewcommand{\isastylescript}{\footnotesize\it}%
jan@42252: \renewcommand{\isacharunderscorekeyword}{\mbox{-}}%
jan@42252: \renewcommand{\isacharbang}{\isamath{!}}%
jan@42252: \renewcommand{\isachardoublequote}{\isanil}%
jan@42252: \renewcommand{\isachardoublequoteopen}{\isanil}%
jan@42252: \renewcommand{\isachardoublequoteclose}{\isanil}%
jan@42252: \renewcommand{\isacharhash}{\isamath{\#}}%
jan@42252: \renewcommand{\isachardollar}{\isamath{\$}}%
jan@42252: \renewcommand{\isacharpercent}{\isamath{\%}}%
jan@42252: \renewcommand{\isacharampersand}{\isamath{\&}}%
jan@42252: \renewcommand{\isacharprime}{\isamath{\mskip2mu{'}\mskip-2mu}}%
jan@42252: \renewcommand{\isacharparenleft}{\isamath{(}}%
jan@42252: \renewcommand{\isacharparenright}{\isamath{)}}%
jan@42252: \renewcommand{\isacharasterisk}{\isamath{*}}%
jan@42252: \renewcommand{\isacharplus}{\isamath{+}}%
jan@42252: \renewcommand{\isacharcomma}{\isamath{\mathord,}}%
jan@42252: \renewcommand{\isacharminus}{\isamath{-}}%
jan@42252: \renewcommand{\isachardot}{\isamath{\mathord.}}%
jan@42252: \renewcommand{\isacharslash}{\isamath{/}}%
jan@42252: \renewcommand{\isacharcolon}{\isamath{\mathord:}}%
jan@42252: \renewcommand{\isacharsemicolon}{\isamath{\mathord;}}%
jan@42252: \renewcommand{\isacharless}{\isamath{<}}%
jan@42252: \renewcommand{\isacharequal}{\isamath{=}}%
jan@42252: \renewcommand{\isachargreater}{\isamath{>}}%
jan@42252: \renewcommand{\isacharat}{\isamath{@}}%
jan@42252: \renewcommand{\isacharbrackleft}{\isamath{[}}%
jan@42252: \renewcommand{\isacharbackslash}{\isamath{\backslash}}%
jan@42252: \renewcommand{\isacharbrackright}{\isamath{]}}%
jan@42252: \renewcommand{\isacharunderscore}{\mbox{-}}%
jan@42252: \renewcommand{\isacharbraceleft}{\isamath{\{}}%
jan@42252: \renewcommand{\isacharbar}{\isamath{\mid}}%
jan@42252: \renewcommand{\isacharbraceright}{\isamath{\}}}%
jan@42252: \renewcommand{\isachartilde}{\isamath{{}\sp{\sim}}}%
jan@42252: \renewcommand{\isacharbackquoteopen}{\isatext{\raise.3ex\hbox{$\scriptscriptstyle\langle$}}}%
jan@42252: \renewcommand{\isacharbackquoteclose}{\isatext{\raise.3ex\hbox{$\scriptscriptstyle\rangle$}}}%
jan@42252: \renewcommand{\isacharverbatimopen}{\isamath{\langle\!\langle}}%
jan@42252: \renewcommand{\isacharverbatimclose}{\isamath{\rangle\!\rangle}}%
jan@42252: }
jan@42252: 
jan@42252: \newcommand{\isabellestylesl}{%
jan@42252: \isabellestyleit%
jan@42252: \renewcommand{\isastyle}{\small\sl}%
jan@42252: \renewcommand{\isastyleminor}{\sl}%
jan@42252: \renewcommand{\isastylescript}{\footnotesize\sl}%
jan@42252: }
jan@42252: 
jan@42252: 
jan@42252: % tagged regions
jan@42252: 
jan@42252: %plain TeX version of comment package -- much faster!
jan@42252: \let\isafmtname\fmtname\def\fmtname{plain}
jan@42252: \usepackage{comment}
jan@42252: \let\fmtname\isafmtname
jan@42252: 
jan@42252: \newcommand{\isafold}[1]{\emph{$\langle\mathord{\mathit{#1}}\rangle$}}
jan@42252: 
jan@42252: \newcommand{\isakeeptag}[1]%
jan@42252: {\includecomment{isadelim#1}\includecomment{isatag#1}\csarg\def{isafold#1}{}}
jan@42252: \newcommand{\isadroptag}[1]%
jan@42252: {\excludecomment{isadelim#1}\excludecomment{isatag#1}\csarg\def{isafold#1}{}}
jan@42252: \newcommand{\isafoldtag}[1]%
jan@42252: {\includecomment{isadelim#1}\excludecomment{isatag#1}\csarg\def{isafold#1}{\isafold{#1}}}
jan@42252: 
jan@42252: \isakeeptag{theory}
jan@42252: \isakeeptag{proof}
jan@42252: \isakeeptag{ML}
jan@42252: \isakeeptag{visible}
jan@42252: \isadroptag{invisible}
jan@42252: 
jan@42252: \IfFileExists{isabelletags.sty}{\usepackage{isabelletags}}{}




