src/Doc/Tutorial/Documents/Documents.thy
changeset 58869 963fd2084e8f
parent 58868 c5e1cce7ace3
child 59005 1c54ebc68394
equal deleted inserted replaced
58868:c5e1cce7ace3 58869:963fd2084e8f
   435   \medskip The following source fragment illustrates structure markup
   435   \medskip The following source fragment illustrates structure markup
   436   of a theory.  Note that {\LaTeX} labels may be included inside of
   436   of a theory.  Note that {\LaTeX} labels may be included inside of
   437   section headings as well.
   437   section headings as well.
   438 
   438 
   439   \begin{ttbox}
   439   \begin{ttbox}
   440   header {\ttlbrace}* Some properties of Foo Bar elements *{\ttrbrace}
   440   section {\ttlbrace}* Some properties of Foo Bar elements *{\ttrbrace}
   441 
   441 
   442   theory Foo_Bar
   442   theory Foo_Bar
   443   imports Main
   443   imports Main
   444   begin
   444   begin
   445 
   445 
   457   subsection {\ttlbrace}* Main theorem {\ttback}label{\ttlbrace}sec:main-theorem{\ttrbrace} *{\ttrbrace}
   457   subsection {\ttlbrace}* Main theorem {\ttback}label{\ttlbrace}sec:main-theorem{\ttrbrace} *{\ttrbrace}
   458 
   458 
   459   theorem main: \dots
   459   theorem main: \dots
   460 
   460 
   461   end
   461   end
   462   \end{ttbox}\vspace{-\medskipamount}
   462   \end{ttbox}
   463 
       
   464   You may occasionally want to change the meaning of markup commands,
       
   465   say via \verb,\renewcommand, in \texttt{root.tex}.  For example,
       
   466   \verb,\isamarkupheader, is a good candidate for some tuning.  We
       
   467   could move it up in the hierarchy to become \verb,\chapter,.
       
   468 
       
   469 \begin{verbatim}
       
   470   \renewcommand{\isamarkupheader}[1]{\chapter{#1}}
       
   471 \end{verbatim}
       
   472 
       
   473   \noindent Now we must change the document class given in
       
   474   \texttt{root.tex} to something that supports chapters.  A suitable
       
   475   command is \verb,\documentclass{report},.
       
   476 
       
   477   \medskip The {\LaTeX} macro \verb,\isabellecontext, is maintained to
       
   478   hold the name of the current theory context.  This is particularly
       
   479   useful for document headings:
       
   480 
       
   481 \begin{verbatim}
       
   482   \renewcommand{\isamarkupheader}[1]
       
   483   {\chapter{#1}\markright{THEORY~\isabellecontext}}
       
   484 \end{verbatim}
       
   485 
       
   486   \noindent Make sure to include something like
       
   487   \verb,\pagestyle{headings}, in \texttt{root.tex}; the document
       
   488   should have more than two pages to show the effect.
       
   489 *}
   463 *}
   490 
   464 
   491 
   465 
   492 subsection {* Formal Comments and Antiquotations \label{sec:doc-prep-text} *}
   466 subsection {* Formal Comments and Antiquotations \label{sec:doc-prep-text} *}
   493 
   467