hayagriva icon indicating copy to clipboard operation
hayagriva copied to clipboard

Parse common latex commands in titles

Open alxsimon opened this issue 1 year ago • 4 comments

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

alxsimon avatar Dec 06 '23 23:12 alxsimon

related issue pointed out in the discord chat https://github.com/typst/typst/issues/2761 https://github.com/typst/typst/issues/1975

alxsimon avatar Dec 07 '23 00:12 alxsimon

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.

alxsimon avatar Dec 07 '23 00:12 alxsimon

In this case, the solution concerns multiple crates: biblatex has to parse commands and store that information, hayagriva has to render them correctly.

DerDrodt avatar Dec 07 '23 10:12 DerDrodt