I'm writing a commissioned chapter for a handbook and I want to produce a pdf of three specific sections of my document to send to a colleague who is writing a different chapter for the same handbook (this is because there are some issues that span both chapters and we want to minimize overlap). Obviously, I can just copy-paste the relevant sections into a fresh tex file and produce a pdf from there, but I'm curious if there is a way of telling LaTeX "produce a pdf that contains only sections xxx, yyy, and zzz of this tex file".
I'm running TeX Live 2009, Emacs 23, and Ubuntu 12.04. I'm happy to use the command line if I need to.
EDIT, since some people seem to be thinking along these lines: I know about \includeonly{}, and I've used it in the past for this specific purpose with some large documents. I don't want to use it here because this chapter is not long enough to get into the trouble of managing a separate tex file for each section. I just want to know if it is possible to have one tex file and then produce a pdf containing only selected parts of that one tex file.
\includeonly{}command? However, this requires splitting the source file into separate files... – Jul 03 '14 at 09:31texfile and compile on demand the part you want, usingfilecontentsandincludeonly. – Clément Jul 03 '14 at 09:52pdftkor using thepdfpagespackage) ? – Daniel Apr 08 '18 at 22:14