In the line of this post, I am looking for a way to compile a large document (~400 pages with 10 chapters) into a single pdf file and one additional pdf file per chapter.
Currently, I use pdftk to manually split the large pdf file after its pdflatex compilation. However, this is tedious in the sense that the page split may vary (addition in chapter 1 will shift page numbers of following chapters...).
Is there a way to compile a latex file between two labels for instance ? Ideally I would like to keep hyperlinks active in the final sub-pdf files (which is the advantage of pdftk...).
The only thing I can think of is the use of \ifnum
in order to consider specific parts of the document but this will necessarily break all hyperlinks.
file-0.tex
,file-1.tex
, etc. you could give it a jobname like0
and it would use the jobname for doing an\includeonly
. – TeXnician Jun 9 '17 at 12:12