src/Doc/Isar_Ref/Document_Preparation.thy
changeset 62274 199f4d6dab0a
parent 61997 4d9518c3d031
child 62912 745d31e63c21
equal deleted inserted replaced
62273:443256a20033 62274:199f4d6dab0a
   407   of the above flags are disabled by default, unless changed specifically for
   407   of the above flags are disabled by default, unless changed specifically for
   408   a logic session in the corresponding \<^verbatim>\<open>ROOT\<close> file.
   408   a logic session in the corresponding \<^verbatim>\<open>ROOT\<close> file.
   409 \<close>
   409 \<close>
   410 
   410 
   411 
   411 
       
   412 section \<open>Markdown-like text structure\<close>
       
   413 
       
   414 text \<open>
       
   415   The markup commands @{command_ref text}, @{command_ref txt}, @{command_ref
       
   416   text_raw} (\secref{sec:markup}) consist of plain text. Its internal
       
   417   structure consists of paragraphs and (nested) lists, using special Isabelle
       
   418   symbols and some rules for indentation and blank lines. This quasi-visual
       
   419   format resembles \<^emph>\<open>Markdown\<close>\<^footnote>\<open>@{url "http://commonmark.org"}\<close>, but the
       
   420   full complexity of that notation is avoided.
       
   421 
       
   422   This is a summary of the main principles of minimal Markdown in Isabelle:
       
   423 
       
   424     \<^item> List items start with the following markers
       
   425       \<^descr>[itemize:] \<^verbatim>\<open>\<^item>\<close>
       
   426       \<^descr>[enumerate:] \<^verbatim>\<open>\<^enum>\<close>
       
   427       \<^descr>[description:] \<^verbatim>\<open>\<^descr>\<close>
       
   428 
       
   429     \<^item> Adjacent list items with same indentation and same marker are grouped
       
   430     into a single list.
       
   431 
       
   432     \<^item> Singleton blank lines separate paragraphs.
       
   433 
       
   434     \<^item> Multiple blank lines escape from the current list hierarchy.
       
   435 
       
   436   Notable differences to official Markdown:
       
   437 
       
   438     \<^item> Indentation of list items needs to match exactly.
       
   439 
       
   440     \<^item> Indentation is unlimited (official Markdown interprets four spaces as
       
   441     block quote).
       
   442 
       
   443     \<^item> List items always consist of paragraphs --- there is no notion of
       
   444     ``tight'' list.
       
   445 
       
   446     \<^item> Section headings are expressed via Isar document markup commands
       
   447     (\secref{sec:markup}).
       
   448 
       
   449     \<^item> URLs, font styles, other special content is expressed via antiquotations
       
   450     (\secref{sec:antiq}), usually with proper nesting of sub-languages via
       
   451     text cartouches.
       
   452 \<close>
       
   453 
       
   454 
   412 section \<open>Markup via command tags \label{sec:tags}\<close>
   455 section \<open>Markup via command tags \label{sec:tags}\<close>
   413 
   456 
   414 text \<open>
   457 text \<open>
   415   Each Isabelle/Isar command may be decorated by additional presentation tags,
   458   Each Isabelle/Isar command may be decorated by additional presentation tags,
   416   to indicate some modification in the way it is printed in the document.
   459   to indicate some modification in the way it is printed in the document.