CookBook/document/root.tex
author Christian Urban <urbanc@in.tum.de>
Wed, 14 Jan 2009 23:44:14 +0000
changeset 72 7b8c4fe235aa
parent 71 14c3dd5ee2ad
child 74 f6f8f8ba1eb1
permissions -rw-r--r--
added an antiquotation option [gray] for gray boxes around displays
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
     1
\documentclass[11pt,a4paper]{report}
62
c3fe4749ef01 added Sacha as contributor
Christian Urban <urbanc@in.tum.de>
parents: 51
diff changeset
     2
\usepackage[latin1]{inputenc}
0
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
\usepackage{amsmath,amsthm}
2
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
     4
\usepackage{isabelle}
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
     5
\usepackage{isabellesym}
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
     6
\usepackage{charter}
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
     7
\usepackage[pdftex]{graphicx}
21
2356e5c70d98 added a proof and tuned the rest
Christian Urban <urbanc@in.tum.de>
parents: 17
diff changeset
     8
\usepackage{proof}
31
53460ac408b5 Added alltt, rail, and url.
berghofe
parents: 21
diff changeset
     9
\usepackage{alltt}
53460ac408b5 Added alltt, rail, and url.
berghofe
parents: 21
diff changeset
    10
\usepackage{rail}
53460ac408b5 Added alltt, rail, and url.
berghofe
parents: 21
diff changeset
    11
\usepackage{url}
38
e21b2f888fa2 added a preliminary section about parsing
Christian Urban <urbanc@in.tum.de>
parents: 37
diff changeset
    12
\usepackage[a4paper,hscale=0.67,vscale=0.76]{geometry}
51
c346c156a7cd completes the recipie on antiquotations
Christian Urban <urbanc@in.tum.de>
parents: 47
diff changeset
    13
\usepackage{lineno}
66
Christian Urban <urbanc@in.tum.de>
parents: 64
diff changeset
    14
\usepackage{boxedminipage}
69
19106a9975c1 highligted the background of ML-code
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
    15
\usepackage{xcolor}
47
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    16
\usepackage{pdfsetup}
0
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
47
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    18
\urlstyle{rm}
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
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>
parents: 44
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>
parents: 44
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>
parents: 44
diff changeset
    22
\isadroptag{theory}
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    23
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    24
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
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>
parents: 5
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>
parents: 5
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>
parents: 5
diff changeset
    28
