I am writing a large document with several chapters and I would like to work on each chapter separately. In my main.tex
I include the chapters either like
\include{chap1.tex}
\include{chap2.tex}
\include{chap3.tex}
or
\input{chap1.tex}
\input{chap2.tex}
\input{chap3.tex}
I think \include
is preferable if I want things to be referenced and cited correctly? but doing it the \include
way latex main.tex
I don't get any dvi
output whereas with \input
things compile fine to dvi
. What's going wrong here?
I would then like to use \includeonly
(or \excludeonly
) to work on individual sections of the document whilst maintaining the referencing etc.
A mwe
can be handy:
\documentclass[a4paper,10pt]{article}
\includeonly{chap1}
\begin{document}
\include{chap1}
\include{chap2}
\include{chap3}
\end{document}
\include
at the level of a control file calling files for your chapters. On a related note, I found that\include
is problematic inside a\chapter
. So\input
is also handy.