I'm writing up my PhD thesis using the
memior class. This thesis starts off by using chapters and sections as one normally would.
Later on in the thesis though, I insert many pdfs into this document using
pdfpages. I want to treat each one of these pdfs as a separate section of a chapter, but I don't want the section titles to appear in the main text, because each time that happens, an ugly page is created between the pdfs which is empty except for the section name. I need to be able to but a
\label in each of these sections so I can refer to them, and I also want the table of contents to list them with the appropriate section number and correctly link to them.
This is similar to a couple of other questions, but in those cases it seems the problem can be solved by simply using
\phantomsection. In my case though, that solution prevents the sections from receiving numbers in the table of contents, and prevents
\label from assigning each section a unique section number within a chapter.