Open chrisgrieser opened 2 years ago
Or did I misunderstand something and the filter is not intended to be used in combination with normal citekeys?
Right now there's four ways you can use url2cite in combination with "manual" citations:
raw:
. e.g. [@raw:foobar]
. These are ignored by url2cite. This was broken, i just published 0.6.14 that fixes it.url2cite-allow-dangling-citations=true
. That suppresses the Could not find URL for @foobar.
error and makes url2cite just ignore any cite keys that aren't aliased to an url.citation-cache.json
.Use an URL as a cite-key like in (3), but directly add the bibtex in a code block with language url2cite-bibtex
anywhere:
see also @{https://github.com/DLR-RM/stable-baselines3}.
```url2cite-bibtex
@misc{https://github.com/DLR-RM/stable-baselines3,
author = {Raffin, Antonin and Hill, Ashley and Ernestus, Maximilian and Gleave, Adam and Kanervisto, Anssi and Dormann, Noah},
title = {Stable Baselines3},
year = {2019},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/DLR-RM/stable-baselines3}},
}
Does one of those methods work for you?
pandoc-url2cite currently completely ignores the bibliography info passed as e.g. --bibliography
in pandoc since I think the content of that bibliography is not actually included in the JSON AST so I would have to parse it myself.
Thanks for the swift response!
Well, my discipline is sociology and we regularly cite classic work, often 60 years or older. So no URLs there... 😢
With a higher number of manual references, this practically only leaves option 2), which works totally fine, I just tested it. I would actually suggest to maybe make url2cite-allow-dangling-citations=true
the default option as I imagine that many people like me will have to / want to use url2cite only for some references and not exclusively. (I mean, even using url2cite for some references is already a huge time saver!)
On a slightly different note, is there some further documentation of url2cite I am note aware of? I could not find any reference to the url2cite-allow-dangling-citations
option in the readme, and url2cite --help
in the Terminal also does not work?
I would actually suggest to maybe make url2cite-allow-dangling-citations=true the default option
That might be true.. though this would make it harder to spot errors for the "ideal" case, and in many cases I think the other methods might be better. I've added the information on how to fix it (prefix with raw: or set that config option) to the error that is thrown so it should be easy to find from now on.
is there some further documentation of url2cite I am note aware of
There wasn't, really. I've added the information I wrote above plus some more to the readme. :)
That might be true.. though this would make it harder to spot errors for the "ideal" case, and in many cases I think the other methods might be better.
Might be, but in many disciplines, using solely url2cite is unfortunately not an option. That you aren't getting this request more often probably only stems from the fact that not many non-computer-science people use it yet. (Which is a shame, considering how useful this is.)
Well anyway, thanks for the quick info!
Thank you for this useful filter.
The filter works wonderfully, except when I have
[@citekeys]
in my input file, that originates from my bibtex library. When trying to use an "url2cite-citation" and a normal Pandoc citation together, the whole Pandoc conversion fails with the following error:this is the markdown file I am running it on
The Bibliography file contains an entry with the citekey "@GlaeserLaudel2005" and the citkey is converted properly when leaving out url2cite as filter.
for reference, here is my pandoc command.
Or did I misunderstand something and the filter is not intended to be used in combination with normal citekeys? because that would be all to be bad, I'd love to use this filter, but there are too many references without DOIs in my discipline that I can solely rely on it.