I'm printing a large document (PhD thesis) and trying to save money by printing in B/W and printing the color pages separately.
I was thinking one approach was to output the page numbers to a text file and extract those pages using pdftk (or something like that).
I tried doing:
Code: Select all
\newcommand{\resetfigpage}{\immediate\write18{rm -f figpages.txt}}
\newcommand{\savefigpage}{\immediate\write18{echo Figure \thefigure\space on page \thepage\space >> figpages.txt}}
\makeatletter
\renewenvironment{figure}
{\@float{figure}}
{\savefigpage\end@float}
\makeatother
1. The with respect to the beginning of the main matter (i.e. didn't include about 12 roman-numeralled preamble pages).
2. Off by 1 on many occasions.
I'm thinking maybe the problem with the off by 1 is related to using the \renewenvironment{figure} rather than \renewcommand{\includegraphics}, but I couldn't work out how to do the latter.
Do you use \let?
How do you override the optional arguments for \includegraphics?
Would that at least help with my off by 1?
Cheers,
K