I'm wondering if there's an easy way to have LaTeX output two lists:
- of pages containing and
- of pages not containing figures and/or other color objects.
I'd like to print color pages on a color printer (expensive) and print the rest of the pages on B&W. I'd like to be able to have one PDF and two txt files with CSV lists I can just dump into a print dialog.
If this can't easily be done, then is there is way to modify the list of figures format so it just lists the pages with comma separation? That way I could compile a temporary version of the PDF with that LOF, and copy them to a text file. Don't know how I'd get the complement of that set of page numbers then though.
I saw this post which recommended doing it manually or using PDFpages, but it seemed a little inconclusive.
Update
Andrey has provided a nice solution below to output a CSV list. I now realize that for my thesis, the list is long enough that it won't fit in a print dialog, and my printing place says they prefer two separate PDF docs anyway.
So, I wonder is it possible to integrate the pdfpages method demonstrated here so that it takes in the CSV lists produced by Andrey's method and uses them to create two additional PDF files, one with color pages, and one B&W. That method is as follows, where inputPDFfilename is the full PDF:
\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages={3-6, 17, 28, 29-31}]{inputPDFfilename}
\end{document}
One tricky aspect is that pdfpages takes absolute page numbers. I'm not familiar enough with the packages and syntax in Andrey's method to modify it myself at present. It would be cool if this could be fully integrated into the same LaTeX project that creates my thesis.