author | paulson |
Mon, 12 Jan 2004 16:51:45 +0100 | |
changeset 14353 | 79f9fbef9106 |
parent 14342 | 6e564092d72d |
child 14732 | 967db86e853c |
permissions | -rw-r--r-- |
8751 | 1 |
%% |
9845 | 2 |
%% Author: Markus Wenzel, TU Muenchen |
3 |
%% License: GPL (GNU GENERAL PUBLIC LICENSE) |
|
8751 | 4 |
%% |
5 |
%% macros for Isabelle generated LaTeX output |
|
6 |
%% |
|
7 |
||
9924 | 8 |
%%% Simple document preparation (based on theory token language and symbols) |
8751 | 9 |
|
10 |
% isabelle environments |
|
11 |
||
9924 | 12 |
\newcommand{\isabellecontext}{UNKNOWN} |
13 |
||
9673 | 14 |
\newcommand{\isastyle}{\small\tt\slshape} |
15 |
\newcommand{\isastyleminor}{\small\tt\slshape} |
|
10226 | 16 |
\newcommand{\isastylescript}{\footnotesize\tt\slshape} |
9673 | 17 |
\newcommand{\isastyletext}{\normalsize\rm} |
18 |
\newcommand{\isastyletxt}{\rm} |
|
19 |
\newcommand{\isastylecmt}{\rm} |
|
8751 | 20 |
|
10226 | 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}}} |
|
10267 | 25 |
\newcommand{\isactrlsub}[1]{\emph{\isascriptstyle${}\sb{#1}$}} |
26 |
\newcommand{\isactrlsup}[1]{\emph{\isascriptstyle${}\sp{#1}$}} |
|
14245 | 27 |
\newcommand{\isactrlisub}[1]{\emph{\isascriptstyle${}\sb{#1}$}} |
28 |
\newcommand{\isactrlisup}[1]{\emph{\isascriptstyle${}\sp{#1}$}} |
|
11610 | 29 |
\newcommand{\isactrlbold}[1]{{\bfseries\upshape\boldmath#1}} |
10226 | 30 |
|
14342 | 31 |
% somewhat hackish: spanning sub/super scripts (\<^bsub>..\<^esub>) |
32 |
\newcommand{\isactrlbsub}{% |
|
33 |
\def\isatext##1{\isastylescript##1}\begin{math}_\bgroup} |
|
34 |
\newcommand{\isactrlesub}{\egroup\end{math}} |
|
35 |
\newcommand{\isactrlbsup}{% |
|
36 |
\def\isatext##1{\isastylescript##1}\begin{math}^\bgroup} |
|
37 |
\newcommand{\isactrlesup}{\egroup\end{math}} |
|
38 |
||
8751 | 39 |
\newdimen\isa@parindent\newdimen\isa@parskip |
9673 | 40 |
|
9717 | 41 |
\newenvironment{isabellebody}{% |
11866 | 42 |
\isamarkuptrue\par% |
9717 | 43 |
\isa@parindent\parindent\parindent0pt% |
8751 | 44 |
\isa@parskip\parskip\parskip0pt% |
10471 | 45 |
\isastyle}{\par} |
9717 | 46 |
|
47 |
\newenvironment{isabelle} |
|
10424 | 48 |
{\begin{trivlist}\begin{isabellebody}\item\relax} |
49 |
{\end{isabellebody}\end{trivlist}} |
|
8751 | 50 |
|
9673 | 51 |
\newcommand{\isa}[1]{\emph{\isastyleminor #1}} |
8771 | 52 |
|
10950 | 53 |
\newcommand{\isaindent}[1]{\hphantom{#1}} |
13963 | 54 |
\newcommand{\isanewline}{\mbox{}\par\mbox{}} |
14353
79f9fbef9106
Added lemmas to Ring_and_Field with slightly modified simplification rules
paulson
parents:
14342
diff
changeset
|
55 |
\newcommand{\isasep}{} % override with e.g. \renewcommand{\isasep}{\vspace{1ex}} |
9673 | 56 |
\newcommand{\isadigit}[1]{#1} |
8751 | 57 |
|
9673 | 58 |
\chardef\isacharbang=`\! |
59 |
\chardef\isachardoublequote=`\" |
|
60 |
\chardef\isacharhash=`\# |
|
61 |
\chardef\isachardollar=`\$ |
|
62 |
\chardef\isacharpercent=`\% |
|
63 |
\chardef\isacharampersand=`\& |
|
64 |
\chardef\isacharprime=`\' |
|
65 |
\chardef\isacharparenleft=`\( |
|
66 |
\chardef\isacharparenright=`\) |
|
67 |
\chardef\isacharasterisk=`\* |
|
68 |
\chardef\isacharplus=`\+ |
|
69 |
\chardef\isacharcomma=`\, |
|
70 |
\chardef\isacharminus=`\- |
|
71 |
\chardef\isachardot=`\. |
|
72 |
\chardef\isacharslash=`\/ |
|
73 |
\chardef\isacharcolon=`\: |
|
74 |
\chardef\isacharsemicolon=`\; |
|
75 |
\chardef\isacharless=`\< |
|
76 |
\chardef\isacharequal=`\= |
|
77 |
\chardef\isachargreater=`\> |
|
78 |
\chardef\isacharquery=`\? |
|
79 |
\chardef\isacharat=`\@ |
|
80 |
\chardef\isacharbrackleft=`\[ |
|
81 |
\chardef\isacharbackslash=`\\ |
|
82 |
\chardef\isacharbrackright=`\] |
|
83 |
\chardef\isacharcircum=`\^ |
|
84 |
\chardef\isacharunderscore=`\_ |
|
85 |
\chardef\isacharbackquote=`\` |
|
86 |
\chardef\isacharbraceleft=`\{ |
|
87 |
\chardef\isacharbar=`\| |
|
88 |
\chardef\isacharbraceright=`\} |
|
89 |
\chardef\isachartilde=`\~ |
|
8751 | 90 |
|
91 |
||
92 |
% keyword and section markup |
|
93 |
||
9717 | 94 |
\newcommand{\isakeywordcharunderscore}{\_} |
9673 | 95 |
\newcommand{\isakeyword}[1] |
9717 | 96 |
{\emph{\bf\def\isachardot{.}\def\isacharunderscore{\isakeywordcharunderscore}% |
9673 | 97 |
\def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}} |
98 |
\newcommand{\isacommand}[1]{\isakeyword{#1}} |
|
8751 | 99 |
|
100 |
\newcommand{\isamarkupheader}[1]{\section{#1}} |
|
101 |
\newcommand{\isamarkupchapter}[1]{\chapter{#1}} |
|
102 |
\newcommand{\isamarkupsection}[1]{\section{#1}} |
|
103 |
\newcommand{\isamarkupsubsection}[1]{\subsection{#1}} |
|
104 |
\newcommand{\isamarkupsubsubsection}[1]{\subsubsection{#1}} |
|
105 |
\newcommand{\isamarkupsect}[1]{\section{#1}} |
|
106 |
\newcommand{\isamarkupsubsect}[1]{\subsection{#1}} |
|
107 |
\newcommand{\isamarkupsubsubsect}[1]{\subsubsection{#1}} |
|
108 |
||
11866 | 109 |
\newif\ifisamarkup |
110 |
\newcommand{\isabeginpar}{\par\ifisamarkup\relax\else\medskip\fi} |
|
10589 | 111 |
\newcommand{\isaendpar}{\par\medskip} |
112 |
\newenvironment{isapar}{\parindent\isa@parindent\parskip\isa@parskip\isabeginpar}{\isaendpar} |
|
9673 | 113 |
\newenvironment{isamarkuptext}{\isastyletext\begin{isapar}}{\end{isapar}} |
114 |
\newenvironment{isamarkuptxt}{\isastyletxt\begin{isapar}}{\end{isapar}} |
|
115 |
\newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}} |
|
116 |
||
117 |
||
10037 | 118 |
% alternative styles |
9673 | 119 |
|
120 |
\newcommand{\isabellestyle}{} |
|
121 |
\def\isabellestyle#1{\csname isabellestyle#1\endcsname} |
|
122 |
||
10037 | 123 |
\newcommand{\isabellestylett}{% |
124 |
\renewcommand{\isastyle}{\small\tt}% |
|
10211 | 125 |
\renewcommand{\isastyleminor}{\small\tt}% |
10226 | 126 |
\renewcommand{\isastylescript}{\footnotesize\tt}% |
10037 | 127 |
} |
9673 | 128 |
\newcommand{\isabellestyleit}{% |
129 |
\renewcommand{\isastyle}{\small\it}% |
|
130 |
\renewcommand{\isastyleminor}{\it}% |
|
10226 | 131 |
\renewcommand{\isastylescript}{\footnotesize\it}% |
9812 | 132 |
\renewcommand{\isakeywordcharunderscore}{\mbox{-}}% |
10226 | 133 |
\renewcommand{\isacharbang}{\isamath{!}}% |
9673 | 134 |
\renewcommand{\isachardoublequote}{}% |
10226 | 135 |
\renewcommand{\isacharhash}{\isamath{\#}}% |
136 |
\renewcommand{\isachardollar}{\isamath{\$}}% |
|
137 |
\renewcommand{\isacharpercent}{\isamath{\%}}% |
|
138 |
\renewcommand{\isacharampersand}{\isamath{\&}}% |
|
139 |
\renewcommand{\isacharprime}{\isamath{\mskip2mu{'}\mskip-2mu}}% |
|
140 |
\renewcommand{\isacharparenleft}{\isamath{(}}% |
|
141 |
\renewcommand{\isacharparenright}{\isamath{)}}% |
|
142 |
\renewcommand{\isacharasterisk}{\isamath{*}}% |
|
143 |
\renewcommand{\isacharplus}{\isamath{+}}% |
|
144 |
\renewcommand{\isacharcomma}{\isamath{\mathord,}}% |
|
145 |
\renewcommand{\isacharminus}{\isamath{-}}% |
|
146 |
\renewcommand{\isachardot}{\isamath{\mathord.}}% |
|
147 |
\renewcommand{\isacharslash}{\isamath{/}}% |
|
148 |
\renewcommand{\isacharcolon}{\isamath{\mathord:}}% |
|
149 |
\renewcommand{\isacharsemicolon}{\isamath{\mathord;}}% |
|
150 |
\renewcommand{\isacharless}{\isamath{<}}% |
|
151 |
\renewcommand{\isacharequal}{\isamath{=}}% |
|
152 |
\renewcommand{\isachargreater}{\isamath{>}}% |
|
153 |
\renewcommand{\isacharat}{\isamath{@}}% |
|
154 |
\renewcommand{\isacharbrackleft}{\isamath{[}}% |
|
155 |
\renewcommand{\isacharbrackright}{\isamath{]}}% |
|
9812 | 156 |
\renewcommand{\isacharunderscore}{\mbox{-}}% |
10226 | 157 |
\renewcommand{\isacharbraceleft}{\isamath{\{}}% |
158 |
\renewcommand{\isacharbar}{\isamath{\mid}}% |
|
159 |
\renewcommand{\isacharbraceright}{\isamath{\}}}% |
|
10267 | 160 |
\renewcommand{\isachartilde}{\isamath{{}\sp{\sim}}}% |
9673 | 161 |
} |
162 |
||
9992 | 163 |
\newcommand{\isabellestylesl}{% |
164 |
\isabellestyleit% |
|
165 |
\renewcommand{\isastyle}{\small\sl}% |
|
166 |
\renewcommand{\isastyleminor}{\sl}% |
|
10226 | 167 |
\renewcommand{\isastylescript}{\footnotesize\sl}% |
9992 | 168 |
} |