Heya, I’m using Mendeley for citations in web app. In the desktop Mendely suite, you can update referenced article’s metadata by syncing with PubMed database. This feature works really well and fixes a lot of problems in spelling etc. But for many papers it also includes a full stop at the end of the paper name. When these papers get synced to typst, they break the referencing as the reference name cannot end with a dot. Currently I manually delete the dot in Mendeley for each paper, but obviously would appreciate an automated solution. I wonder if typst could be made to handle paper names ending with a dot? Or if there is another solution I’m not aware of?
It is not possible use the @name
syntax if the label ends with a dot. Instead, you can use #cite(<name>)
(and #ref(<name>)
.
If you need to include special characters not supported by the <>
label syntax, you can use #cite(label("name"))
(and #ref(label("name"))
).
To automate the dot removal, you could in theory read
the bibliography file, remove the dots with regex
replacement and then pass the resulting string to bibliography
through bytes(..)
. Since you already have Typst Pro, that would be a good opportunity for a private package.
2 Likes