1

Is there a way to change the layout of the section part of the Table of Contents once you hit the appendices?

I want the following to have Appendix A. Title, and then not the page number: enter image description here

The Appendix A from my \thesection is covering up the title. I've tried "renewing" l@section to try and adjust, but I don't really know how.

I'm setting up my appendix command like:

\newcommand{\clearemptydoublepage}    
  {\newpage{\pagestyle{empty}\cleardoublepage}}

\renewcommand\appendix{\par
  \clearemptydoublepage
  \setcounter{section}{0}
  \setcounter{subsection}{0}

  \renewcommand\section{%
      \renewcommand\thesection{\appendixname \ \@Alph\c@section}
                               \@startsection {section}{1}{\z@}%
                               {-3.5ex \@plus -1ex \@minus -.2ex}%
                               {2.3ex \@plus.2ex}%
                               {\centering\normalfont
                               \normalsize\bfseries\scshape}}

  \renewcommand\subsection{%
     \renewcommand\thesection{\@Alph\c@section}
                                 \@startsection{subsection}{2}{\z@}%
                                 {-3.25ex\@plus -1ex \@minus -.2ex}%
                                 {1.5ex \@plus .2ex}%
                                 {\normalfont\normalsize\bfseries\scshape}}

  \renewcommand\thesubsection{\thesection.\@arabic\c@subsection}
}

And then doing:

\appendix

\makeappendixtitle{Add title for appendix A}
\section{Title}
\subsection{Appendix Sub}
First appendix

My appendix itself looks fine like:

enter image description here

closed as unclear what you're asking by user31729, Stefan Pinnow, user36296, gernot, ebosi Jan 27 '17 at 16:20

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Welcome to TeX.SE. Please don't post such fragments only. Post the compilable version of your document that generates the issue. Looking into that debris of code above I don't feel very comfortable. Where did you get this code? Have you looked into tocloft -- it provides nice means to change the look of a ToC etc. (easier than changing \l@section etc!) – user31729 Jan 23 '17 at 20:58
  • 1
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Martin Schröder Jan 23 '17 at 21:12
2

It would be simpler to use the appendix page. This has an option to put the word Appendix before each appendix in the body, but suppress it in the table of contents.

Sample contents

Sample appendix

\documentclass{article}

\usepackage[title]{appendix}

\begin{document}
\tableofcontents

\section{Ordinary section}

\cleardoublepage
\begin{appendices}
  \section{Title}
  \subsection{Appendix Sub}
  First appendix
\end{appendices}

\end{document}

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