Featured Book

LaTeX Beginners Guide

Who is online

In total there are 5 users online :: 1 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: Yahoo [Bot] and 4 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

Remove Space for Chapter Prefix in ToC Topic is solved

Add tags Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).

Remove Space for Chapter Prefix in ToC

Postby jbgrad on Sat Nov 17th, 2012

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


Code: Select all  •  Open in writeLaTeX
\renewcommand{\tableofcontents}{%
    \renewcommand{\chaptername}{}
    \doublespace
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapteroneside*{%\contentsname
        \@mkboth{%
          \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    \@starttoc{toc}%
    \if@restonecol\twocolumn\fi
    }

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

Re: Remove Space for Chapter Prefix in ToC  Topic is solved

Postby Stefan_K on Sat Nov 17th, 2012

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.

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6321
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany


Return to Page Layout

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests