Skip to content
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

Tex files compiled independently in multi-file LaTeX project #119

Open
mnancel opened this issue Aug 1, 2019 · 1 comment
Open

Tex files compiled independently in multi-file LaTeX project #119

mnancel opened this issue Aug 1, 2019 · 1 comment

Comments

@mnancel
Copy link

mnancel commented Aug 1, 2019

Hello,
I just installed this extension so perhaps I'm missing something. I am trying to write a scientific paper involving multiple tex files. The main tex file is in the root folder of my project, and the other ones in a tex/ subfolder.
Now, every time I edit one of those other tex files and save, I get an error of the form:

This is pdfTeX, Version [...] (TeX Live 2018) (preloaded format=pdflatex) restricted \write18 enabled.
entering extended mode
(./intro.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
./intro.tex:3: Undefined control sequence.
l.3 \section
{Introduction}
./intro.tex:3: ==> Fatal error occurred, no output PDF file produced!
Transcript written on intro.log.

The extension apparently tries to compile every saved file independently, so in order to compile my whole document I have to go back to the main tex file and save it as well, which does generate the correct pdf file with no error.

(Note that all of the tex files in the tex\ subfolder start with
%!TEX root = ../my_main_file.tex

Am I missing something?
Thanks a lot.

@mnancel mnancel changed the title Error on save+generate pdf with multiple .tex files Tex files compiled independently in multi-file LaTeX project Aug 1, 2019
@mnancel
Copy link
Author

mnancel commented Aug 1, 2019

Ok, I now realize that this is the default behavior when calling pdflatex on a non-main .tex file.

Let this be a features request then: could saving any file in the folder trigger the compiling of only the main .tex file?

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

No branches or pull requests

2 participants