more bibtex fields;
authorwenzelm
Thu, 02 May 2019 14:31:22 +0200
changeset 70230 8ba266889dee
parent 70229 c03f381fd373
child 70231 cdbc8d92c349
more bibtex fields;
src/Pure/Thy/bibtex.scala
--- a/src/Pure/Thy/bibtex.scala	Thu May 02 14:05:59 2019 +0200
+++ b/src/Pure/Thy/bibtex.scala	Thu May 02 14:31:22 2019 +0200
@@ -240,11 +240,17 @@
     optional_crossref: List[String],
     optional_other: List[String])
   {
+    val optional_standard: List[String] = List("url", "doi", "ee")
+
     def is_required(s: String): Boolean = required.contains(s.toLowerCase)
     def is_optional(s: String): Boolean =
-      optional_crossref.contains(s.toLowerCase) || optional_other.contains(s.toLowerCase)
+      optional_crossref.contains(s.toLowerCase) ||
+      optional_other.contains(s.toLowerCase) ||
+      optional_standard.contains(s.toLowerCase)
 
-    def fields: List[String] = required ::: optional_crossref ::: optional_other
+    def fields: List[String] =
+      required ::: optional_crossref ::: optional_other ::: optional_standard
+
     def template: String =
       "@" + kind + "{,\n" + fields.map(x => "  " + x + " = {},\n").mkString + "}\n"
   }