I have a document that's quite long. It uses a recurse function, a bit like this:

\starttext

    \dostepwiserecurse{1}{180}{1}{%

       \input chapter\recurselevel

}

\stoptext

That produces 180  chapters of content.

Anyway, my boss is upset she has to use a table of contents to navigate to the page she wants, and so wants me to split the file into 180  separate files, which somehow is going to be easier to look at. Honestly, she probably still won't ever actually look at it, but that's her requirement.

The problem is, I've been splitting the file by using Print --> PDF and choosing a custom print range, and then saving it. If I ned to repeat that 180 times, it not only will have errors, but probably take 5-10 hours.

Is there something I can put, like \breakpdf or something that will tell it to start a new PDF file? They can be named something like file1.pdf, file2.pdf, etc.

\starttext

    \dostepwiserecurse{1}{136}{1}{%

       \input chapter\recurselevel

\breakpdf

}

\stoptext

The perhaps "obvious" answer is just make 180  *.tex files, but since the minimal example above is like 0.01% of the complexity of the real file, that isn't so easy...

--Joel