I need to remove a string ("p.") that is appearing before each page number in the Table of Contents. I have this on the .sty file:

%table of contents

\ifnum \c@tocdepth >\m@ne
\vskip 1.0em \@plus\p@
  \parindent \z@ \rightskip \@pnumwidth
  \parfillskip -\@pnumwidth
  \leavevmode \normalsize\ABNTtocchapterfont
  \hskip -\leftskip
  #1\nobreak\dotfill \nobreak%
        \ifthenelse{\not\equal{#2}{}}{{\normalfont p.\thinspace#2}}{}}\par
      \hb@xt@\@pnumwidth{\hss #2}\par


When I remove "p." from the following line:

\ifthenelse{\not\equal{#2}{}}{{\normalfont p.\thinspace#2}}{}}\par

I get this: "p." removed from upper levels

I was able to remove "p." from upper levels. How can I remove "p." from the lower levels?

These are the packages being used:

\usepackage{uff} % the .sty file
  • you need to do the same with \@dottedtocline command. – touhami Mar 19 '17 at 22:09
  • Where can we find this abnt class? – user31729 Mar 19 '17 at 22:12
  • @ChristianHupfer: See mtm.ufsc.br/~krukoski/pub/Latex – Marco Daniel Mar 19 '17 at 22:18
  • abnt is a really old class -- why not use abntex2? – Joseph Mar 23 '17 at 22:29
  • @Joseph I am using a model provided by my University. I changed only the strictly needed. But thank you for the advice. – Aline Mar 25 '17 at 0:21

You have to add the following redefinition to your style file:


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.