src/Doc/Prog_Prove/document/prelude.tex
author wenzelm
Wed, 12 Mar 2025 11:39:00 +0100
changeset 82265 4b875a4c83b0
parent 73511 2cdbb6a2f2a7
permissions -rw-r--r--
update for release;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47269
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
     1
\usepackage{makeidx}         % allows index generation
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
     2
\usepackage{graphicx}        % standard LaTeX graphics tool
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
     3
                             % when including figure files
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
     4
\usepackage{multicol}        % used for the two-column index
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
     5
\usepackage[bottom]{footmisc}% places footnotes at page bottom
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
     6
\usepackage{alltt}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
     7
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
     8
\usepackage[T1]{fontenc}
73511
2cdbb6a2f2a7 updated to latest latex due to new mechanism for dealing with bold ccfonts
nipkow
parents: 58885
diff changeset
     9
\usepackage[boldsans]{ccfonts}
2cdbb6a2f2a7 updated to latest latex due to new mechanism for dealing with bold ccfonts
nipkow
parents: 58885
diff changeset
    10
\DeclareFontSeriesDefault[rm]{bf}{bx}%bf default for rm: bold extended
2cdbb6a2f2a7 updated to latest latex due to new mechanism for dealing with bold ccfonts
nipkow
parents: 58885
diff changeset
    11
\DeclareFontSeriesDefault[sf]{bf}{sbc}%bf default for sf: semibold
47269
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    12
\usepackage[euler-digits]{eulervm}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    13
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    14
\usepackage{isabelle,isabellesym}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    15
\usepackage{mathpartir}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    16
\usepackage{amssymb}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    17
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    18
\renewcommand*\descriptionlabel[1]{\hspace\labelsep \textbf{#1}\hfil}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    19
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    20
% this should be the last package used
51463
fa84494bf3a0 get rid of xcolor warnings
nipkow
parents: 51448
diff changeset
    21
\usepackage{xcolor}
47269
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    22
\definecolor{linkcolor}{rgb}{0,0,0.4}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    23
\usepackage[colorlinks=true,linkcolor=linkcolor,citecolor=linkcolor,
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    24
            filecolor=linkcolor,pagecolor=linkcolor,
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    25
            urlcolor=linkcolor]{hyperref}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    26
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    27
% urls in roman style, theory text in math-similar italics
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    28
\urlstyle{tt}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    29
\isabellestyle{it}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    30
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    31
\renewcommand{\isadigit}[1]{\ensuremath{#1}}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    32
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    33
% font size
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    34
\renewcommand{\isastyle}{\isastyleminor}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    35
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    36
% indexing
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    37
\usepackage{ifthen}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    38
\newcommand{\indexdef}[3]%
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    39
{\ifthenelse{\equal{}{#1}}{\index{#3 (#2)|bold}}{\index{#3 (#1\ #2)|bold}}}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    40
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    41
% section commands
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    42
\renewcommand{\chapterautorefname}{Chapter}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    43
\renewcommand{\sectionautorefname}{Section}
51448
nipkow
parents: 51436
diff changeset
    44
\renewcommand{\subsectionautorefname}{Section}
47269
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    45
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    46
\renewcommand{\isamarkupsection}[1]{{\rmfamily\subsection{#1}}}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    47
\renewcommand{\isamarkupsubsection}[1]{{\rmfamily\subsubsection{#1}}}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    48
% isabelle in-text command font
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    49
\newcommand{\isacom}[1]{\isa{\isacommand{#1}}}
49627
34ada66545ca tuned printing of _ in latex
nipkow
parents: 49615
diff changeset
    50
34ada66545ca tuned printing of _ in latex
nipkow
parents: 49615
diff changeset
    51
\protected\def\isacharunderscore{\raisebox{2pt}{\_\kern-1.7pt}}
34ada66545ca tuned printing of _ in latex
nipkow
parents: 49615
diff changeset
    52
\protected\def\isacharunderscorekeyword{\raisebox{2pt}{\_}}
47269
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    53
% isabelle keyword, adapted from isabelle.sty
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    54
\renewcommand{\isakeyword}[1]
73511
2cdbb6a2f2a7 updated to latest latex due to new mechanism for dealing with bold ccfonts
nipkow
parents: 58885
diff changeset
    55
{\emph{\sffamily\bfseries%
2cdbb6a2f2a7 updated to latest latex due to new mechanism for dealing with bold ccfonts
nipkow
parents: 58885
diff changeset
    56
\def\isachardot{.}\def\isacharunderscore{\isacharunderscorekeyword}%
2cdbb6a2f2a7 updated to latest latex due to new mechanism for dealing with bold ccfonts
nipkow
parents: 58885
diff changeset
    57
\def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}}
47269
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    58
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    59
% add \noindent to text blocks automatically
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    60
\renewenvironment{isamarkuptext}{\par\isastyletext\begin{isapar}\noindent}{\end{isapar}}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    61
\renewenvironment{isamarkuptxt}{\par\isastyletext\begin{isapar}\noindent}{\end{isapar}}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    62
49615
nipkow
parents: 48985
diff changeset
    63
\newcommand{\noquotes}[1]{{\renewcommand{\isachardoublequote}{}\renewcommand{\isachardoublequoteopen}{}\renewcommand{\isachardoublequoteclose}{}#1}}
47269
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    64
\newcommand{\xsymbol}[1]{\texttt{\char`\\\char`<#1>}}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    65
55317
834a84553e02 started index
nipkow
parents: 51532
diff changeset
    66
%index
834a84553e02 started index
nipkow
parents: 51532
diff changeset
    67
\newcommand{\conceptnoidx}[1]{\textbf{#1}}
834a84553e02 started index
nipkow
parents: 51532
diff changeset
    68
\newcommand{\concept}[1]{\conceptnoidx{#1}\index{#1}}
834a84553e02 started index
nipkow
parents: 51532
diff changeset
    69
\newcommand{\conceptidx}[2]{\conceptnoidx{#1}\index{#2}}
55319
e33f25233798 tuned latex
nipkow
parents: 55317
diff changeset
    70
\newcommand{\indexed}[2]{#1\index{#2@\protect#1}}
55317
834a84553e02 started index
nipkow
parents: 51532
diff changeset
    71
47269
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    72
\newcommand{\isabox}{\fbox}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    73
\newcommand{\bigisabox}[1]
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    74
{\isabox{\renewcommand{\isanewline}{\\}%
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    75
 \begin{tabular}{l}#1\end{tabular}}}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    76
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    77
%%%% ``WARNING'' environment: 2 ! characters separated by negative thin space
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    78
%\def\warnbang{\vtop to 0pt{\vss\hbox{\let\bfdefault=\bfdefaultold\Huge\textbf{!$\!$!}}\vss}}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    79
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    80
\def\warnbang{\vtop to 0pt{\vss\hbox{\includegraphics[width=3ex, height=5.5ex]{bang}}\vss}}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    81
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    82
\newenvironment{warn}{\begin{trivlist}\small\item[]\noindent%
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    83
    \begingroup\hangindent=\parindent\hangafter=-2%\clubpenalty=10000%
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    84
    \def\par{\endgraf\endgroup}%
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    85
    \hbox to0pt{\hskip-\hangindent\warnbang\hfill}\ignorespaces}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    86
  {\par\end{trivlist}}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    87
47302
70239da25ef6 towards showing " in the tutorial
nipkow
parents: 47269
diff changeset
    88
\chardef\isachardoublequote=`\"%
70239da25ef6 towards showing " in the tutorial
nipkow
parents: 47269
diff changeset
    89
\chardef\isachardoublequoteopen=`\"%
70239da25ef6 towards showing " in the tutorial
nipkow
parents: 47269
diff changeset
    90
\chardef\isachardoublequoteclose=`\"%
47269
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    91
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    92
\renewcommand{\isacharbackquoteopen}{\isacharbackquote}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    93
\renewcommand{\isacharbackquoteclose}{\isacharbackquote}
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    94
29aa0c071875 New manual Programming and Proving in Isabelle/HOL
nipkow
parents:
diff changeset
    95
\hyphenation{Isa-belle}