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