I have a problem using pdfpages. I want to include PDF documents for my appendix. Everything seems to be fine. I include the PDF successfully. I want the page to appear as a section in the table of contents so I use this
Looks good! Numbering is totally correct. Now the problem occurs while I am clicking on the Link in my table of contents. It will always send me to the first page of my appendix which is page 29.
Wow, i solved it by my self. It works with the \refstepcounter command.
For everyone else having the same problem just use \refstepcounter{section} before the \addcontentsline command and it just works fine.!!!
But now there is another question coming up. How can I \label the pdfpage and ref to it? Its not working like in figures where you can put the label command after the \includegraphics
Last edited by cgnieder on Tue May 07, 2013 10:30 am, edited 1 time in total.
I don't have much experience with pdfpages so I won't comment on that.
krabby wrote:But now there is another question coming up. How can I \label the pdfpage and ref to it? Its not working like in figures where you can put the label command after the \includegraphics
It is wrong that one can place \label after \includegraphics to reference a figure. A \labelalways needs and refers to a referenceable counter, i.e., a counter that has been stepped by \refstepcounter. In case of figures inside a {figure} environment this is done by \caption (which is why you have to place the \labelafter it).
It seems to be working with the labels. The problem now is, that all the graphics are on one page! The next include is on top of the other graphics which have been included before.
Even if I use a \newpage after the figure it wont help. If I use a \clearpage i get errors.
Can someone help me out and tell me how to label an included pdf with the includepdf command?
Without a minimal working example (MWE) it is hard to be concrete but I'm quite sure that your use of the {figure} is wrong here. I'd expect something like