-
Notifications
You must be signed in to change notification settings - Fork 35
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
Work out some story for exporting citations to Latex #7
Comments
It would be slightly more preferable to use biblatex (more features). I use this to export biblatex: https://github.com/ZotPlus/zotero-better-bibtex. Citations are handled within markdown by RMarkdown: |
Hi. Is there any news on this issue (exporting to PDF/ Latex)? Would be super-interested in this... |
I got a good tip for converting to bibtex (presumably biblatex too) the other day: there are CSL files for bibtex, so we can convert CSL JSON to bibtex by rendering with a bibtex 'style'. I'm just on the way back from an electronic publishing conference, which has inspired me to get back to developing cite2c. My first priority will probably be supporting different citation styles in the live notebook, but after that nbconvert integration is the next thing. |
Cool. Thanks for the heads-up
|
Hi again. Just another quick question if you don’t mind? I’m currently implementing the proposed workflow from here: http://blog.juliusschulz.de/blog/ultimate-ipython-notebook This works, but I was wondering if there is a way to use my trusty bibtex citeckeys instead of these crazy Zotero keys?!? I’m not a Zotero user per se but rather importing my bibtex library to Zotero in order to pull it in via your cite2c script… Thanks man,
|
Sorry, there isn't a way to do that. Zotero IDs provide consistent, unique identifiers, and since you shouldn't need to write them by hand, there isn't a strong pressure for them to be especially memorable. Thanks for the link, though - it's cool to see that @jcfschulz has already worked out a way to export to Latex. I'll try to use that as a starting point. |
Hi, The automatic install scripts are not perfect, but since I was switchting jobs recently, I didn't have time yet. Also the devel branch is I think more bug free than the master branch. Feel free to post any bugs, we will try our best to fix them. Greetings, J |
Thanks for the info :-) I'll try to work it into cite2c so that it's one thing to install for citations in notebooks. |
Great. iirc the only file you need to include is https://github.com/schlaicha/jupyter-publication-scripts/blob/master/extensions/pre_cite2c.py. Not the added dependency on the unicode_tex module, which correctly masks the non-ascii characters, since bibtex doesn't work with uff-8. Also I remember, there is still a bug considering the year. Not all zotero entries have this in the way I implemented, this has to be fixed at some stage. If you still have an older version of jupyter-notebook, also keep this jupyter/nbconvert#193 upstream bug in mind. |
Cool that’s some development happening there… Let me know if you need someone for testing stuff.
|
People will inevitably want to export notebooks to Latex, despite my misgivings about it. This will involve turning the citations into latex
\cite{foo}
commands (see the citation filter in nbconvert), possibly re-keying them, and creating a bibtex file with the corresponding citation data.For creating the bibtex file: I've not yet found a tool that will convert CSL JSON to bibtex. Pandoc-citeproc does the other way. Bibutils goes between various citation format, but not CSL JSON, and it's GPLed, so I'd rather avoid it if possible. Is there something out there to do it? Is Bibtex simple enough that we can do it ourselves?
Zotero can import CSL JSON and export Bibtex, so it must have the necessary code, but I don't know how easy it would be to pull it out.
Failing anything else, references can be re-downloaded from the Zotero web API in Bibtex format, but then all the citations must be in Zotero, and in one user/group library. That's how citations are inserted, but at present, once they're in the document, it doesn't matter where they came from, and it would be nice to preserve that abstraction.
The text was updated successfully, but these errors were encountered: