For final distribution, certain appendix includes the
pdfpages package. However, appendices should be skipped for normal "draft" versions, or while working on individual chapters.
I am having problems figuring out which file is referring a particular
pdfpages counter in these draft versions. Not including the pdfpages package in the preamble results in the following error: (once per chapter), even though there are no uncommented references to any
\includepdf* commands` (in desperation, I have commented out the ones in the not-to-be-compiled appendixes)
! LaTeX Error: No counter 'AM@survey' defined.
How would you find out the source of this error? After grepping the files repeatedly, I can find no reference to the package.
The Makefile included with the style package did not recurse into subdirectories to remove outdated files when invoking target 'clean'. After fixing this, everything works as expected. Notifying maintainer, and flogging myself for not noticing earlier.