Closed yochem closed 9 months ago
It would also be nice if the DOI can be generated from the serial-number.arxiv
field, since its format is just https://doi.org/10.48550/arXiv.<serial-number.arxiv>
.
CSL/Zotero assumes the name of archive is stored in the publisher
field (see https://aurimasv.github.io/z2csl/typeMap.xml#map-preprint). The current version of hayagriva doesn't look into the parent for the publisher
field. I've made a try to fix in cb09ac4.
Would it be possible to automatically set that when the entry contains serial-number.arxiv
? Just like the DOI?
Would it be possible to automatically set that when the entry contains
serial-number.arxiv
? Just like the DOI?
I'm afraid it's not possible for CSL. The archive name and ID are plain fields in CSL's data model and CSL cannot make special processing for arXiv articles.
And if we would change the function https://github.com/typst/hayagriva/blob/3e92ac83837914a0f1feeff63e50ed2faa1577a6/src/lib.rs#L717-L719
to be
pub fn set_arxiv(&mut self, arxiv: String) {
self.set_keyed_serial_number("arxiv", arxiv);
self.set_keyed_serial_number("doi", "10.48550/arXiv.{arxiv}"); // I don't know how to write this in rust
}
It seems to me that in that case, the doi key would also be set, resulting in the DOI being included in the reference. Or is that not how the code works?
Edit: doesn't seem to work
The following example reference: https://github.com/typst/hayagriva/blob/main/tests/data/basic.yml#L252-L261
Thus gives as result: Pedbost, M. F., Pomalgu, T., Lintott, C., Eisner, N., & Nicholson, B. (2020). Defining the Really Habitable Zone (2003.13722). https://arxiv.org/abs/2003.13722
But according to the APA style guide, it should be:
Pedbost, M. F., Pomalgu, T., Lintott, C., Eisner, N., & Nicholson, B. (2020). Defining the Really Habitable Zone. ArXiv. https://arxiv.org/abs/2003.13722