Don't know if this issue goes here or to pandoc. Anyway, would it be possible to add a command that creates a bibliography file containing only the references cited in a given document?
Pandoc does that automatically, doesn't it?
If not, it's a change from pandoc-citeproc and we should fix it.
This library does not do that yet, but we could add a filter feature.
Yes, I confirmed that pandoc does this.
I'm not sure it's needed for this library. The library takes a list [Reference a] which you can filter as you wish.
Perhaps the command-line tool could use a feature like this, though.
Pandoc does that already? How?
To clarify, I imagine you have a main.json bibfile but create a used-items.json file based on the references in a given document.
What I meant is that, in constructing a bibliography in a document, pandoc includes only cited references (unless you use nocite to indicate others.
Sounds like you want something different: create target-bibliography from source-bibliography, using only citations cited in other-document.
This would involve a change to pandoc, so I will move this issue there.
I don't have good ideas so far about a clean way to do this.
If you need something in a short term I have a python script that does this on my (constrained) YAML files.
https://github.com/reagle/pandoc-wrappers/blob/master/md2bib.py
If you need something in a short term I have a python script that does this on my (constrained) YAML files.
https://github.com/reagle/pandoc-wrappers/blob/master/md2bib.py
Thanks, I remember having seen this before. I actually don鈥檛 really need it at the moment, but I think it would be nice to have. Maybe this could be also a nice task for a lua filter.
@tarleb Thanks for the hint. That's a good solution when using a bibtex-centric workflow. The downside is that this will require a latex run, and a solution with less dependencies might be favorable. Anyway, I using a filter could work here, and it's debatable how many features should end up in pandoc itself.
Most helpful comment
You called?