src/Pure/Thy/html.scala
changeset 65838 30c2d78b5d38
parent 65836 3b4877fbd9cb
child 65891 586911118317
--- a/src/Pure/Thy/html.scala	Sun May 14 21:56:58 2017 +0200
+++ b/src/Pure/Thy/html.scala	Sun May 14 22:04:52 2017 +0200
@@ -157,12 +157,22 @@
         output(XML.elem("head", head_meta :: (if (css == "") Nil else List(head_css(css))) ::: head)),
         output(XML.elem("body", body))))
 
+
+  /* document directory */
+
   def init_dir(dir: Path)
   {
     Isabelle_System.mkdirs(dir)
     File.copy(Path.explode("~~/etc/isabelle.css"), dir)
   }
 
+  def write_document(dir: Path, name: String, head: XML.Body, body: XML.Body,
+    css: String = "isabelle.css")
+  {
+    init_dir(dir)
+    File.write(dir + Path.basic(name), output_document(head, body, css))
+  }
+
 
   /* Isabelle document */