author | wenzelm |
Mon, 21 Jun 2004 16:40:30 +0200 | |
changeset 14987 | 699239c7632c |
parent 14981 | e73f8140af78 |
child 16064 | 7953879aa6cf |
permissions | -rw-r--r-- |
7709 | 1 |
%% |
9818 | 2 |
%% Author: Markus Wenzel, TU Muenchen |
7709 | 3 |
%% |
4 |
%% macros for Isabelle generated LaTeX output |
|
5 |
%% |
|
6 |
||
9913 | 7 |
%%% Simple document preparation (based on theory token language and symbols) |
7709 | 8 |
|
8714 | 9 |
% isabelle environments |
7788 | 10 |
|
9913 | 11 |
\newcommand{\isabellecontext}{UNKNOWN} |
12 |
||
9657 | 13 |
\newcommand{\isastyle}{\small\tt\slshape} |
9669 | 14 |
\newcommand{\isastyleminor}{\small\tt\slshape} |
10220 | 15 |
\newcommand{\isastylescript}{\footnotesize\tt\slshape} |
9657 | 16 |
\newcommand{\isastyletext}{\normalsize\rm} |
17 |
\newcommand{\isastyletxt}{\rm} |
|
18 |
\newcommand{\isastylecmt}{\rm} |
|
8713 | 19 |
|
10220 | 20 |
%symbol markup -- \emph achieves decent spacing via italic corrections |
21 |
\newcommand{\isamath}[1]{\emph{$#1$}} |
|
22 |
\newcommand{\isatext}[1]{\emph{#1}} |
|
23 |
\newcommand{\isascriptstyle}{\def\isamath##1{##1}\def\isatext##1{\mbox{\isastylescript##1}}} |
|
10260 | 24 |
\newcommand{\isactrlsub}[1]{\emph{\isascriptstyle${}\sb{#1}$}} |
25 |
\newcommand{\isactrlsup}[1]{\emph{\isascriptstyle${}\sp{#1}$}} |
|
14234
9590df3c5f2a
use \<^isub> and \<^isup> in identifiers instead of just \<^sub> (avoid
kleing
parents:
13933
diff
changeset
|
26 |
\newcommand{\isactrlisub}[1]{\emph{\isascriptstyle${}\sb{#1}$}} |
9590df3c5f2a
use \<^isub> and \<^isup> in identifiers instead of just \<^sub> (avoid
kleing
parents:
13933
diff
changeset
|
27 |
\newcommand{\isactrlisup}[1]{\emph{\isascriptstyle${}\sp{#1}$}} |
14708 | 28 |
\newcommand{\isactrlbsub}{\emph\bgroup\begin{math}{}\sb\bgroup\mbox\bgroup\isastylescript} |
29 |
\newcommand{\isactrlesub}{\egroup\egroup\end{math}\egroup} |
|
30 |
\newcommand{\isactrlbsup}{\emph\bgroup\begin{math}{}\sp\bgroup\mbox\bgroup\isastylescript} |
|
31 |
\newcommand{\isactrlesup}{\egroup\egroup\end{math}\egroup} |
|
11573 | 32 |
\newcommand{\isactrlbold}[1]{{\bfseries\upshape\boldmath#1}} |
10220 | 33 |
|
14332
fd3535af90ab
spanning super and sub scripts \<^bsub> .. \<^esub> and \<^bsup> .. \<^esup>
kleing
parents:
14234
diff
changeset
|
34 |
|
8713 | 35 |
\newdimen\isa@parindent\newdimen\isa@parskip |
9657 | 36 |
|
9702
f23bee3c0682
\newenvironment{isabellebody}: version without trivlist;
wenzelm
parents:
9688
diff
changeset
|
37 |
\newenvironment{isabellebody}{% |
11863
87643169ae7d
\newif\ifisamarkup controls spacing of isabeginpar;
wenzelm
parents:
11573
diff
changeset
|
38 |
\isamarkuptrue\par% |
9702
f23bee3c0682
\newenvironment{isabellebody}: version without trivlist;
wenzelm
parents:
9688
diff
changeset
|
39 |
\isa@parindent\parindent\parindent0pt% |
8713 | 40 |
\isa@parskip\parskip\parskip0pt% |
10470 | 41 |
\isastyle}{\par} |
9702
f23bee3c0682
\newenvironment{isabellebody}: version without trivlist;
wenzelm
parents:
9688
diff
changeset
|
42 |
|
f23bee3c0682
\newenvironment{isabellebody}: version without trivlist;
wenzelm
parents:
9688
diff
changeset
|
43 |
\newenvironment{isabelle} |
10422 | 44 |
{\begin{trivlist}\begin{isabellebody}\item\relax} |
45 |
{\end{isabellebody}\end{trivlist}} |
|
8713 | 46 |
|
9669 | 47 |
\newcommand{\isa}[1]{\emph{\isastyleminor #1}} |
8714 | 48 |
|
10949 | 49 |
\newcommand{\isaindent}[1]{\hphantom{#1}} |
13933 | 50 |
\newcommand{\isanewline}{\mbox{}\par\mbox{}} |
14347 | 51 |
\newcommand{\isasep}{} % override with e.g. \renewcommand{\isasep}{\vspace{1ex}} |
9669 | 52 |
\newcommand{\isadigit}[1]{#1} |
7752 | 53 |
|
9669 | 54 |
\chardef\isacharbang=`\! |
55 |
\chardef\isachardoublequote=`\" |
|
9657 | 56 |
\chardef\isacharhash=`\# |
57 |
\chardef\isachardollar=`\$ |
|
58 |
\chardef\isacharpercent=`\% |
|
59 |
\chardef\isacharampersand=`\& |
|
60 |
\chardef\isacharprime=`\' |
|
61 |
\chardef\isacharparenleft=`\( |
|
62 |
\chardef\isacharparenright=`\) |
|
63 |
\chardef\isacharasterisk=`\* |
|
9669 | 64 |
\chardef\isacharplus=`\+ |
65 |
\chardef\isacharcomma=`\, |
|
9657 | 66 |
\chardef\isacharminus=`\- |
9669 | 67 |
\chardef\isachardot=`\. |
68 |
\chardef\isacharslash=`\/ |
|
69 |
\chardef\isacharcolon=`\: |
|
70 |
\chardef\isacharsemicolon=`\; |
|
9657 | 71 |
\chardef\isacharless=`\< |
9669 | 72 |
\chardef\isacharequal=`\= |
9657 | 73 |
\chardef\isachargreater=`\> |
9669 | 74 |
\chardef\isacharquery=`\? |
75 |
\chardef\isacharat=`\@ |
|
9657 | 76 |
\chardef\isacharbrackleft=`\[ |
77 |
\chardef\isacharbackslash=`\\ |
|
78 |
\chardef\isacharbrackright=`\] |
|
79 |
\chardef\isacharcircum=`\^ |
|
80 |
\chardef\isacharunderscore=`\_ |
|
9669 | 81 |
\chardef\isacharbackquote=`\` |
9657 | 82 |
\chardef\isacharbraceleft=`\{ |
83 |
\chardef\isacharbar=`\| |
|
84 |
\chardef\isacharbraceright=`\} |
|
85 |
\chardef\isachartilde=`\~ |
|
7788 | 86 |
|
7797 | 87 |
|
88 |
% keyword and section markup |
|
7788 | 89 |
|
9710 | 90 |
\newcommand{\isakeywordcharunderscore}{\_} |
9669 | 91 |
\newcommand{\isakeyword}[1] |
9710 | 92 |
{\emph{\bf\def\isachardot{.}\def\isacharunderscore{\isakeywordcharunderscore}% |
9669 | 93 |
\def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}} |
94 |
\newcommand{\isacommand}[1]{\isakeyword{#1}} |
|
7758 | 95 |
|
8501 | 96 |
\newcommand{\isamarkupheader}[1]{\section{#1}} |
7752 | 97 |
\newcommand{\isamarkupchapter}[1]{\chapter{#1}} |
98 |
\newcommand{\isamarkupsection}[1]{\section{#1}} |
|
99 |
\newcommand{\isamarkupsubsection}[1]{\subsection{#1}} |
|
100 |
\newcommand{\isamarkupsubsubsection}[1]{\subsubsection{#1}} |
|
101 |
\newcommand{\isamarkupsect}[1]{\section{#1}} |
|
102 |
\newcommand{\isamarkupsubsect}[1]{\subsection{#1}} |
|
103 |
\newcommand{\isamarkupsubsubsect}[1]{\subsubsection{#1}} |
|
8662
f9679ddbc492
isapar, isamarkuptext, isamarkuptxt turned into environments;
wenzelm
parents:
8512
diff
changeset
|
104 |
|
11863
87643169ae7d
\newif\ifisamarkup controls spacing of isabeginpar;
wenzelm
parents:
11573
diff
changeset
|
105 |
\newif\ifisamarkup |
87643169ae7d
\newif\ifisamarkup controls spacing of isabeginpar;
wenzelm
parents:
11573
diff
changeset
|
106 |
\newcommand{\isabeginpar}{\par\ifisamarkup\relax\else\medskip\fi} |
10586 | 107 |
\newcommand{\isaendpar}{\par\medskip} |
108 |
\newenvironment{isapar}{\parindent\isa@parindent\parskip\isa@parskip\isabeginpar}{\isaendpar} |
|
9657 | 109 |
\newenvironment{isamarkuptext}{\isastyletext\begin{isapar}}{\end{isapar}} |
110 |
\newenvironment{isamarkuptxt}{\isastyletxt\begin{isapar}}{\end{isapar}} |
|
111 |
\newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}} |
|
112 |
||
113 |
||
10024 | 114 |
% alternative styles |
9657 | 115 |
|
116 |
\newcommand{\isabellestyle}{} |
|
9669 | 117 |
\def\isabellestyle#1{\csname isabellestyle#1\endcsname} |
9657 | 118 |
|
10024 | 119 |
\newcommand{\isabellestylett}{% |
120 |
\renewcommand{\isastyle}{\small\tt}% |
|
10188 | 121 |
\renewcommand{\isastyleminor}{\small\tt}% |
10220 | 122 |
\renewcommand{\isastylescript}{\footnotesize\tt}% |
10024 | 123 |
} |
9669 | 124 |
\newcommand{\isabellestyleit}{% |
125 |
\renewcommand{\isastyle}{\small\it}% |
|
126 |
\renewcommand{\isastyleminor}{\it}% |
|
10220 | 127 |
\renewcommand{\isastylescript}{\footnotesize\it}% |
9725 | 128 |
\renewcommand{\isakeywordcharunderscore}{\mbox{-}}% |
10220 | 129 |
\renewcommand{\isacharbang}{\isamath{!}}% |
9669 | 130 |
\renewcommand{\isachardoublequote}{}% |
10220 | 131 |
\renewcommand{\isacharhash}{\isamath{\#}}% |
132 |
\renewcommand{\isachardollar}{\isamath{\$}}% |
|
133 |
\renewcommand{\isacharpercent}{\isamath{\%}}% |
|
134 |
\renewcommand{\isacharampersand}{\isamath{\&}}% |
|
135 |
\renewcommand{\isacharprime}{\isamath{\mskip2mu{'}\mskip-2mu}}% |
|
136 |
\renewcommand{\isacharparenleft}{\isamath{(}}% |
|
137 |
\renewcommand{\isacharparenright}{\isamath{)}}% |
|
138 |
\renewcommand{\isacharasterisk}{\isamath{*}}% |
|
139 |
\renewcommand{\isacharplus}{\isamath{+}}% |
|
140 |
\renewcommand{\isacharcomma}{\isamath{\mathord,}}% |
|
141 |
\renewcommand{\isacharminus}{\isamath{-}}% |
|
142 |
\renewcommand{\isachardot}{\isamath{\mathord.}}% |
|
143 |
\renewcommand{\isacharslash}{\isamath{/}}% |
|
144 |
\renewcommand{\isacharcolon}{\isamath{\mathord:}}% |
|
145 |
\renewcommand{\isacharsemicolon}{\isamath{\mathord;}}% |
|
146 |
\renewcommand{\isacharless}{\isamath{<}}% |
|
147 |
\renewcommand{\isacharequal}{\isamath{=}}% |
|
148 |
\renewcommand{\isachargreater}{\isamath{>}}% |
|
149 |
\renewcommand{\isacharat}{\isamath{@}}% |
|
150 |
\renewcommand{\isacharbrackleft}{\isamath{[}}% |
|
151 |
\renewcommand{\isacharbrackright}{\isamath{]}}% |
|
9725 | 152 |
\renewcommand{\isacharunderscore}{\mbox{-}}% |
10220 | 153 |
\renewcommand{\isacharbraceleft}{\isamath{\{}}% |
154 |
\renewcommand{\isacharbar}{\isamath{\mid}}% |
|
155 |
\renewcommand{\isacharbraceright}{\isamath{\}}}% |
|
10260 | 156 |
\renewcommand{\isachartilde}{\isamath{{}\sp{\sim}}}% |
9657 | 157 |
} |
158 |
||
9975 | 159 |
\newcommand{\isabellestylesl}{% |
160 |
\isabellestyleit% |
|
161 |
\renewcommand{\isastyle}{\small\sl}% |
|
162 |
\renewcommand{\isastyleminor}{\sl}% |
|
10220 | 163 |
\renewcommand{\isastylescript}{\footnotesize\sl}% |
9975 | 164 |
} |