\includeonly not working as expected with newclude

2.3k Views Asked by At

In LaTeX, the \includeonly statement exists to selectively add or exclude sub-documents.

One quirk in the whole process is that when sections are excluded, LaTeX decides to insert a page-break. The article at To have no pagebreak after \include in LaTeX recommends using newclude to avoid this issue. This package defines \include* which provides a work-around by omitting the implied \clearpage.

I am occasionally seeing the behaviour where if I comment out lines of my \includeonly statement the sub-document still gets included. Has anyone else seen this behaviour?

2

There are 2 best solutions below

0
On BEST ANSWER

For whatever reason, everything is now working as it should.

Just in case the order of the \usepackage directives is important, in the working version \usepackage{newclude} is the first command after \documentclass{article}.

1
On

It's not a bug, it's a feature. Really. Does \input do what you need, rather than \include?