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