\newcommand{\impref}[1]{\ref{I-#1}}
13
2b07da8b310d polished and added a subdirectory for the recipes
Christian Urban <urbanc@in.tum.de>
parents: 7
diff changeset
    29
\newcommand{\ichcite}[1]{[Impl.\,Man., Ch.~\impref{#1}]}
2b07da8b310d polished and added a subdirectory for the recipes
Christian Urban <urbanc@in.tum.de>
parents: 7
diff changeset
    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>
parents: 43
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>
parents: 43
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>
parents: 43
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>
parents: 43
diff changeset
    34
\newcommand{\rsccite}[1]{[Isar Ref.\,Man., Sec.~\isarref{#1}]}
0
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    36
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
e91f54791e14 minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents: 2
diff changeset
    37
% sane default for proof documents
72
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    38
\parindent 0pt\parskip 0.6ex
5
e91f54791e14 minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents: 2
diff changeset
    39
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    40
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    41
\hyphenation{Isabelle}
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    42
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    43
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    44
% 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>
parents: 44
diff changeset
    45
\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>
parents: 44
diff changeset
    46
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    47
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    48
% for exercises, comments and readmores
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    49
\newtheorem{exercise}{Exercise}[section]
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    50
\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>
parents: 44
diff changeset
    51
5
e91f54791e14 minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents: 2
diff changeset
    52
\newcommand{\readmoremarginpar}[1]%
e91f54791e14 minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents: 2
diff changeset
    53
{\marginpar[\raggedleft\small{#1}]{\raggedright\small{#1}}}
e91f54791e14 minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents: 2
diff changeset
    54
e91f54791e14 minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents: 2
diff changeset
    55
\newenvironment{readmore}%
e91f54791e14 minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents: 2
diff changeset
    56
{\hspace{-3pt}\readmoremarginpar{\fbox{\textbf{Read More}}}\it}{}
0
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
31
53460ac408b5 Added alltt, rail, and url.
berghofe
parents: 21
diff changeset
    58
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    59
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    60
% this is to draw a gray box around code
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    61
\makeatletter\newenvironment{graybox}{%
72
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    62
  \begin{lrbox}{\@tempboxa}\begin{minipage}{0.985\textwidth}}{\end{minipage}\end{lrbox}%
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    63
  \colorbox{gray!10}{\usebox{\@tempboxa}}
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    64
}\makeatother
31
53460ac408b5 Added alltt, rail, and url.
berghofe
parents: 21
diff changeset
    65
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    66
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    67
% 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>
parents: 44
diff changeset
    68
% scaffolding around function definitions
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    69
\newenvironment{vanishML}{%
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    70
\renewcommand{\isacommand}[1]{}%
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    71
\renewcommand{\isacharverbatimopen}{}%
69
19106a9975c1 highligted the background of ML-code
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
    72
\renewcommand{\isacharverbatimclose}{}}{}
47
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    73
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    74
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    75
% for code
64
9a6e5e0c4906 deleted old files and added code to give a special tag to the command ML
Christian Urban <urbanc@in.tum.de>
parents: 62
diff changeset
    76
\isakeeptag{CookBookML}
72
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    77
\renewcommand{\isatagCookBookML}{\begin{vanishML}\begin{isabelle}\begin{graybox}}
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    78
\renewcommand{\endisatagCookBookML}{\end{graybox}\end{isabelle}\end{vanishML}}
47
4daf913fdbe1 hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
    79
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    80
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    81
% for code that has line numbers
51
c346c156a7cd completes the recipie on antiquotations
Christian Urban <urbanc@in.tum.de>
parents: 47
diff changeset
    82
\isakeeptag{linenumbers}
69
19106a9975c1 highligted the background of ML-code
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
    83
\renewcommand{\isataglinenumbers}
72
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    84
{\begin{vanishML}\begin{isabelle}\begingroup\begin{graybox}\resetlinenumber\internallinenumbers}
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    85
\renewcommand{\endisataglinenumbers}{\end{graybox}\endgroup\end{isabelle}\end{vanishML}}
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    86
72
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    87
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    88
\renewenvironment{isabelle}
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    89
{\begin{trivlist}\begin{isabellebody}\small\item\relax}
7b8c4fe235aa added an antiquotation option [gray] for gray boxes around displays
Christian Urban <urbanc@in.tum.de>
parents: 71
diff changeset
    90
{\end{isabellebody}\end{trivlist}}
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    91
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
\begin{document}
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
2
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
    94
\title{\mbox{}\\[-10ex]
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
    95
       \includegraphics[scale=0.5]{cookbook-logo.jpg}\\[3ex]
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
    96
       The Isabelle Programmer's Cookbook (fragment)}
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
    97
2
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
    98
\author{with contributions by:\\[2ex] 
62
c3fe4749ef01 added Sacha as contributor
Christian Urban <urbanc@in.tum.de>
parents: 51
diff changeset
    99
        \begin{tabular}{r@{\hspace{1.8mm}}l}
c3fe4749ef01 added Sacha as contributor
Christian Urban <urbanc@in.tum.de>
parents: 51
diff changeset
   100
        Stefan & Berghofer\\
c3fe4749ef01 added Sacha as contributor
Christian Urban <urbanc@in.tum.de>
parents: 51
diff changeset
   101
        Sascha & Böhme\\
c3fe4749ef01 added Sacha as contributor
Christian Urban <urbanc@in.tum.de>
parents: 51
diff changeset
   102
        Jeremy & Dawson\\
c3fe4749ef01 added Sacha as contributor
Christian Urban <urbanc@in.tum.de>
parents: 51
diff changeset
   103
        Alexander & Krauss\\ 
2
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
   104
        \end{tabular}}
71
14c3dd5ee2ad removed mytable from root-file
Christian Urban <urbanc@in.tum.de>
parents: 69
diff changeset
   105
0
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
\maketitle
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
\tableofcontents
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
% generated text of all theories
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
\input{session}
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
2
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
   112
\newpage
978a3c2ed7ce split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents: 0
diff changeset
   113
\bibliographystyle{abbrv}
17
8afa1c990a14 fixed creation of bibliography
Christian Urban <urbanc@in.tum.de>
parents: 15
diff changeset
   114
\bibliography{root}
0
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
\end{document}
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
%%% Local Variables:
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
%%% mode: latex
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
%%% TeX-master: t
02503850a8cf initial commit of Alexander's files
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
%%% End: