-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot specify PMID/PMCID through BibLaTeX input #260
Comments
The PMID/PMCID fields are not supported in biblatex (or bibtex). See (§3.14.7 of the biblatex documentation for how you should encode this in biblatex. Your example works fine if you write a hayagriva file directly. |
Thanks for the quick fix and response! I can confirm I'm able to include PMID and PMCIDs when using a haragriva file. To note for you and/or future users:
TLDR: Both PMID and PMCIDs should be added to |
I noticed another small problem. Please let me know if I should rename this issue to something more generic or create a new issue. In Okay, hopefully that's all the small pain points! Thanks again, using Typst for my application would be quite nice. |
Happy to help!
I think opening a new issue for this would be good. That seems like a more generell issue. |
As was observed, the hayagriva file format does support including PMID and PMCID separately as part of test_article:
type: article
title: Title
author: Doe, Jane
date: 2024-12
page-range: 1–99
url: https://example.org/
serial-number:
pmcid: PMC3985
pmid: 54678
parent:
type: periodical
title: Testing Journal
volume: 3 ...causes the PMID and PMCID to be properly displayed and picked up by the styles. So the problem is strictly related to conversion from
If I understood correctly from my initial research, using However, the BibLaTeX standard does not mention anything about PMCID either, which is interesting (noting that consequently zotero-betterbibtex, near the linked snippet, does not translate the PMCID field at all). We'd have to consider that, and perhaps add an exception to
Technically, this can be ignored by users of hayagriva. Indeed, adding the following show rule to your Typst example, before the bibliography, strips the hyperlinks from the bibliography's output, so you can use this: #show bibliography: it => {
show link: it => it.body
it
}
#bibliography(...) |
I'll keep this open while we decide regarding the inclusion of the non-standard PMID and PMCID fields. However, it is at least now possible to cite from PubMed sources and have styles recognize the PMID, according to the BibLaTeX standard, with @article{test_article,
title = {Title},
volume = {3},
url = {https://example.org},
pages = {1--99},
journaltitle = {Testing Journal},
author = {Doe, Jane},
date = {2024-12},
eprint = {54678},
eprinttype = {pubmed},
} |
Thank you both for the work on this! I finally had a chance to try it out, using both Hayagriva CLI v0.8.1 and Typst release candidate 0.13.0. Both now work as expected.
Oh, and thanks for the code snippet re stripping hyperlinks in Typst. It still does feel odd to me that the 'backend' bibliography tool would apply its own formatting outside of what's defined in a user-provided CSL. Not to nit-pick; it's only b/c having 'hidden' (clickable and/or not full url) external links in official grant submissions can hypothetically flag your application (you're not allowed to provide information outside the page limits, security concerns, etc.). So I'd say not linking by default would make more sense. Otherwise than that and however you decide to handle the odd PMCID case, this looks good to me! |
Hi,
Some scientific grants require PMCID or PMID fields in citations. They are defined as standard variables in the CSL spec. Zotero provides a nice CSL for NLM grant proposals that works fine creating a bib with its GUI.
However, PMCID/PMIDs are not shown when using the above CSL file in Typst. I've tried in the online app (example: https://typst.app/project/rFgaiSlKEcITlBZVkRVwkD), and locally using Typst version 0.12.0.
Seems related to #91 and #162. My naive take... the respective variables are defined in src/csl/taxonomy.rs, but not in src/interop.rs.
Thanks for all the dev effort! Please let me know if you need any more info.
The text was updated successfully, but these errors were encountered: