1

Currently, I have Apêndice A Title of the appendix in my Table of Contents (see link below), but I need APÊNDICE A – Title of the appendix (note the capital letters APÊNDICE and the "en dash" before the title.

This change must affect only the ToC. The title on the appendix page itself is fine as it is now.

I guess this is an easy task, but I haven't succeeded.

https://www.overleaf.com/read/qdstcnhswnwc

\documentclass{book}

\usepackage[greek,portuguese,brazilian]{babel}
\usepackage[title,titletoc]{appendix}

\begin{document}

\tableofcontents\thispagestyle{empty}
\cleardoublepage

\chapter{Introduction}
Bla bla
\cleardoublepage

\begin{appendices}
\chapter{Title of the appendix}
\cleardoublepage
\chapter{Title of another appendix}
\cleardoublepage
\end{appendices}

\end{document}
  • Are you trying to copy the ABNT style? – BlackBird Apr 20 '19 at 0:59
  • @Joseph, I have to adapt a book to the norms of ABNT. I have already tried simply to replace the class book with abntex, but some packages I use didn't work in that class. – Leonardo Castro Apr 20 '19 at 2:30
  • The class is called abntex2, not abntex. You'll have plenty more problems trying to do it all from scratch. Better ask people here or elsewhere why those packages don't work with abntex2 -- have you tried that? By the way, who on earth has to adapt a book (not a thesis) to ABNT rules? Which publisher prints a book only according to ABNT and accepts LaTeX? This may seem picky, but changing your approach might save you lots of time. – BlackBird Apr 20 '19 at 2:35
  • Yes, it was abntex2 what I tried. It's a university publisher which really requires ABNT for books too. They usually required the book text as a Microsoft Word file (for they to pass it to InDesign), but they accepted PDF files from LaTeX users as long as the authors adapt their books to the rules themselves. – Leonardo Castro Apr 20 '19 at 3:21
  • Traditionally, this publisher focused on humanities books, but now they are starting publishing natural science books too. Many science authors submitted their books as PDF files and only revealed that they didn't have a DOC file after having the books accepted. – Leonardo Castro Apr 20 '19 at 3:32
1

Part of your question can be answered by this answer.

For renaming, you'll need to add this:

\renewcommand\appendixname{APÊNDICE}
\renewcommand\appendixpagename{APÊNDICE}
| improve this answer | |
  • My appendices are defined as chapters (as I have book instead of article). What's the equivalent to \@seccntformat for chapters? – Leonardo Castro Mar 13 '19 at 20:31
1

I'm answering my own question to complement @Vinccool96's answer.

The answer of @Vinccool96 didn't completely apply to my MWE because its class is book instead of article. However, it helped me find the solution that worked in my case.

Based on the explanation in https://tex.stackexchange.com/a/384048/91816, I added the following code immediately below \begin{appendices}:

\makeatletter
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
    \refstepcounter{chapter}%
    \typeout{\thechapter.}%
    \addcontentsline{toc}{chapter}%
    {\thechapter\space\textendash\space\ #1}% <-- modification
  \else
    \addcontentsline{toc}{chapter}{#1}%
  \fi
  \chaptermark{#1}%
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
  \if@twocolumn
    \@topnewpage[\@makechapterhead{#2}]%
  \else
    \@makechapterhead{#2}%
    \@afterheading
  \fi}
\makeatother
| 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.