doc-src/IsarRef/Thy/document/Document_Preparation.tex
author wenzelm
Sun, 08 Jun 2008 14:31:06 +0200
changeset 27094 2cf13a72e170
parent 27054 f1ef0973d0a8
child 27453 eecd9d84e41b
permissions -rw-r--r--
updated generated file;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27042
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
     1
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
     2
\begin{isabellebody}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
     3
\def\isabellecontext{Document{\isacharunderscore}Preparation}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
     4
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
     5
\isadelimtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
     6
\isanewline
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
     7
\isanewline
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
     8
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
     9
\endisadelimtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    10
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    11
\isatagtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    12
\isacommand{theory}\isamarkupfalse%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    13
\ Document{\isacharunderscore}Preparation\isanewline
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    14
\isakeyword{imports}\ Main\isanewline
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    15
\isakeyword{begin}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    16
\endisatagtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    17
{\isafoldtheory}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    18
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    19
\isadelimtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    20
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    21
\endisadelimtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    22
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    23
\isamarkupchapter{Document preparation \label{ch:document-prep}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    24
}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    25
\isamarkuptrue%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    26
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    27
\begin{isamarkuptext}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    28
Isabelle/Isar provides a simple document preparation system based on
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    29
  existing {PDF-\LaTeX} technology, with full support of hyper-links
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    30
  (both local references and URLs) and bookmarks.  Thus the results
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    31
  are equally well suited for WWW browsing and as printed copies.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    32
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    33
  \medskip Isabelle generates {\LaTeX} output as part of the run of a
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    34
  \emph{logic session} (see also \cite{isabelle-sys}).  Getting
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    35
  started with a working configuration for common situations is quite
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    36
  easy by using the Isabelle \verb|mkdir| and \verb|make|
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    37
  tools.  First invoke
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    38
\begin{ttbox}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    39
  isatool mkdir Foo
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    40
\end{ttbox}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    41
  to initialize a separate directory for session \verb|Foo| ---
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    42
  it is safe to experiment, since \verb|isatool mkdir| never
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    43
  overwrites existing files.  Ensure that \verb|Foo/ROOT.ML|
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    44
  holds ML commands to load all theories required for this session;
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    45
  furthermore \verb|Foo/document/root.tex| should include any
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    46
  special {\LaTeX} macro packages required for your document (the
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    47
  default is usually sufficient as a start).
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    48
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    49
  The session is controlled by a separate \verb|IsaMakefile|
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    50
  (with crude source dependencies by default).  This file is located
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    51
  one level up from the \verb|Foo| directory location.  Now
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    52
  invoke
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    53
\begin{ttbox}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    54
  isatool make Foo
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    55
\end{ttbox}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    56
  to run the \verb|Foo| session, with browser information and
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    57
  document preparation enabled.  Unless any errors are reported by
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    58
  Isabelle or {\LaTeX}, the output will appear inside the directory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    59
  \verb|ISABELLE_BROWSER_INFO|, as reported by the batch job in
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    60
  verbose mode.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    61
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    62
  \medskip You may also consider to tune the \verb|usedir|
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    63
  options in \verb|IsaMakefile|, for example to change the output
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    64
  format from \verb|pdf| to \verb|dvi|, or activate the
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    65
  \verb|-D| option to retain a second copy of the generated
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    66
  {\LaTeX} sources.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    67
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    68
  \medskip See \emph{The Isabelle System Manual} \cite{isabelle-sys}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    69
  for further details on Isabelle logic sessions and theory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    70
  presentation.  The Isabelle/HOL tutorial \cite{isabelle-hol-book}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    71
  also covers theory presentation issues.%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    72
\end{isamarkuptext}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    73
\isamarkuptrue%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    74
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    75
\isamarkupsection{Markup commands \label{sec:markup}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    76
}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    77
\isamarkuptrue%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    78
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    79
\begin{isamarkuptext}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    80
\begin{matharray}{rcl}
27052
5c48cecb981b updated generated file;
wenzelm
parents: 27042
diff changeset
    81
    \indexdef{}{command}{header}\hypertarget{command.header}{\hyperlink{command.header}{\mbox{\isa{\isacommand{header}}}}} & : & \isarkeep{toplevel} \\[0.5ex]
27042
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    82
    \indexdef{}{command}{chapter}\hypertarget{command.chapter}{\hyperlink{command.chapter}{\mbox{\isa{\isacommand{chapter}}}}} & : & \isarkeep{local{\dsh}theory} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    83
    \indexdef{}{command}{section}\hypertarget{command.section}{\hyperlink{command.section}{\mbox{\isa{\isacommand{section}}}}} & : & \isarkeep{local{\dsh}theory} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    84
    \indexdef{}{command}{subsection}\hypertarget{command.subsection}{\hyperlink{command.subsection}{\mbox{\isa{\isacommand{subsection}}}}} & : & \isarkeep{local{\dsh}theory} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    85
    \indexdef{}{command}{subsubsection}\hypertarget{command.subsubsection}{\hyperlink{command.subsubsection}{\mbox{\isa{\isacommand{subsubsection}}}}} & : & \isarkeep{local{\dsh}theory} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    86
    \indexdef{}{command}{text}\hypertarget{command.text}{\hyperlink{command.text}{\mbox{\isa{\isacommand{text}}}}} & : & \isarkeep{local{\dsh}theory} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    87
    \indexdef{}{command}{text\_raw}\hypertarget{command.text-raw}{\hyperlink{command.text-raw}{\mbox{\isa{\isacommand{text{\isacharunderscore}raw}}}}} & : & \isarkeep{local{\dsh}theory} \\[0.5ex]
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    88
    \indexdef{}{command}{sect}\hypertarget{command.sect}{\hyperlink{command.sect}{\mbox{\isa{\isacommand{sect}}}}} & : & \isartrans{proof}{proof} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    89
    \indexdef{}{command}{subsect}\hypertarget{command.subsect}{\hyperlink{command.subsect}{\mbox{\isa{\isacommand{subsect}}}}} & : & \isartrans{proof}{proof} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    90
    \indexdef{}{command}{subsubsect}\hypertarget{command.subsubsect}{\hyperlink{command.subsubsect}{\mbox{\isa{\isacommand{subsubsect}}}}} & : & \isartrans{proof}{proof} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    91
    \indexdef{}{command}{txt}\hypertarget{command.txt}{\hyperlink{command.txt}{\mbox{\isa{\isacommand{txt}}}}} & : & \isartrans{proof}{proof} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    92
    \indexdef{}{command}{txt\_raw}\hypertarget{command.txt-raw}{\hyperlink{command.txt-raw}{\mbox{\isa{\isacommand{txt{\isacharunderscore}raw}}}}} & : & \isartrans{proof}{proof} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    93
  \end{matharray}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    94
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    95
  Apart from formal comments (see \secref{sec:comments}), markup
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    96
  commands provide a structured way to insert text into the document
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    97
  generated from a theory (see \cite{isabelle-sys} for more
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    98
  information on Isabelle's document preparation tools).
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
    99
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   100
  \begin{rail}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   101
    ('chapter' | 'section' | 'subsection' | 'subsubsection' | 'text') target? text
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   102
    ;
27052
5c48cecb981b updated generated file;
wenzelm
parents: 27042
diff changeset
   103
    ('header' | 'text\_raw' | 'sect' | 'subsect' | 'subsubsect' | 'txt' | 'txt\_raw') text
27042
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   104
    ;
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   105
  \end{rail}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   106
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   107
  \begin{descr}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   108
27052
5c48cecb981b updated generated file;
wenzelm
parents: 27042
diff changeset
   109
  \item [\hyperlink{command.header}{\mbox{\isa{\isacommand{header}}}}~\isa{{\isachardoublequote}text{\isachardoublequote}}] provides plain text
5c48cecb981b updated generated file;
wenzelm
parents: 27042
diff changeset
   110
  markup just preceding the formal beginning of a theory.  In actual
5c48cecb981b updated generated file;
wenzelm
parents: 27042
diff changeset
   111
  document preparation the corresponding {\LaTeX} macro \verb|\isamarkupheader| may be redefined to produce chapter or section
27054
f1ef0973d0a8 updated generated file;
wenzelm
parents: 27052
diff changeset
   112
  headings.
27052
5c48cecb981b updated generated file;
wenzelm
parents: 27042
diff changeset
   113
  
27042
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   114
  \item [\hyperlink{command.chapter}{\mbox{\isa{\isacommand{chapter}}}}, \hyperlink{command.section}{\mbox{\isa{\isacommand{section}}}}, \hyperlink{command.subsection}{\mbox{\isa{\isacommand{subsection}}}}, and \hyperlink{command.subsubsection}{\mbox{\isa{\isacommand{subsubsection}}}}] mark chapter and
27054
f1ef0973d0a8 updated generated file;
wenzelm
parents: 27052
diff changeset
   115
  section headings.  The corresponding {\LaTeX} macros are \verb|\isamarkupchapter|, \verb|\isamarkupsection| etc.
27042
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   116
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   117
  \item [\hyperlink{command.text}{\mbox{\isa{\isacommand{text}}}} and \hyperlink{command.txt}{\mbox{\isa{\isacommand{txt}}}}] specify paragraphs of
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   118
  plain text.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   119
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   120
  \item [\hyperlink{command.text-raw}{\mbox{\isa{\isacommand{text{\isacharunderscore}raw}}}} and \hyperlink{command.txt-raw}{\mbox{\isa{\isacommand{txt{\isacharunderscore}raw}}}}] insert
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   121
  {\LaTeX} source into the output, without additional markup.  Thus
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   122
  the full range of document manipulations becomes available.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   123
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   124
  \end{descr}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   125
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   126
  The \isa{{\isachardoublequote}text{\isachardoublequote}} argument of these markup commands (except for
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   127
  \hyperlink{command.text-raw}{\mbox{\isa{\isacommand{text{\isacharunderscore}raw}}}}) may contain references to formal entities
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   128
  (``antiquotations'', see also \secref{sec:antiq}).  These are
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   129
  interpreted in the present theory context, or the named \isa{{\isachardoublequote}target{\isachardoublequote}}.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   130
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   131
  Any of these markup elements corresponds to a {\LaTeX} command with
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   132
  the name prefixed by \verb|\isamarkup|.  For the sectioning
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   133
  commands this is a plain macro with a single argument, e.g.\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   134
  \verb|\isamarkupchapter{|\isa{{\isachardoublequote}{\isasymdots}{\isachardoublequote}}\verb|}| for
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   135
  \hyperlink{command.chapter}{\mbox{\isa{\isacommand{chapter}}}}.  The \hyperlink{command.text}{\mbox{\isa{\isacommand{text}}}} markup results in a
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   136
  {\LaTeX} environment \verb|\begin{isamarkuptext}| \isa{{\isachardoublequote}{\isasymdots}{\isachardoublequote}} \verb|\end{isamarkuptext}|, while \hyperlink{command.text-raw}{\mbox{\isa{\isacommand{text{\isacharunderscore}raw}}}}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   137
  causes the text to be inserted directly into the {\LaTeX} source.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   138
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   139
  \medskip The proof markup commands closely resemble those for theory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   140
  specifications, but have a different formal status and produce
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   141
  different {\LaTeX} macros.  Also note that the \indexref{}{command}{header}\hyperlink{command.header}{\mbox{\isa{\isacommand{header}}}} declaration (see \secref{sec:begin-thy}) admits to insert
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   142
  section markup just preceding the actual theory definition.%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   143
\end{isamarkuptext}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   144
\isamarkuptrue%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   145
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   146
\isamarkupsection{Antiquotations \label{sec:antiq}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   147
}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   148
\isamarkuptrue%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   149
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   150
\begin{isamarkuptext}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   151
\begin{matharray}{rcl}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   152
    \indexdef{}{antiquotation}{theory}\hypertarget{antiquotation.theory}{\hyperlink{antiquotation.theory}{\mbox{\isa{theory}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   153
    \indexdef{}{antiquotation}{thm}\hypertarget{antiquotation.thm}{\hyperlink{antiquotation.thm}{\mbox{\isa{thm}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   154
    \indexdef{}{antiquotation}{prop}\hypertarget{antiquotation.prop}{\hyperlink{antiquotation.prop}{\mbox{\isa{prop}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   155
    \indexdef{}{antiquotation}{term}\hypertarget{antiquotation.term}{\hyperlink{antiquotation.term}{\mbox{\isa{term}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   156
    \indexdef{}{antiquotation}{const}\hypertarget{antiquotation.const}{\hyperlink{antiquotation.const}{\mbox{\isa{const}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   157
    \indexdef{}{antiquotation}{abbrev}\hypertarget{antiquotation.abbrev}{\hyperlink{antiquotation.abbrev}{\mbox{\isa{abbrev}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   158
    \indexdef{}{antiquotation}{typeof}\hypertarget{antiquotation.typeof}{\hyperlink{antiquotation.typeof}{\mbox{\isa{typeof}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   159
    \indexdef{}{antiquotation}{typ}\hypertarget{antiquotation.typ}{\hyperlink{antiquotation.typ}{\mbox{\isa{typ}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   160
    \indexdef{}{antiquotation}{thm\_style}\hypertarget{antiquotation.thm-style}{\hyperlink{antiquotation.thm-style}{\mbox{\isa{thm{\isacharunderscore}style}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   161
    \indexdef{}{antiquotation}{term\_style}\hypertarget{antiquotation.term-style}{\hyperlink{antiquotation.term-style}{\mbox{\isa{term{\isacharunderscore}style}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   162
    \indexdef{}{antiquotation}{text}\hypertarget{antiquotation.text}{\hyperlink{antiquotation.text}{\mbox{\isa{text}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   163
    \indexdef{}{antiquotation}{goals}\hypertarget{antiquotation.goals}{\hyperlink{antiquotation.goals}{\mbox{\isa{goals}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   164
    \indexdef{}{antiquotation}{subgoals}\hypertarget{antiquotation.subgoals}{\hyperlink{antiquotation.subgoals}{\mbox{\isa{subgoals}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   165
    \indexdef{}{antiquotation}{prf}\hypertarget{antiquotation.prf}{\hyperlink{antiquotation.prf}{\mbox{\isa{prf}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   166
    \indexdef{}{antiquotation}{full\_prf}\hypertarget{antiquotation.full-prf}{\hyperlink{antiquotation.full-prf}{\mbox{\isa{full{\isacharunderscore}prf}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   167
    \indexdef{}{antiquotation}{ML}\hypertarget{antiquotation.ML}{\hyperlink{antiquotation.ML}{\mbox{\isa{ML}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   168
    \indexdef{}{antiquotation}{ML\_type}\hypertarget{antiquotation.ML-type}{\hyperlink{antiquotation.ML-type}{\mbox{\isa{ML{\isacharunderscore}type}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   169
    \indexdef{}{antiquotation}{ML\_struct}\hypertarget{antiquotation.ML-struct}{\hyperlink{antiquotation.ML-struct}{\mbox{\isa{ML{\isacharunderscore}struct}}}} & : & \isarantiq \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   170
  \end{matharray}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   171
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   172
  The text body of formal comments (see also \secref{sec:comments})
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   173
  may contain antiquotations of logical entities, such as theorems,
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   174
  terms and types, which are to be presented in the final output
27054
f1ef0973d0a8 updated generated file;
wenzelm
parents: 27052
diff changeset
   175
  produced by the Isabelle document preparation system.
27042
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   176
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   177
  Thus embedding of ``\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}term\ {\isacharbrackleft}show{\isacharunderscore}types{\isacharbrackright}\ {\isachardoublequote}f\ x\ {\isacharequal}\ a\ {\isacharplus}\ x{\isachardoublequote}{\isacharbraceright}{\isachardoublequote}}''
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   178
  within a text block would cause
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   179
  \isa{{\isacharparenleft}f{\isasymColon}{\isacharprime}a\ {\isasymRightarrow}\ {\isacharprime}a{\isacharparenright}\ {\isacharparenleft}x{\isasymColon}{\isacharprime}a{\isacharparenright}\ {\isacharequal}\ {\isacharparenleft}a{\isasymColon}{\isacharprime}a{\isacharparenright}\ {\isacharplus}\ x} to appear in the final {\LaTeX} document.  Also note that theorem
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   180
  antiquotations may involve attributes as well.  For example,
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   181
  \isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}thm\ sym\ {\isacharbrackleft}no{\isacharunderscore}vars{\isacharbrackright}{\isacharbraceright}{\isachardoublequote}} would print the theorem's
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   182
  statement where all schematic variables have been replaced by fixed
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   183
  ones, which are easier to read.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   184
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   185
  \begin{rail}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   186
    atsign lbrace antiquotation rbrace
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   187
    ;
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   188
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   189
    antiquotation:
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   190
      'theory' options name |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   191
      'thm' options thmrefs |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   192
      'prop' options prop |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   193
      'term' options term |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   194
      'const' options term |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   195
      'abbrev' options term |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   196
      'typeof' options term |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   197
      'typ' options type |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   198
      'thm\_style' options name thmref |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   199
      'term\_style' options name term |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   200
      'text' options name |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   201
      'goals' options |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   202
      'subgoals' options |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   203
      'prf' options thmrefs |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   204
      'full\_prf' options thmrefs |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   205
      'ML' options name |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   206
      'ML\_type' options name |
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   207
      'ML\_struct' options name
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   208
    ;
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   209
    options: '[' (option * ',') ']'
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   210
    ;
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   211
    option: name | name '=' name
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   212
    ;
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   213
  \end{rail}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   214
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   215
  Note that the syntax of antiquotations may \emph{not} include source
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   216
  comments \verb|(*|~\isa{{\isachardoublequote}{\isasymdots}{\isachardoublequote}}~\verb|*)| or verbatim
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   217
  text \verb|{|\verb|*|~\isa{{\isachardoublequote}{\isasymdots}{\isachardoublequote}}~\verb|*|\verb|}|.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   218
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   219
  \begin{descr}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   220
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   221
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}theory\ A{\isacharbraceright}{\isachardoublequote}}] prints the name \isa{{\isachardoublequote}A{\isachardoublequote}}, which is
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   222
  guaranteed to refer to a valid ancestor theory in the current
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   223
  context.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   224
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   225
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}thm\ a\isactrlsub {\isadigit{1}}\ {\isasymdots}\ a\isactrlsub n{\isacharbraceright}{\isachardoublequote}}] prints theorems
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   226
  \isa{{\isachardoublequote}a\isactrlsub {\isadigit{1}}\ {\isasymdots}\ a\isactrlsub n{\isachardoublequote}}.  Note that attribute specifications
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   227
  may be included as well (see also \secref{sec:syn-att}); the
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   228
  \indexref{}{attribute}{no\_vars}\hyperlink{attribute.no-vars}{\mbox{\isa{no{\isacharunderscore}vars}}} rule (see \secref{sec:misc-meth-att}) would
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   229
  be particularly useful to suppress printing of schematic variables.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   230
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   231
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}prop\ {\isasymphi}{\isacharbraceright}{\isachardoublequote}}] prints a well-typed proposition \isa{{\isachardoublequote}{\isasymphi}{\isachardoublequote}}.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   232
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   233
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}term\ t{\isacharbraceright}{\isachardoublequote}}] prints a well-typed term \isa{{\isachardoublequote}t{\isachardoublequote}}.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   234
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   235
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}const\ c{\isacharbraceright}{\isachardoublequote}}] prints a logical or syntactic constant
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   236
  \isa{{\isachardoublequote}c{\isachardoublequote}}.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   237
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   238
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}abbrev\ c\ x\isactrlsub {\isadigit{1}}\ {\isasymdots}\ x\isactrlsub n{\isacharbraceright}{\isachardoublequote}}] prints a constant
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   239
  abbreviation \isa{{\isachardoublequote}c\ x\isactrlsub {\isadigit{1}}\ {\isasymdots}\ x\isactrlsub n\ {\isasymequiv}\ rhs{\isachardoublequote}} as defined in
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   240
  the current context.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   241
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   242
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}typeof\ t{\isacharbraceright}{\isachardoublequote}}] prints the type of a well-typed term
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   243
  \isa{{\isachardoublequote}t{\isachardoublequote}}.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   244
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   245
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}typ\ {\isasymtau}{\isacharbraceright}{\isachardoublequote}}] prints a well-formed type \isa{{\isachardoublequote}{\isasymtau}{\isachardoublequote}}.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   246
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   247
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}thm{\isacharunderscore}style\ s\ a{\isacharbraceright}{\isachardoublequote}}] prints theorem \isa{a},
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   248
  previously applying a style \isa{s} to it (see below).
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   249
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   250
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}term{\isacharunderscore}style\ s\ t{\isacharbraceright}{\isachardoublequote}}] prints a well-typed term \isa{t} after applying a style \isa{s} to it (see below).
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   251
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   252
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}text\ s{\isacharbraceright}{\isachardoublequote}}] prints uninterpreted source text \isa{s}.  This is particularly useful to print portions of text according
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   253
  to the Isabelle {\LaTeX} output style, without demanding
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   254
  well-formedness (e.g.\ small pieces of terms that should not be
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   255
  parsed or type-checked yet).
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   256
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   257
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}goals{\isacharbraceright}{\isachardoublequote}}] prints the current \emph{dynamic} goal
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   258
  state.  This is mainly for support of tactic-emulation scripts
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   259
  within Isar --- presentation of goal states does not conform to
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   260
  actual human-readable proof documents.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   261
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   262
  Please do not include goal states into document output unless you
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   263
  really know what you are doing!
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   264
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   265
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}subgoals{\isacharbraceright}{\isachardoublequote}}] is similar to \isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}goals{\isacharbraceright}{\isachardoublequote}}, but
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   266
  does not print the main goal.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   267
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   268
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}prf\ a\isactrlsub {\isadigit{1}}\ {\isasymdots}\ a\isactrlsub n{\isacharbraceright}{\isachardoublequote}}] prints the (compact)
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   269
  proof terms corresponding to the theorems \isa{{\isachardoublequote}a\isactrlsub {\isadigit{1}}\ {\isasymdots}\ a\isactrlsub n{\isachardoublequote}}. Note that this requires proof terms to be switched on
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   270
  for the current object logic (see the ``Proof terms'' section of the
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   271
  Isabelle reference manual for information on how to do this).
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   272
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   273
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}full{\isacharunderscore}prf\ a\isactrlsub {\isadigit{1}}\ {\isasymdots}\ a\isactrlsub n{\isacharbraceright}{\isachardoublequote}}] is like \isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}prf\ a\isactrlsub {\isadigit{1}}\ {\isasymdots}\ a\isactrlsub n{\isacharbraceright}{\isachardoublequote}}, but displays the full proof terms,
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   274
  i.e.\ also displays information omitted in the compact proof term,
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   275
  which is denoted by ``\isa{{\isacharunderscore}}'' placeholders there.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   276
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   277
  \item [\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}ML\ s{\isacharbraceright}{\isachardoublequote}}, \isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}ML{\isacharunderscore}type\ s{\isacharbraceright}{\isachardoublequote}}, and \isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}ML{\isacharunderscore}struct\ s{\isacharbraceright}{\isachardoublequote}}] check text \isa{s} as ML value, type, and
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   278
  structure, respectively.  The source is displayed verbatim.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   279
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   280
  \end{descr}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   281
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   282
  \medskip The following standard styles for use with \isa{thm{\isacharunderscore}style} and \isa{term{\isacharunderscore}style} are available:
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   283
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   284
  \begin{descr}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   285
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   286
  \item [\isa{lhs}] extracts the first argument of any application
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   287
  form with at least two arguments -- typically meta-level or
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   288
  object-level equality, or any other binary relation.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   289
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   290
  \item [\isa{rhs}] is like \isa{lhs}, but extracts the second
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   291
  argument.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   292
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   293
  \item [\isa{{\isachardoublequote}concl{\isachardoublequote}}] extracts the conclusion \isa{C} from a rule
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   294
  in Horn-clause normal form \isa{{\isachardoublequote}A\isactrlsub {\isadigit{1}}\ {\isasymLongrightarrow}\ {\isasymdots}\ A\isactrlsub n\ {\isasymLongrightarrow}\ C{\isachardoublequote}}.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   295
  
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   296
  \item [\isa{{\isachardoublequote}prem{\isadigit{1}}{\isachardoublequote}}, \dots, \isa{{\isachardoublequote}prem{\isadigit{9}}{\isachardoublequote}}] extract premise
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   297
  number \isa{{\isachardoublequote}{\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isacharcomma}\ {\isadigit{9}}{\isachardoublequote}}, respectively, from from a rule in
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   298
  Horn-clause normal form \isa{{\isachardoublequote}A\isactrlsub {\isadigit{1}}\ {\isasymLongrightarrow}\ {\isasymdots}\ A\isactrlsub n\ {\isasymLongrightarrow}\ C{\isachardoublequote}}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   299
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   300
  \end{descr}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   301
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   302
  \medskip
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   303
  The following options are available to tune the output.  Note that most of
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   304
  these coincide with ML flags of the same names (see also \cite{isabelle-ref}).
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   305
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   306
  \begin{descr}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   307
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   308
  \item[\isa{{\isachardoublequote}show{\isacharunderscore}types\ {\isacharequal}\ bool{\isachardoublequote}} and \isa{{\isachardoublequote}show{\isacharunderscore}sorts\ {\isacharequal}\ bool{\isachardoublequote}}]
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   309
  control printing of explicit type and sort constraints.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   310
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   311
  \item[\isa{{\isachardoublequote}show{\isacharunderscore}structs\ {\isacharequal}\ bool{\isachardoublequote}}] controls printing of implicit
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   312
  structures.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   313
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   314
  \item[\isa{{\isachardoublequote}long{\isacharunderscore}names\ {\isacharequal}\ bool{\isachardoublequote}}] forces names of types and
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   315
  constants etc.\ to be printed in their fully qualified internal
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   316
  form.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   317
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   318
  \item[\isa{{\isachardoublequote}short{\isacharunderscore}names\ {\isacharequal}\ bool{\isachardoublequote}}] forces names of types and
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   319
  constants etc.\ to be printed unqualified.  Note that internalizing
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   320
  the output again in the current context may well yield a different
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   321
  result.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   322
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   323
  \item[\isa{{\isachardoublequote}unique{\isacharunderscore}names\ {\isacharequal}\ bool{\isachardoublequote}}] determines whether the printed
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   324
  version of qualified names should be made sufficiently long to avoid
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   325
  overlap with names declared further back.  Set to \isa{false} for
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   326
  more concise output.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   327
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   328
  \item[\isa{{\isachardoublequote}eta{\isacharunderscore}contract\ {\isacharequal}\ bool{\isachardoublequote}}] prints terms in \isa{{\isasymeta}}-contracted form.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   329
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   330
  \item[\isa{{\isachardoublequote}display\ {\isacharequal}\ bool{\isachardoublequote}}] indicates if the text is to be
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   331
  output as multi-line ``display material'', rather than a small piece
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   332
  of text without line breaks (which is the default).
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   333
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   334
  \item[\isa{{\isachardoublequote}break\ {\isacharequal}\ bool{\isachardoublequote}}] controls line breaks in non-display
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   335
  material.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   336
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   337
  \item[\isa{{\isachardoublequote}quotes\ {\isacharequal}\ bool{\isachardoublequote}}] indicates if the output should be
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   338
  enclosed in double quotes.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   339
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   340
  \item[\isa{{\isachardoublequote}mode\ {\isacharequal}\ name{\isachardoublequote}}] adds \isa{name} to the print mode to
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   341
  be used for presentation (see also \cite{isabelle-ref}).  Note that
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   342
  the standard setup for {\LaTeX} output is already present by
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   343
  default, including the modes \isa{latex} and \isa{xsymbols}.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   344
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   345
  \item[\isa{{\isachardoublequote}margin\ {\isacharequal}\ nat{\isachardoublequote}} and \isa{{\isachardoublequote}indent\ {\isacharequal}\ nat{\isachardoublequote}}] change the
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   346
  margin or indentation for pretty printing of display material.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   347
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   348
  \item[\isa{{\isachardoublequote}source\ {\isacharequal}\ bool{\isachardoublequote}}] prints the source text of the
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   349
  antiquotation arguments, rather than the actual value.  Note that
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   350
  this does not affect well-formedness checks of \hyperlink{antiquotation.thm}{\mbox{\isa{thm}}}, \hyperlink{antiquotation.term}{\mbox{\isa{term}}}, etc. (only the \hyperlink{antiquotation.text}{\mbox{\isa{text}}} antiquotation admits arbitrary output).
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   351
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   352
  \item[\isa{{\isachardoublequote}goals{\isacharunderscore}limit\ {\isacharequal}\ nat{\isachardoublequote}}] determines the maximum number of
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   353
  goals to be printed.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   354
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   355
  \item[\isa{{\isachardoublequote}locale\ {\isacharequal}\ name{\isachardoublequote}}] specifies an alternative locale
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   356
  context used for evaluating and printing the subsequent argument.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   357
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   358
  \end{descr}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   359
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   360
  For boolean flags, ``\isa{{\isachardoublequote}name\ {\isacharequal}\ true{\isachardoublequote}}'' may be abbreviated as
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   361
  ``\isa{name}''.  All of the above flags are disabled by default,
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   362
  unless changed from ML.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   363
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   364
  \medskip Note that antiquotations do not only spare the author from
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   365
  tedious typing of logical entities, but also achieve some degree of
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   366
  consistency-checking of informal explanations with formal
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   367
  developments: well-formedness of terms and types with respect to the
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   368
  current theory or proof context is ensured here.%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   369
