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

Set BIBINPUTS and BSTINPUTS environment variables when making PDF #676

Merged
merged 3 commits into from Sep 16, 2017

Conversation

Projects
None yet
2 participants
@takluyver
Copy link
Member

takluyver commented Sep 15, 2017

@sobester had some difficulties converting a notebook to PDF using bibtex references. Converting to tex and then running latex manually worked. My guess is that bibtex couldn't find the .bib file because nbconvert doesn't copy it to the temporary directory from which it runs latex.

While looking through this code today, I noticed that we use an environment variable TEXINPUTS to tell Latex to look for related files in the directory where the original notebook is. A bit of searching reveals that bibtex uses two similar environment variables, BIBINPUTS (for bibliography files) and BSTINPUTS (for style files). If my guess is correct, adding the notebook directory to these should resolve the problem with using bibtex.

@takluyver takluyver added the LaTeX label Sep 15, 2017

@takluyver takluyver requested a review from mpacer Sep 15, 2017

@takluyver

This comment has been minimized.

Copy link
Member Author

takluyver commented Sep 15, 2017

I couldn't find any good docs about these environment variables, but they're described in various posts, e.g. this SE answer.

@mpacer

This comment has been minimized.

Copy link
Member

mpacer commented Sep 16, 2017

This looks fine, but I'd still like a way to directly inform both LaTeXExporter and PDFExporter about where the bib file is directly (i.e., without using environment variables as a signalling mechanism).

@mpacer mpacer merged commit 8f8ac1a into jupyter:master Sep 16, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@mpacer mpacer added this to the 5.4 milestone Oct 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment