Hi,
how can I make my TOC not in bold, and how can I delete the numbers before the chapters?
e.g. now it's like this:
1 [bold Chapter name]...................... [page number]
[blank space] 1.1 [subsection name]........................ [page number]
I want it like this:
[Chapter name]...................... [page number]
[blank space][subsection name]........................ [page number]
Thank you!
Text Formatting ⇒ TOC not in bold, without numbers before the chapters
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: TOC not in bold, without numbers before the chapters
Which document class do you use?
Stefan
Stefan
LaTeX.org admin
TOC not in bold, without numbers before the chapters
book, here's my code:Stefan_K wrote:Which document class do you use?
Stefan
Code: Select all
\documentclass[12pt,a4paper,twoside,italian]{book}
\usepackage[T1]{fontenc}
%\usepackage[urw-garamond]{mathdesign}
\usepackage{fourier}
\usepackage[italian]{babel}
\usepackage[latin1]{inputenc}
\usepackage[%
papersize={120mm,195mm},
left=18mm,
right=18mm,
bottom=20mm,
top=25mm,
headheight=14pt,
includehead,
nofoot,
]{geometry}
\usepackage{babel}
\usepackage[raggedright,pagestyles]{titlesec}% Add “clearempty” option if you need to get rid of headers/footers on empty pages
\usepackage{blindtext}
\usepackage{color}
\titleformat{\chapter}{\normalfont\large\bfseries}{}{0pt}{\Large}[\thispagestyle{plain}]
%%% Page styles
\makeatletter
\newpagestyle{toc}{% Create a page style for TOC
\let\ps@plain\ps@empty% Redefine plain style which is automatically applied to the first page of TOC; put “empty”, or “main”, or any other page style you like
\sethead[][][]{}{}{}
}
\newpagestyle{chapter}{% Create a page style for the first page of a chapter
\setfoot[][\thepage][]{}{\thepage}{}
}
\newpagestyle{main}{%
\let\ps@plain\ps@chapter% Activate page style for the first page of a chapter
\sethead[\thepage][][\chaptertitle]{\chaptertitle}{}{\thepage}
\headrule
}
\makeatother
%\newcommand{\cambiaFont}[2]{{\fontencoding{T1}\fontfamily{#1}%
%\selectfont#2}}
%\usepackage[T1]{fontenc}
\begin{document}
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
TOC not in bold, without numbers before the chapters
With the book class, try this in your document:
This should produce non-bold entries. Regarding the numbers: Do you number chapters in the document body? If yes, I recommend to do it in the TOC too, the number just belongs to the chapter then.
Stefan
Code: Select all
\renewcommand*{\l@chapter}[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 1.0em \@plus\p@
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode
\advance\leftskip\@tempdima
\hskip -\leftskip
#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty
\endgroup
\fi}
Stefan
LaTeX.org admin
Re: TOC not in bold, without numbers before the chapters
To remove numbering in the ToC i put
\renewcommand{\thechapter}{}
\renewcommand{\thesection}{}
It works. I don't mind to have it in the text.
Now I just need it not bold..
\renewcommand{\thechapter}{}
\renewcommand{\thesection}{}
It works. I don't mind to have it in the text.
Now I just need it not bold..