equal
deleted
inserted
replaced
648 text_antiquotation @{binding cartouche}); |
648 text_antiquotation @{binding cartouche}); |
649 |
649 |
650 end; |
650 end; |
651 |
651 |
652 |
652 |
|
653 (* theory text with tokens (unchecked) *) |
|
654 |
|
655 val _ = |
|
656 Theory.setup |
|
657 (antiquotation @{binding theory_text} (Scan.lift Args.text_input) |
|
658 (fn {context = ctxt, ...} => fn source => |
|
659 let |
|
660 val _ = |
|
661 Context_Position.report ctxt (Input.pos_of source) |
|
662 (Markup.language_outer (Input.is_delimited source)); |
|
663 |
|
664 val keywords = Thy_Header.get_keywords' ctxt; |
|
665 val toks = |
|
666 Source.of_list (Input.source_explode source) |
|
667 |> Token.source' true keywords |
|
668 |> Source.exhaust; |
|
669 val _ = Context_Position.reports_text ctxt (maps (Token.reports keywords) toks); |
|
670 in |
|
671 implode (map Latex.output_token toks) |
|
672 |> (if Config.get ctxt display then Latex.environment "isabelle" else enclose "\\isa{" "}") |
|
673 end)); |
|
674 |
|
675 |
653 (* basic entities *) |
676 (* basic entities *) |
654 |
677 |
655 local |
678 local |
656 |
679 |
657 fun basic_entities name scan pretty = |
680 fun basic_entities name scan pretty = |