-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
Add filter doi2cite #178
Add filter doi2cite #178
Conversation
570b92d
to
cf2d0c5
Compare
Thank you, this looks very useful! It's going to be about a week before I have time to review this in detail, but maybe one of the other maintainers can do so earlier. |
I'm not really qualified to review this; I'm not familiar with the assorted citation ecosystems or any of the issues surrounding them. It does look like you've done good work getting it setup, I'm just vaguely aware there are a lot of pitfalls/complexities in this area and don't have the eye to spot the or any test content to run it on. |
No problems so far. Also works well with author-date citation formats, respecting author suppression with [-@doi...] or citations without brackets to obtain Author et al. (2021) instead of (Author et al., 2021). If you want to use a second lua filter it's best to first create the expected.md and then convert that to pdf with citeproc etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is beautiful!
There are some very minor things like overlong (>80chars) lines in the README, as well as indentation, which uses 4 spaces instead of the default 2: it would be nice to be consistent, but I don't feel strongly about it.
The latest pandoc release caused some test failures unrelated to this filter. I'm working to fix those and will merge the PR afterwards.
Leave long URL lines as are.
Thank you for the reviews and suggestions!
It would be smarter to substitute |
Great, thanks!
Oh, that might be worth fixing in pandoc. You could still get it by using |
Fixed an error in the CI test. |
Thanks again! |
Add a filter
doi2cite
, which helps users to insert references into a document with using DOI(Digital Object Identifier) tags.What the filter do
With this filter, users do not need to make bibtex file by themselves.
Instead, the filter automatically generate .bib file from the DOI tags (e.g. [@doi:xxxx.xxxx.xxx.]), and convert the DOI tags into citation keys available by pandoc --citeproc (e.g. [@Korintje_2021]).
Filter features
I'd be glad if I can get any comments or suggestions!