Closed yuki-tsubaki closed 2 years ago
Thanks for the report! Interestingly enough I couldn't reproduce the issue, the entry was rendered without any problems on my computer (in the default Chicago author-date style). Could you send a full MWE consisting of a short Org document and bibliography? Also, which Emacs, Org and citeproc-el versions are you using?
Sure, this happened on 538fed794c29acf81efee8a2674268bd3d7cc471 (the revision that the most recent release of Doom had it pinned at) and confirmed again using the current revision (as of like two hours ago).
GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-09-19 Org mode version 9.6 (9.6-??-0c9b30e @ /home/pete/.emacs.d/.local/straight/build-27.1/org/)
mwe.org
#+TITLE: Test
#+AUTHOR: testauthor
#+LANGUAGE: en
#+cite_export: csl
#+bibliography: bib.bib
This is a test [cite:@strathernImprovingRatingsAudit1997].
#+print_bibliography:
It still fails without the print bibliography keyword, but I thought I should still include it.
bib.bib
@article{strathernImprovingRatingsAudit1997,
title = {‘{{Improving}} Ratings’: Audit in the {{British University}} System},
shorttitle = {‘{{Improving}} Ratings’},
author = {Strathern, Marilyn},
date = {1997-07},
journaltitle = {European Review},
volume = {5},
number = {3},
pages = {305--321},
publisher = {{Cambridge University Press}},
issn = {1474-0575, 1062-7987},
doi = {10.1002/(SICI)1234-981X(199707)5:3<305::AID-EURO184>3.0.CO;2-4},
url = {https://www.cambridge.org/core/journals/european-review/article/abs/improving-ratings-audit-in-the-british-university-system/FC2EE640C0C44E3DB87C29FB666E9AAB},
urldate = {2021-10-07},
langid = {english},
}
Thanks, the Emacs version was crucial, I'm already on version 28, but using Emacs 27 I was able to reproduce the problem. Looks like there was a bug in Emacs's parse-time-string
function with year-month dates which has recently been fixed. It seems I have to switch to a different way of parsing biblatex dates.
I've merged a PR (#97) which hopefully solves the problem.
Yep, that fixed it. Thanks again for the great program.
I have been trying out citeproc-el along with Org's new citation system and it works great. lHowever, when I use a citation that has a date that only includes a year and month, it fails with an elisp error during the export.
The error is not always in the same function (it seems to vary with the specific format of date and desired csl stye), but is always a type error. Here are the ones I have seen so far:
I would assume this to be a problem only with general pre-export processing, but I checked with multiple styles and export formats to be more sure. It seems to happen regardless of export style (I checked in IEEE, MLA, APA, Vancouver, Nature, and some other styles) and export format (checked in html and LaTeX).
It happens when there is YYYY-mm date in the date feild, but is fine with a full YYYY-mm-dd or YYYY date feild of my biblatex file.
Here is a random sample entry you can use if you want that causes the problem.