\end{isamarkuptext}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   370
\isamarkuptrue%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   371
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   372
\isamarkupsection{Tagged commands \label{sec:tags}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   373
}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   374
\isamarkuptrue%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   375
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   376
\begin{isamarkuptext}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   377
Each Isabelle/Isar command may be decorated by presentation tags:
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   378
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   379
  \indexouternonterm{tags}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   380
  \begin{rail}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   381
    tags: ( tag * )
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   382
    ;
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   383
    tag: '\%' (ident | string)
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   384
  \end{rail}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   385
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   386
  The tags \isa{{\isachardoublequote}theory{\isachardoublequote}}, \isa{{\isachardoublequote}proof{\isachardoublequote}}, \isa{{\isachardoublequote}ML{\isachardoublequote}} are already
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   387
  pre-declared for certain classes of commands:
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   388
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   389
 \medskip
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   390
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   391
  \begin{tabular}{ll}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   392
    \isa{{\isachardoublequote}theory{\isachardoublequote}} & theory begin/end \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   393
    \isa{{\isachardoublequote}proof{\isachardoublequote}} & all proof commands \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   394
    \isa{{\isachardoublequote}ML{\isachardoublequote}} & all commands involving ML code \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   395
  \end{tabular}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   396
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   397
  \medskip The Isabelle document preparation system (see also
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   398
  \cite{isabelle-sys}) allows tagged command regions to be presented
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   399
  specifically, e.g.\ to fold proof texts, or drop parts of the text
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   400
  completely.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   401
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   402
  For example ``\hyperlink{command.by}{\mbox{\isa{\isacommand{by}}}}~\isa{{\isachardoublequote}{\isacharpercent}invisible\ auto{\isachardoublequote}}'' would
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   403
  cause that piece of proof to be treated as \isa{invisible} instead
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   404
  of \isa{{\isachardoublequote}proof{\isachardoublequote}} (the default), which may be either show or hidden
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   405
  depending on the document setup.  In contrast, ``\hyperlink{command.by}{\mbox{\isa{\isacommand{by}}}}~\isa{{\isachardoublequote}{\isacharpercent}visible\ auto{\isachardoublequote}}'' would force this text to be shown
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   406
  invariably.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   407
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   408
  Explicit tag specifications within a proof apply to all subsequent
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   409
  commands of the same level of nesting.  For example, ``\hyperlink{command.proof}{\mbox{\isa{\isacommand{proof}}}}~\isa{{\isachardoublequote}{\isacharpercent}visible\ {\isasymdots}{\isachardoublequote}}~\hyperlink{command.qed}{\mbox{\isa{\isacommand{qed}}}}'' would force the
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   410
  whole sub-proof to be typeset as \isa{visible} (unless some of its
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   411
  parts are tagged differently).%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   412
