src/Pure/Thy/html.scala
changeset 65838 30c2d78b5d38
parent 65836 3b4877fbd9cb
child 65891 586911118317
equal deleted inserted replaced
65837:9ee6a8d4499b 65838:30c2d78b5d38
   155     cat_lines(
   155     cat_lines(
   156       List(header,
   156       List(header,
   157         output(XML.elem("head", head_meta :: (if (css == "") Nil else List(head_css(css))) ::: head)),
   157         output(XML.elem("head", head_meta :: (if (css == "") Nil else List(head_css(css))) ::: head)),
   158         output(XML.elem("body", body))))
   158         output(XML.elem("body", body))))
   159 
   159 
       
   160 
       
   161   /* document directory */
       
   162 
   160   def init_dir(dir: Path)
   163   def init_dir(dir: Path)
   161   {
   164   {
   162     Isabelle_System.mkdirs(dir)
   165     Isabelle_System.mkdirs(dir)
   163     File.copy(Path.explode("~~/etc/isabelle.css"), dir)
   166     File.copy(Path.explode("~~/etc/isabelle.css"), dir)
       
   167   }
       
   168 
       
   169   def write_document(dir: Path, name: String, head: XML.Body, body: XML.Body,
       
   170     css: String = "isabelle.css")
       
   171   {
       
   172     init_dir(dir)
       
   173     File.write(dir + Path.basic(name), output_document(head, body, css))
   164   }
   174   }
   165 
   175 
   166 
   176 
   167   /* Isabelle document */
   177   /* Isabelle document */
   168 
   178