brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
955 stars 101 forks source link

*.bib processing problem #404

Closed kohlhase closed 11 years ago

kohlhase commented 11 years ago

[Originally Ticket 1728]

title: *.bib processing problem

When processing a bibliography key with an underscore, then we get an error,

@InProceedings{   tudoracheetal:webprotege_2011,
  author    = {Tudorache, Tania and Noy, Natalya F. and Falconer, Sean M.
          and Musen, Mark A.},
  title     = {A knowledge base driven user interface for collaborative
          ontology development},
  booktitle = {Proceedings of the 16th international conference on
          Intelligent user interfaces},
  series    = {IUI '11},
  year      = {2011},
  isbn      = {978-1-4503-0419-1},
  location  = {Palo Alto, CA, USA},
  pages     = {411--414},
  numpages  = {4},
  url       = {http://doi.acm.org/10.1145/1943403.1943478},
  doi       = {10.1145/1943403.1943478},
  acmid     = {1943478},
  publisher = {ACM},
  address   = {New York, NY, USA},
  keywords  = {configuration, declarative user interface, knowledge base
          interfaces, model-based user interface, reuse, roles,
          web-based user interface}
}

we get the error

Error:unexpected:_ Script _ can only appear in math mode
    Anonymous String#textrange(from=0;1,to=0;0)
    In _ from TeX.pool.ltxml line 3060
     <= Stomach[@0x100d39198] <= \bib@@field {}OptionalKeyVals Digested <= Stomach[@0x100d39198] <= ...

what is worse, it does not have a usable line number.

brucemiller commented 11 years ago

So, if I save the above as "underscore.bib", and then run the attached document as:

latexml --dest=underscore.bib.xml underscore.bib
latexml --dest=citeunderscore.xml citeunderscore
latexmlpost --dest=citeunderscore.xhtml --bib=underscore.bib.xml citeunderscore

I get a reasonable result, with no errors.

If you get errors, or if I've misunderstood the scenario, please reopen. Thanks;