-
Notifications
You must be signed in to change notification settings - Fork 571
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
LaTeX will use pre-existing "notebook.tex" file #750
Comments
The intermediate tex file should always be written to a temporary directory, so that it doesn't interfere with anything in your working directory. If latex then uses |
Yes, latex is preferring the wrong file. |
can you give a directory structure & a sequence of commands (noting your working directory) that exhibits this pattern so I can try to reproduce it? |
I'm on windows 10, using nbconvert 5.3.1 and MikTex-XeTeX 2.9.6501. A directory like:
then running:
results in the file |
I suspect that the culprit is one of the environment variables we set, like TEXINPUTS. We do that so that if the notebook references another file in its directory, such as an image, it will be found when running latex. Maybe if we also add the temporary directory to the search path in TEXINPUTS, we can ensure that the right file is found. |
I just helped someone who got bitten by that. Maybe when the latex compiler is invoked, the filename to the temporary notebook.tex file should be an absolute path? Just a quick thought … no idea if that wouldn't break other situations. |
I think this might get fixed by #768 since the notebook.tex file that nbconvert uses will always be from the temp directory. |
I noticed that if a file with the name "notebook.tex" already exists in the current directory, then the conversion to pdf will not overwrite this file (probably good) and it will use that file to produce a (possibly completely different) pdf as the net result.
I've noticed a similar issue with using template files named "notebook.tplx" too.
The text was updated successfully, but these errors were encountered: