src/Pure/Thy/document_build.scala
changeset 77025 34219d664854
parent 77018 5292286908a4
child 77173 f1063cdb0093
equal deleted inserted replaced
77024:6e90e84f7e7c 77025:34219d664854
   238         val body =
   238         val body =
   239           if (selected) {
   239           if (selected) {
   240             val entry = session_context(name.theory, Export.DOCUMENT_LATEX, permissive = true)
   240             val entry = session_context(name.theory, Export.DOCUMENT_LATEX, permissive = true)
   241             YXML.parse_body(entry.text)
   241             YXML.parse_body(entry.text)
   242           }
   242           }
   243           else Nil
   243           else {
       
   244             val text =
       
   245               proper_string(session_context.theory_source(name.theory)) getOrElse
       
   246                 File.read(name.path)
       
   247             (for {
       
   248               outer <- Bibtex.Cite.parse(Bibtex.cite_commands(options), text)
       
   249               inner <- outer.parse
       
   250             } yield inner.nocite.latex_text).flatten
       
   251           }
   244 
   252 
   245         def line_pos(props: Properties.T): Option[Int] =
   253         def line_pos(props: Properties.T): Option[Int] =
   246           Position.Line.unapply(props) orElse {
   254           Position.Line.unapply(props) orElse {
   247             if (selected) {
   255             if (selected) {
   248               for {
   256               for {