0

I have a file called draft.tex. In it are

\documentclass…
\usepackage…
   …
some macros
   …
\begin{document}
\maketitle
\input{sec1.tex}
\input{sec2.tex}
   …
bibliography stuff
\end{document}

the files sec1.tex & sec2.tex look like

\section{title of sec}
text

I would like to edit sec1.tex and then make the document. The only way I know how to do this is to change the editor focus to a window containing draft.tex, and then typesetting. Is there a way of doing this in one step, without having to change the editor window focus? Even better, without opening draft.tex at all? Apologies if this has been answered before. I couldn't find it.

Augustin
  • 105
  • Welcome to TeX.SX! Have you tried this: https://tex.stackexchange.com/q/39207/134574? – Phelype Oleinik Mar 08 '19 at 01:07
  • see answers AND comments here https://tex.stackexchange.com/questions/450546/in-texstudio-how-to-compile-only-the-subfile and https://tex.stackexchange.com/questions/12267/using-subfiles-package-with-sty-files –  Mar 08 '19 at 01:59
  • Thank you both. %! TEX root=draft is brilliant. Subfiles is a bit much for my current need, but good to know about for larger projects. – Augustin Mar 08 '19 at 03:12

0 Answers0