24 \begin{matharray}{rcl} |
24 \begin{matharray}{rcl} |
25 @{command_def "chapter"} & : & @{text "any \<rightarrow> any"} \\ |
25 @{command_def "chapter"} & : & @{text "any \<rightarrow> any"} \\ |
26 @{command_def "section"} & : & @{text "any \<rightarrow> any"} \\ |
26 @{command_def "section"} & : & @{text "any \<rightarrow> any"} \\ |
27 @{command_def "subsection"} & : & @{text "any \<rightarrow> any"} \\ |
27 @{command_def "subsection"} & : & @{text "any \<rightarrow> any"} \\ |
28 @{command_def "subsubsection"} & : & @{text "any \<rightarrow> any"} \\ |
28 @{command_def "subsubsection"} & : & @{text "any \<rightarrow> any"} \\ |
29 @{command_def "text"} & : & @{text "local_theory \<rightarrow> local_theory"} \\ |
29 @{command_def "text"} & : & @{text "any \<rightarrow> any"} \\ |
30 @{command_def "text_raw"} & : & @{text "local_theory \<rightarrow> local_theory"} \\[0.5ex] |
30 @{command_def "txt"} & : & @{text "any \<rightarrow> any"} \\ |
31 @{command_def "txt"} & : & @{text "proof \<rightarrow> proof"} \\ |
31 @{command_def "text_raw"} & : & @{text "any \<rightarrow> any"} \\ |
32 @{command_def "txt_raw"} & : & @{text "proof \<rightarrow> proof"} \\ |
|
33 \end{matharray} |
32 \end{matharray} |
34 |
33 |
35 Markup commands provide a structured way to insert text into the |
34 Markup commands provide a structured way to insert text into the |
36 document generated from a theory. Each markup command takes a |
35 document generated from a theory. Each markup command takes a |
37 single @{syntax text} argument, which is passed as argument to a |
36 single @{syntax text} argument, which is passed as argument to a |
43 markup commands, but have a different status within Isabelle/Isar |
42 markup commands, but have a different status within Isabelle/Isar |
44 syntax. |
43 syntax. |
45 |
44 |
46 @{rail \<open> |
45 @{rail \<open> |
47 (@@{command chapter} | @@{command section} | @@{command subsection} | |
46 (@@{command chapter} | @@{command section} | @@{command subsection} | |
48 @@{command subsubsection} | @@{command text}) @{syntax target}? @{syntax text} |
47 @@{command subsubsection} | @@{command text} | @@{command txt}) |
49 ; |
48 @{syntax target}? @{syntax text} |
50 (@@{command text_raw} | @@{command txt} | @@{command txt_raw}) @{syntax text} |
49 ; |
|
50 @@{command text_raw} @{syntax text} |
51 \<close>} |
51 \<close>} |
52 |
52 |
53 \begin{description} |
53 \begin{description} |
54 |
54 |
55 \item @{command chapter}, @{command section}, @{command subsection}, and |
55 \item @{command chapter}, @{command section}, @{command subsection}, and |
57 theory source; this works in any context, even before the initial |
57 theory source; this works in any context, even before the initial |
58 @{command theory} command. The corresponding {\LaTeX} macros are |
58 @{command theory} command. The corresponding {\LaTeX} macros are |
59 @{verbatim \<open>\isamarkupchapter\<close>}, @{verbatim \<open>\isamarkupsection\<close>}, |
59 @{verbatim \<open>\isamarkupchapter\<close>}, @{verbatim \<open>\isamarkupsection\<close>}, |
60 @{verbatim \<open>\isamarkupsubsection\<close>}, @{verbatim \<open>\isamarkupsubsubsection\<close>}. |
60 @{verbatim \<open>\isamarkupsubsection\<close>}, @{verbatim \<open>\isamarkupsubsubsection\<close>}. |
61 |
61 |
62 \item @{command text} and @{command txt} specify paragraphs of plain |
62 \item @{command text} and @{command txt} specify paragraphs of plain text. |
63 text. This corresponds to a {\LaTeX} environment @{verbatim |
63 This corresponds to a {\LaTeX} environment @{verbatim |
64 \<open>\begin{isamarkuptext}\<close>} @{text "\<dots>"} @{verbatim \<open>\end{isamarkuptext}\<close>} etc. |
64 \<open>\begin{isamarkuptext}\<close>} @{text "\<dots>"} @{verbatim \<open>\end{isamarkuptext}\<close>} |
65 |
65 etc. |
66 \item @{command text_raw} and @{command txt_raw} insert {\LaTeX} |
66 |
67 source into the output, without additional markup. Thus the full |
67 \item @{command text_raw} inserts {\LaTeX} source directly into the |
68 range of document manipulations becomes available, at the risk of |
68 output, without additional markup. Thus the full range of document |
69 messing up document output. |
69 manipulations becomes available, at the risk of messing up document |
|
70 output. |
70 |
71 |
71 \end{description} |
72 \end{description} |
72 |
73 |
73 Except for @{command "text_raw"} and @{command "txt_raw"}, the text |
74 Except for @{command "text_raw"}, the text passed to any of the above |
74 passed to any of the above markup commands may refer to formal |
75 markup commands may refer to formal entities via \emph{document |
75 entities via \emph{document antiquotations}, see also |
76 antiquotations}, see also \secref{sec:antiq}. These are interpreted in the |
76 \secref{sec:antiq}. These are interpreted in the present theory or |
77 present theory or proof context, or the named @{text "target"}. |
77 proof context, or the named @{text "target"}. |
|
78 |
78 |
79 \medskip The proof markup commands closely resemble those for theory |
79 \medskip The proof markup commands closely resemble those for theory |
80 specifications, but have a different formal status and produce |
80 specifications, but have a different formal status and produce |
81 different {\LaTeX} macros. |
81 different {\LaTeX} macros. |
82 \<close> |
82 \<close> |