Reputation: 374
I have a folder with two .tex
files, say a.tex
and b.tex
opened in VSCode.
When launching Recipe: latexmk
(Latex Workshop extension) from the Commands
tab, or Ctrl+Alt+B, it always compiles a.tex
even when b.tex
is focused in the editor.
How do I specify which .tex
file I'd like to be compiled, if not by focusing in the editor?
Upvotes: 7
Views: 15487
Reputation: 374
Actually, the answer can be found here: https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile
My personal issue was that my b.tex
file does not contain \begin{document}
which Latex Workshop looks for when automatically finding the root file.
Upvotes: 6
Reputation: 1084
According to the documentation They search in multiple steps:
% !TEX root =path to root.tex
-> I recommend to put it in every tex-file to assure the right file is used\documentclass[...]{...}
Upvotes: 6