src/Pure/Tools/bibtex.scala
changeset 67256 ce7d856680d1
parent 67251 573077aa2826
child 67257 5035b6754fca
--- a/src/Pure/Tools/bibtex.scala	Fri Dec 22 15:49:44 2017 +0100
+++ b/src/Pure/Tools/bibtex.scala	Fri Dec 22 16:10:48 2017 +0100
@@ -503,6 +503,7 @@
       "unsortlist" -> "html-u")
 
   def html_output(bib: List[Path],
+    title: String = "Bibliography",
     body: Boolean = false,
     citations: List[String] = List("*"),
     style: String = "empty",
@@ -548,8 +549,9 @@
 
       Isabelle_System.bash(
         "\"$BIB2XHTML_HOME/main/bib2xhtml.pl\" -B \"$ISABELLE_BIBTEX\"" +
-          " -u -s " + Bash.string(style) + (if (chronological) " -c " else " ") +
-          File.bash_path(in_file) + " " + File.bash_path(out_file),
+          " -u -s " + Bash.string(style) + (if (chronological) " -c" else "") +
+          (if (title != "") " -h " + Bash.string(title) + " " else "") +
+          " " + File.bash_path(in_file) + " " + File.bash_path(out_file),
         cwd = tmp_dir.file).check
 
       val html = File.read(tmp_dir + out_file)
@@ -563,12 +565,4 @@
       else html
     })
   }
-
-  def present(snapshot: Document.Snapshot): String =
-  {
-    Isabelle_System.with_tmp_file("bib", "bib") { bib =>
-      File.write(bib, snapshot.node.source)
-      html_output(List(bib), style = "unsort")
-    }
-  }
 }