clarified document export names;
authorwenzelm
Tue, 25 May 2021 23:37:32 +0200
changeset 73785 b5fb99b985b4
parent 73784 04d39959d1e6
child 73786 18d80cd51823
clarified document export names;
src/Pure/Thy/document_build.scala
src/Pure/Thy/export.scala
src/Pure/Thy/thy_info.ML
src/Pure/Tools/build_job.scala
--- a/src/Pure/Thy/document_build.scala	Tue May 25 23:18:29 2021 +0200
+++ b/src/Pure/Thy/document_build.scala	Tue May 25 23:37:32 2021 +0200
@@ -218,7 +218,7 @@
       for (name <- document_theories)
       yield {
         val path = Path.basic(tex_name(name))
-        val xml = YXML.parse_body(get_export(name.theory, document_tex_name(name)).text)
+        val xml = YXML.parse_body(get_export(name.theory, Export.DOCUMENT_LATEX).text)
         val content = Latex.output(xml, file_pos = name.path.implode_symbolic)
         Content(path, content)
       }
@@ -426,7 +426,6 @@
   /* build documents */
 
   def tex_name(name: Document.Node.Name): String = name.theory_base_name + ".tex"
-  def document_tex_name(name: Document.Node.Name): String = Export.DOCUMENT_PREFIX + tex_name(name)
 
   class Build_Error(val log_lines: List[String], val message: String)
     extends Exn.User_Error(message)
--- a/src/Pure/Thy/export.scala	Tue May 25 23:18:29 2021 +0200
+++ b/src/Pure/Thy/export.scala	Tue May 25 23:37:32 2021 +0200
@@ -20,7 +20,8 @@
   val MARKUP = "PIDE/markup"
   val MESSAGES = "PIDE/messages"
   val DOCUMENT_PREFIX = "document/"
-  val CITATIONS = DOCUMENT_PREFIX + "citations"
+  val DOCUMENT_LATEX = DOCUMENT_PREFIX + "latex"
+  val DOCUMENT_CITATIONS = DOCUMENT_PREFIX + "citations"
   val THEORY_PREFIX: String = "theory/"
   val PROOFS_PREFIX: String = "proofs/"
 
--- a/src/Pure/Thy/thy_info.ML	Tue May 25 23:18:29 2021 +0200
+++ b/src/Pure/Thy/thy_info.ML	Tue May 25 23:37:32 2021 +0200
@@ -30,14 +30,6 @@
 
 (** theory presentation **)
 
-(* artefact names *)
-
-fun document_name ext thy =
-  Path.explode_binding0 ("document/" ^ Context.theory_name thy ^ "." ^ ext);
-
-val document_tex_name = document_name "tex";
-
-
 (* hook for consolidated theory *)
 
 type presentation_context =
@@ -77,9 +69,8 @@
         else
           let
             val thy_name = Context.theory_name thy;
-            val document_tex_name = document_tex_name thy;
             val latex = Latex.isabelle_body thy_name body;
-          in Export.export thy document_tex_name latex end
+          in Export.export thy \<^path_binding>\<open>document/latex\<close> latex end
       end));
 
 
--- a/src/Pure/Tools/build_job.scala	Tue May 25 23:18:29 2021 +0200
+++ b/src/Pure/Tools/build_job.scala	Tue May 25 23:37:32 2021 +0200
@@ -384,7 +384,7 @@
             export(Export.MESSAGES, snapshot.messages.map(_._1))
 
             val citations = Library.distinct(rendering.citations(Text.Range.full).map(_.info))
-            export_text(Export.CITATIONS, cat_lines(citations))
+            export_text(Export.DOCUMENT_CITATIONS, cat_lines(citations))
         }
 
       session.all_messages += Session.Consumer[Any]("build_session_output")