texworld / betterbib

:green_book: Command-line tools for bibliographies.
818 stars 42 forks source link

Handle of MathMl in bib file #255

Closed nujabse closed 10 months ago

nujabse commented 2 years ago

Some references will have very long MathML codes when exported using crossref, see the example:

@article{berlijn17_itiner_antif_ruo2,
 author = {Berlijn, T. and Snijders, P. C. and Delaire, O. and Zhou, H.-D. and Maier, T. A. and Cao, H.-B. and Chi, S.-X. and Matsuda, M. and Wang, Y. and Koehler, M. R. and Kent, P. R. C. and Weitering, H. H.},
 title = {Itinerant Antiferromagnetism in \ensuremath{<}mml:math {xmlns:mml=''http://www.w3.org/1998/Math/MathML''} {display=''inline''\ensuremath{>}\ensuremath{<}mml:mrow\ensuremath{>}\ensuremath{<}mml:msub\ensuremath{>}\ensuremath{<}mml:mrow\ensuremath{>}\ensuremath{<}mml:mi\ensuremath{>}RuO\ensuremath{<}/mml:mi\ensuremath{>}\ensuremath{<}/mml:mrow\ensuremath{>}\ensuremath{<}mml:mrow\ensuremath{>}\ensuremath{<}mml:mn\ensuremath{>}2\ensuremath{<}/mml:mn\ensuremath{>}\ensuremath{<}/mml:mrow\ensuremath{>}\ensuremath{<}/mml:msub\ensuremath{>}\ensuremath{<}/mml:mrow\ensuremath{>}\ensuremath{<}/mml:math\ensuremath{>}}},
 journal = {Phys. Rev. Lett.},
 volume = {118},
 number = {7},
 pages = {077201},
 year = {2017},
 doi = {10.1103/physrevlett.118.077201},
 url = {https://doi.org/10.1103/physrevlett.118.077201},
 date_added = {Tue Dec 21 19:27:18 2021},
 source = {Crossref},
 publisher = {American Physical Society (APS)},
 issn = {0031-9007, 1079-7114},
 month = feb,
}

It can be quite annoying if using this exported bib entry. Can betterbib convert the MathMl codes to normal latex codes?

nschloe commented 1 year ago

This is something that comes from crossref, see https://api.crossref.org/v1/works/10.1103/physrevlett.118.077201. Betterbib can't do anything about it right now.

Adding a MathML-to-LaTeX converter would be a major undertaking, and I'm not sure if it's worth it.

Let's keep this issue open. If it receives some upvotes in the next, say 12 months, I'll consider it.

nschloe commented 10 months ago

Let's close this for now; feel free to upvote/comment if you're also interested in the feature.