rust-lang / mdBook

Create book from markdown files. Like Gitbook but implemented in Rust
https://rust-lang.github.io/mdBook/
Mozilla Public License 2.0
18.44k stars 1.65k forks source link

Worflow for Zotero integration #1371

Open alexander-winkler opened 4 years ago

alexander-winkler commented 4 years ago

I was wondering if there are any plans or recommendations regarding an efficient integration of Zotero into the mdbook workflow. For me to use mdbook, it would be essential to be able to easily add bibliographic references from Zotero to my text (related to, but not identical with #1350 )

francisco-perez-sorrosal commented 4 years ago

Hi @alexander-winkler. I use Zotero too. I've collected my references to scientific/research with that tool. Then what I do is just export the Zotero Library or Collection to a BibTex or BibLatex file, place it in my mdBook and use the implementation I provided in #1350 to be able to make citations in the mdBook markdown files just by doing {{#cite my-citation-key}}, where my-citation-key is the id in my exported .bib file. I can't think an easier way to integrate Zotero with mdBook unless I'm missing something else. The instructions I provided in the implementation are here

KennethEnevoldsen commented 3 years ago

have this material been implemented or should I use the version from @francisco-perez-sorrosal 's fork? (couldn't find the pull request).

francisco-perez-sorrosal commented 3 years ago

Hi @KennethEnevoldsen,

Yesterday I just pushed in this repository a plugin/preprocessor version of the code changes I did in the issue/PR #1350/#1351 as suggested by @ehuss.

You can clone the project, cd mdbook-bib and install the plugin with cargo install --path . Then make sure your PATH env var includes the cargo bin, so you can use the plugin as specified in the README.md. I've been busy in the few months, but I plan to do a package out of the plugin and publish in crates.io, improve the codebase and add more features. Feel free to give me feedback/collaborate. Thanks!

francisco-perez-sorrosal commented 3 years ago

@KennethEnevoldsen I've just published it in crates.io, so you can install it now with cargo install mdbook-bib

KennethEnevoldsen commented 3 years ago

Thanks Francisco, many thanks.

francisco-perez-sorrosal commented 3 years ago

Hi @KennethEnevoldsen and @alexander-winkler, I've just published a new version that downloads and parses your Zotero public library as BibLaTex using your Zotero UserId. Find it here: https://crates.io/crates/mdbook-bib

Hope it helps