2

I'd like to add an appendix to the TOC without showing its headline over the continuous text.

Minimal Example:

\documentclass{scrartcl}
\begin{document}
    \tableofcontents

    \section{A Section}
    Lorem ipsum.

    \appendix
    \section{Appendix with Headline}
    This section has a headline.

    \section{Appendix without Headline}
    This section should not have a headline.
\end{document}

An idea would be using \addcontentsline instead of \section but then I lose the foregoing "B.":

\addcontentsline{toc}{section}{Appendix without Headline}
3

It's a somewhat strange requirement, but here you go. (Note that this does not take care of the numbering of additional "visible" sections.)

\documentclass{scrartcl}
\begin{document}
    \tableofcontents

    \section{A Section}
    Lorem ipsum.

    \appendix
    \section{Appendix with Headline}
    This section has a headline.

    \addcontentsline{toc}{section}{\protect\numberline{B}Appendix without Headline}
    \bigskip\noindent% Optional
    This section should not have a headline.
\end{document}
| improve this answer | |

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.