\end{isamarkuptext}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   413
\isamarkuptrue%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   414
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   415
\isamarkupsection{Draft presentation%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   416
}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   417
\isamarkuptrue%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   418
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   419
\begin{isamarkuptext}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   420
\begin{matharray}{rcl}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   421
    \indexdef{}{command}{display\_drafts}\hypertarget{command.display-drafts}{\hyperlink{command.display-drafts}{\mbox{\isa{\isacommand{display{\isacharunderscore}drafts}}}}}\isa{{\isachardoublequote}\isactrlsup {\isacharasterisk}{\isachardoublequote}} & : & \isarkeep{\cdot} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   422
    \indexdef{}{command}{print\_drafts}\hypertarget{command.print-drafts}{\hyperlink{command.print-drafts}{\mbox{\isa{\isacommand{print{\isacharunderscore}drafts}}}}}\isa{{\isachardoublequote}\isactrlsup {\isacharasterisk}{\isachardoublequote}} & : & \isarkeep{\cdot} \\
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   423
  \end{matharray}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   424
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   425
  \begin{rail}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   426
    ('display\_drafts' | 'print\_drafts') (name +)
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   427
    ;
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   428
  \end{rail}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   429
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   430
  \begin{descr}
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   431
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   432
  \item [\hyperlink{command.display-drafts}{\mbox{\isa{\isacommand{display{\isacharunderscore}drafts}}}}~\isa{paths} and \hyperlink{command.print-drafts}{\mbox{\isa{\isacommand{print{\isacharunderscore}drafts}}}}~\isa{paths}] perform simple output of a given list
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   433
  of raw source files.  Only those symbols that do not require
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   434
  additional {\LaTeX} packages are displayed properly, everything else
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   435
  is left verbatim.
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   436
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   437
  \end{descr}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   438
\end{isamarkuptext}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   439
\isamarkuptrue%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   440
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   441
\isadelimtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   442
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   443
\endisadelimtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   444
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   445
\isatagtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   446
\isacommand{end}\isamarkupfalse%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   447
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   448
\endisatagtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   449
{\isafoldtheory}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   450
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   451
\isadelimtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   452
%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   453
\endisadelimtheory
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   454
\isanewline
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   455
\end{isabellebody}%
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   456
%%% Local Variables:
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   457
%%% mode: latex
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   458
%%% TeX-master: "root"
8fcf19f2168b updated generated file;
wenzelm
parents:
diff changeset
   459
%%% End: