src/Pure/Thy/document_antiquotations.ML
changeset 73753 d4202c13bfba
parent 73752 eeb076fc569f
child 73754 cd7eb3cdab4c
equal deleted inserted replaced
73752:eeb076fc569f 73753:d4202c13bfba
   125       (fn _ => fn () => Latex.string "\\medskip") #>
   125       (fn _ => fn () => Latex.string "\\medskip") #>
   126     Thy_Output.antiquotation_raw \<^binding>\<open>bigskip\<close> (Scan.succeed ())
   126     Thy_Output.antiquotation_raw \<^binding>\<open>bigskip\<close> (Scan.succeed ())
   127       (fn _ => fn () => Latex.string "\\bigskip"));
   127       (fn _ => fn () => Latex.string "\\bigskip"));
   128 
   128 
   129 
   129 
   130 (* control style *)
   130 (* nested document text *)
   131 
   131 
   132 local
   132 local
   133 
   133 
   134 fun control_antiquotation name s1 s2 =
   134 fun nested_antiquotation name s1 s2 =
   135   Thy_Output.antiquotation_raw_embedded name (Scan.lift Args.cartouche_input)
   135   Thy_Output.antiquotation_raw_embedded name (Scan.lift Args.cartouche_input)
   136     (fn ctxt => fn txt =>
   136     (fn ctxt => fn txt =>
   137       (Context_Position.reports ctxt (Thy_Output.document_reports txt);
   137       (Context_Position.reports ctxt (Thy_Output.document_reports txt);
   138         Latex.enclose_block s1 s2 (Thy_Output.output_document ctxt {markdown = false} txt)));
   138         Latex.enclose_block s1 s2 (Thy_Output.output_document ctxt {markdown = false} txt)));
   139 
   139 
   140 in
   140 in
   141 
   141 
   142 val _ =
   142 val _ =
   143   Theory.setup
   143   Theory.setup
   144    (control_antiquotation \<^binding>\<open>footnote\<close> "\\footnote{" "}" #>
   144    (nested_antiquotation \<^binding>\<open>footnote\<close> "\\footnote{" "}" #>
   145     control_antiquotation \<^binding>\<open>emph\<close> "\\emph{" "}" #>
   145     nested_antiquotation \<^binding>\<open>emph\<close> "\\emph{" "}" #>
   146     control_antiquotation \<^binding>\<open>bold\<close> "\\textbf{" "}");
   146     nested_antiquotation \<^binding>\<open>bold\<close> "\\textbf{" "}");
   147 
   147 
   148 end;
   148 end;
   149 
   149 
   150 
   150 
   151 (* quasi-formal text (unchecked) *)
   151 (* quasi-formal text (unchecked) *)
   201     theory_text_antiquotation);
   201     theory_text_antiquotation);
   202 
   202 
   203 end;
   203 end;
   204 
   204 
   205 
   205 
   206 
       
   207 
       
   208 (* goal state *)
   206 (* goal state *)
   209 
   207 
   210 local
   208 local
   211 
   209 
   212 fun goal_state name main =
   210 fun goal_state name main =