2
|
1 |
\documentclass[11pt,a4paper]{report}
|
62
|
2 |
\usepackage[latin1]{inputenc}
|
0
|
3 |
\usepackage{amsmath,amsthm}
|
2
|
4 |
\usepackage{isabelle}
|
|
5 |
\usepackage{isabellesym}
|
|
6 |
\usepackage{charter}
|
|
7 |
\usepackage[pdftex]{graphicx}
|
21
|
8 |
\usepackage{proof}
|
31
|
9 |
\usepackage{rail}
|
|
10 |
\usepackage{url}
|
38
|
11 |
\usepackage[a4paper,hscale=0.67,vscale=0.76]{geometry}
|
51
|
12 |
\usepackage{lineno}
|
69
|
13 |
\usepackage{xcolor}
|
77
|
14 |
\usepackage{framed}
|
89
|
15 |
\usepackage{mathpartir}
|
47
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
16 |
\usepackage{pdfsetup}
|
0
|
17 |
|
47
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
18 |
\urlstyle{rm}
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
19 |
\renewcommand{\isastyletxt}{\isastyletext}% use same formatting for txt and text
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
20 |
\renewcommand{\isastyleminor}{\tt\slshape}%
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
21 |
\renewcommand{\isastyle}{\small\tt\slshape}%
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
22 |
\isadroptag{theory}
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
23 |
|
71
|
24 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
47
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
25 |
% For cross references to the other manuals:
|
7
d7cebb2c5105
added an explicit file containing references in the Implementation manual (should be replaced by antiquotations)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
26 |
\usepackage{xr}
|
d7cebb2c5105
added an explicit file containing references in the Implementation manual (should be replaced by antiquotations)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
27 |
\externaldocument[I-]{implementation}
|
d7cebb2c5105
added an explicit file containing references in the Implementation manual (should be replaced by antiquotations)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
28 |
\newcommand{\impref}[1]{\ref{I-#1}}
|
13
|
29 |
\newcommand{\ichcite}[1]{[Impl.\,Man., Ch.~\impref{#1}]}
|
|
30 |
\newcommand{\isccite}[1]{[Impl.\,Man., Sec.~\impref{#1}]}
|
44
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
31 |
\externaldocument[R-]{isar-ref}
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
32 |
\newcommand{\isarref}[1]{\ref{R-#1}}
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
33 |
\newcommand{\rchcite}[1]{[Isar Ref.\,Man., Ch.~\isarref{#1}]}
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
34 |
\newcommand{\rsccite}[1]{[Isar Ref.\,Man., Sec.~\isarref{#1}]}
|
0
|
35 |
|
71
|
36 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
5
|
37 |
% sane default for proof documents
|
77
|
38 |
\parindent 0pt
|
|
39 |
\parskip 0.6ex
|
|
40 |
\abovecaptionskip -3mm
|
|
41 |
\belowcaptionskip 10mm
|
71
|
42 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
43 |
\hyphenation{Isabelle}
|
|
44 |
|
|
45 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
47
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
46 |
% to work around a problem with \isanewline
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
47 |
\renewcommand{\isanewline}{{\parindent0pt\parskip0pt\mbox{}\par\mbox{}}}
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
48 |
|
71
|
49 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
47
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
50 |
% for exercises, comments and readmores
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
51 |
\newtheorem{exercise}{Exercise}[section]
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
52 |
\newcommand{\solution}[1]{{\bf Solution for Exercise~\ref{#1}.}}
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
53 |
|
5
|
54 |
\newcommand{\readmoremarginpar}[1]%
|
|
55 |
{\marginpar[\raggedleft\small{#1}]{\raggedright\small{#1}}}
|
|
56 |
|
97
|
57 |
\newenvironment{leftrightbar}{%
|
|
58 |
\def\FrameCommand##1{\vrule width 2pt \hspace{8pt}##1\hspace{8pt}\vrule width 2pt}%
|
|
59 |
\MakeFramed {\advance\hsize-\width \FrameRestore}}%
|
|
60 |
{\endMakeFramed}
|
|
61 |
|
|
62 |
|
5
|
63 |
\newenvironment{readmore}%
|
101
|
64 |
{\begin{leftrightbar}\small\it{\textbf{Read More}}\\}{\end{leftrightbar}}
|
0
|
65 |
|
71
|
66 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
67 |
% this is to draw a gray box around code
|
77
|
68 |
%(FIXME redefine pagebreak so that it includes a \smallskip)
|
|
69 |
\newenvironment{graybox}
|
|
70 |
{\def\FrameCommand{\fboxsep=1pt\colorbox{gray!20}}\MakeFramed{\smallskip\FrameRestore}}
|
|
71 |
{\smallskip\endMakeFramed}
|
31
|
72 |
|
71
|
73 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
47
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
74 |
% this hack is for getting rid of the ML {* ... *}
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
75 |
% scaffolding around function definitions
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
76 |
\newenvironment{vanishML}{%
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
77 |
\renewcommand{\isacommand}[1]{}%
|
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
78 |
\renewcommand{\isacharverbatimopen}{}%
|
69
|
79 |
\renewcommand{\isacharverbatimclose}{}}{}
|
47
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
80 |
|
106
bdd82350cf22
renamed in the pdf all instances of cookbook to tutorial (in order to sound more serious)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
81 |
\isakeeptag{TutorialML}
|
bdd82350cf22
renamed in the pdf all instances of cookbook to tutorial (in order to sound more serious)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
82 |
\renewcommand{\isatagTutorialML}{\begin{vanishML}\begin{graybox}}
|
bdd82350cf22
renamed in the pdf all instances of cookbook to tutorial (in order to sound more serious)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
83 |
\renewcommand{\endisatagTutorialML}{\end{graybox}\end{vanishML}}
|
47
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
84 |
|
71
|
85 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
72
7b8c4fe235aa
added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
86 |
% for code that has line numbers
|
118
|
87 |
\newenvironment{linenos}{\resetlinenumber\internallinenumbers}{\par\nolinenumbers}
|
117
|
88 |
|
114
|
89 |
\isakeeptag{linenos}
|
117
|
90 |
\renewcommand{\isataglinenos}{\begin{linenos}}
|
118
|
91 |
\renewcommand{\endisataglinenos}{\end{linenos}}
|
114
|
92 |
|
|
93 |
% should only be used in ML code
|
|
94 |
\isakeeptag{linenosgray}
|
117
|
95 |
\renewcommand{\isataglinenosgray}{\begin{vanishML}\begin{graybox}\begin{linenos}}
|
118
|
96 |
\renewcommand{\endisataglinenosgray}{\end{linenos}\end{graybox}\end{vanishML}}
|
71
|
97 |
|
115
|
98 |
\isakeeptag{small}
|
|
99 |
\renewcommand{\isatagsmall}{\begingroup\small}
|
|
100 |
\renewcommand{\endisatagsmall}{\endgroup}
|
|
101 |
|
72
7b8c4fe235aa
added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
102 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
7b8c4fe235aa
added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
103 |
\renewenvironment{isabelle}
|
7b8c4fe235aa
added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
104 |
{\begin{trivlist}\begin{isabellebody}\small\item\relax}
|
7b8c4fe235aa
added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
105 |
{\end{isabellebody}\end{trivlist}}
|
85
|
106 |
|
|
107 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
108 |
% for {* *} in antiquotations
|
|
109 |
\newcommand{\isasymverbopen}{\isacharverbatimopen}
|
|
110 |
\newcommand{\isasymverbclose}{\isacharverbatimclose}
|
|
111 |
|
71
|
112 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
108
8bea3f74889d
added to the tactical chapter; polished; added the tabularstar environment (which is just tabular*)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
113 |
% since * cannot be used in text {*...*}
|
8bea3f74889d
added to the tactical chapter; polished; added the tabularstar environment (which is just tabular*)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
114 |
\newenvironment{tabularstar}[2]
|
8bea3f74889d
added to the tactical chapter; polished; added the tabularstar environment (which is just tabular*)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
115 |
{\begin{tabular*}{#1}{#2}}{\end{tabular*}}
|
8bea3f74889d
added to the tactical chapter; polished; added the tabularstar environment (which is just tabular*)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
116 |
|
8bea3f74889d
added to the tactical chapter; polished; added the tabularstar environment (which is just tabular*)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
117 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
116
|
118 |
% short hands
|
|
119 |
\def\simpleinductive{\isacommand{simple\isacharunderscore{}inductive}}
|
|
120 |
|
|
121 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
0
|
122 |
\begin{document}
|
|
123 |
|
2
|
124 |
\title{\mbox{}\\[-10ex]
|
|
125 |
\includegraphics[scale=0.5]{cookbook-logo.jpg}\\[3ex]
|
119
|
126 |
The Isabelle Programming Tutorial (draft)}
|
71
|
127 |
|
119
|
128 |
\author{by Christian Urban with contributions from:\\[2ex]
|
62
|
129 |
\begin{tabular}{r@{\hspace{1.8mm}}l}
|
|
130 |
Stefan & Berghofer\\
|
|
131 |
Sascha & Böhme\\
|
|
132 |
Jeremy & Dawson\\
|
|
133 |
Alexander & Krauss\\
|
2
|
134 |
\end{tabular}}
|
71
|
135 |
|
0
|
136 |
\maketitle
|
|
137 |
\tableofcontents
|
|
138 |
|
|
139 |
% generated text of all theories
|
|
140 |
\input{session}
|
|
141 |
|
2
|
142 |
\newpage
|
|
143 |
\bibliographystyle{abbrv}
|
17
|
144 |
\bibliography{root}
|
0
|
145 |
|
|
146 |
\end{document}
|
|
147 |
|
|
148 |
%%% Local Variables:
|
|
149 |
%%% mode: latex
|
|
150 |
%%% TeX-master: t
|
|
151 |
%%% End:
|