For my courses in informatics, I write a LaTeX document containing a number of examination questions each semester. For some reasons, I don't want to break this document into particular TeX files. Therefore, I created a command which performs some enumeration and formatting, each examination question is a \section using this command.
I am using \pagesel in order to create particular PDF files from this LaTeX file. This is ok, but a little inflexible - since the examination questions can have different length and therefore are occupying different numbers of pages in the PDF.
My question is: is there a chance to create PDF files based on the range given by the \section? The optimal solution would be to have a command which simply writes out the whole document, divided in separate PDF files, each representing one section. I made intensive research to find such a possibility, but all solutions I found are based on page number ranges (like \pagesel).
Thanks for the help!
answersorfilecontentspackages, but you need to use environment rather then command:\begin{section}{pdffile1}...\end{section}this will create apdffile1.texand you can compile this file usingwrite18option – touhami Jul 20 '15 at 16:19