LaTeX forum ⇒ Page LayoutRemove Space for Chapter Prefix in ToC Topic is solved

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Posts: 5
Joined: Sat Nov 17, 2012 4:31 am

Remove Space for Chapter Prefix in ToC

Postby jbgrad » Sat Nov 17, 2012 4:47 am

The chapter lines of my ToC should only have the number, not the word "Chapter". I used \renewcommand{\chaptername}{} as follows in modifying my university's template (which is unfortunately wrong). However, while the word "Chapter" is gone, the space taken up by it is not, so an entry looks like:
1 [Space the length of "Chapter"] Name-of-chapter

instead of
1 Name-of-chapter

  1. \renewcommand{\tableofcontents}{%
  2. \renewcommand{\chaptername}{}
  3. \doublespace
  4. \if@twocolumn
  5. \@restonecoltrue\onecolumn
  6. \else
  7. \@restonecolfalse
  8. \fi
  9. \chapteroneside*{%\contentsname
  10. \@mkboth{%
  11. \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
  12. \@starttoc{toc}%
  13. \if@restonecol\twocolumn\fi
  14. }

Any assistance in removing this unwanted horizontal space (the length of "Chapter") would be appreciated.
Last edited by localghost on Sat Nov 17, 2012 12:01 pm, edited 1 time in total.
Reason: Source code has to be tagged as such to keep a post clear and legible (see Board Rules).

User avatar
Stefan Kottwitz
Site Admin
Posts: 8598
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany

Postby Stefan Kottwitz » Sat Nov 17, 2012 3:45 pm

That's not the behavior of standard classes, so obviously your university's template provided this addition which you would like to remove. Look for a macro called \l@chapter or post the template file here as attachment to a post.

Site admin

Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 2 guests