Is there an optionnal argument to compile only a given section ? I would like to write
\section[OnlyThisSection]{My section} ...
which would allow me to compile only the section I am working on.
It's for a book class. All chapters are in different files, but there are many sections and subsections in each chapter.
\include/\includeonly. It will introduce a page break at that point in your main document. (\sectiondoes have an optional argument, but it does something else.) – Teepeemm Feb 27 '24 at 16:42\includebefore you can start using\includeonlyto compile specific files. It uses stored aux files for labels etc. – John Kormylo Feb 27 '24 at 16:48subfilespackage or the above mentioned\includeonly. – samcarter_is_at_topanswers.xyz Feb 27 '24 at 16:52\includeis designed for, – David Carlisle Feb 27 '24 at 17:50subfilespackage allows subfiles that, in turn, contain other subfiles. The subfiles do not need to begin a new page in the main document (although they will, if compiled alone). But of course, a subfile has no knowledge of what its numbering should be, because it does not see the non-compiled content. Or, as @DavidCarlisle noted, use\includeas the direct approach. – rallg Feb 27 '24 at 19:03