--- a/src/Pure/Thy/sessions.scala Sat Nov 14 17:29:37 2020 +0100
+++ b/src/Pure/Thy/sessions.scala Sun Nov 15 17:34:19 2020 +0100
@@ -511,7 +511,7 @@
case s => Some(dir + Path.explode(s))
}
- def bibtex_entries: List[Text.Info[String]] =
+ lazy val bibtex_entries: List[Text.Info[String]] =
(for {
(document_dir, file) <- document_files.iterator
if Bibtex.is_bibtex(file.file_name)
@@ -804,6 +804,13 @@
def imports_requirements(ss: List[String]): List[String] = imports_graph.all_preds_rev(ss)
def imports_topological_order: List[String] = imports_graph.topological_order
+ def bibtex_entries: List[(String, List[String])] =
+ build_topological_order.flatMap(name =>
+ apply(name).bibtex_entries match {
+ case Nil => None
+ case entries => Some(name -> entries.map(_.info))
+ })
+
override def toString: String =
imports_graph.keys_iterator.mkString("Sessions.Structure(", ", ", ")")
}