0

In my thesis I have Appendix B with some stuff. Following I want to create a new Appendix (for example C) with the PDF loaded (see Figure). Cause the name APPENDIX C is already in the Figure I don't want to show it up in the chapter header. However I need it in the table of contents.

Is this possible?

enter image description here

Here is an example of my code:

\documentclass[11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}
\usepackage[toc,page]{appendix}

\begin{document}
\tableofcontents
blabla \ref{app:B}

\begin{appendices}
    \chapter{}
    \label{Appendix B}
    bla bla bla bla bla bla bla bla 
    \phantomsection
    \addcontentsline{toc}{section}{Appendix~\ref{app:C}: C}
    \label{app:B}
    \includepdf[pages=1,fitpaper]{Figures/samplepdf.pdf}

\end{appendices}

\end{document}
  • Sort of the opposite of \section*. Hyperref has a \phantomsection (page 33 of manual), or you could just use \refstepcounter{section} and \addcontentsline... – John Kormylo Oct 8 at 19:44
  • thank you @JohnKormylo can you add an example? – Elisa m Oct 9 at 10:42
  • It would help to have a Minimal Working Example so that I know what document class etc. are being used. – John Kormylo Oct 9 at 14:20
  • @JohnKormylo i edited the question, tnks! – Elisa m Oct 9 at 14:34
  • It seems \phantomsection is for sections only, not chapters. – John Kormylo Oct 9 at 15:10
0

Here is an example for report class.

\documentclass[11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}
\usepackage[toc,page]{appendix}

\begin{document}
\tableofcontents

\begin{appendices}
    \chapter[Title for TOC and header]{}
    bla bla bla bla bla bla bla bla 

    \clearpage
    \refstepcounter{chapter}%
    \thispagestyle{plain}%
    \chaptermark{Title for header}%
    \addcontentsline{toc}{chapter}{\numberline{\thechapter}Title for TOC}
    %\includepdf[pages=1,fitpaper]{Figures/samplepdf.pdf}% file not provided
    \noindent\rule{\textwidth}{0.5\textheight}% replacment

\end{appendices}
\end{document}
  • and for report class? if i try this code in my thesis i see the Contents empty.. @John Kormylo – Elisa m Oct 9 at 14:51
  • I revise the solution using your MWE. You can add a label after \refstepcounter,if you want one. In your MWE you could have just used \thechapter. – John Kormylo Oct 9 at 15:09

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.