I have an appendix with multiple sections that each contain multiple subsections. Each subsection contains an appendix (named for instance A1, A2, etc.). When I refer to one of the appendices, it only mentions the letter (the section), but it doesn't mention the number (the subsection / the specific appendix file).

My appendices are coded with:

\includepdf[scale=0.95,pages=1,pagecommand=\subsection{Interview: Christine}]{fig/interviews/christine.pdf}

\includepdf[scale=0.95,pages=1,pagecommand=\subsection{Interview: Hans-Frederik}]{fig/interviews/hf.pdf}


I know it doesn't get any easier when the appendices are .pdf-files, and the pagecommand=\subsection{..} is to prevent the pdf from changing to a new page from the subsection.

These are named A1 and A2 respectively in the report when I export it to a pdf, but referring to them with


produces the same output (just A).


produces ??.

So how can I refer to them and get A1 and A2?

thanks in advance!


You can extend the \pagecommand with a label for the subsection, surrounded by {}.


References: \ref{appendix:christine}, \ref{appendix:hf}.
\includepdf[scale=0.95,pages=1,pagecommand={\subsection{Interview: Christine}\label{appendix:christine}}]{christine.pdf}

\includepdf[scale=0.95,pages=1,pagecommand={\subsection{Interview: Hans-Frederik}\label{appendix:hf}}]{hf.pdf}


This produces:

References: A.1, A.2.

For further reference, please provide a complete example, including the document class and packages (such as the MWE given here). This makes it easier for the community to reproduce the problem and provide a solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.