hayagriva
hayagriva copied to clipboard
Parse common latex commands in titles
Hi, it would be great if latex commands could be parsed in bibtex file titles (and maybe other fields too). My use case is species names.
An example of a citation in bibtex format, autogenerated by better-biblatex Zotero extension:
@article{Simon2022,
title = {Three New Genome Assemblies of Blue Mussel Lineages: {{North}} and {{South European}} {{{\emph{Mytilus edulis}}}} and {{Mediterranean}} {{{\emph{Mytilus galloprovincialis}}}}},
shorttitle = {Three New Genome Assemblies of Blue Mussel Lineages},
author = {Simon, Alexis},
date = {2022-09-04},
journaltitle = {bioRxiv},
doi = {10.1101/2022.09.02.506387},
langid = {english},
}
Which gives me this result in typst: A. Simon, “Three New Genome Assemblies of Blue Mussel Lineages: North and South European \emph{Mytilus edulis} and Mediterranean \emph{Mytilus galloprovincialis}”, bioRxiv, Sep. 2022, doi: 10.1101/2022.09.02.506387.
Fields that could be parsed \emph, \textit, \textbf
related issue pointed out in the discord chat https://github.com/typst/typst/issues/2761 https://github.com/typst/typst/issues/1975
Feel free to move this issue to https://github.com/typst/biblatex/issues, I have no idea in which repository it is most relevant sorry.
In this case, the solution concerns multiple crates: biblatex has to parse commands and store that information, hayagriva has to render them correctly.