Text FormattingForce Chapter Numbers in ToC

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Ludwig
Posts: 2
Joined: Wed Nov 13, 2013 1:05 pm

Force Chapter Numbers in ToC

Post by Ludwig »

Hello,

Usually a ToC shows the chapter number and name, but for some reason my latex doc only shows the chapter name. How to force it to show the number and the name?

My preamble is:

Code: Select all

\documentclass[c5paper,10pt,twoside]{book}
\usepackage[brazil]{babel}
\usepackage[T1]{fontenc}
\usepackage[Sonny]{fncychap}
\usepackage{fancyhdr}
\usepackage{fancybox}
\usepackage{verbatim}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{dialogue}
\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{epsfig}
\usepackage{pst-grad} % For gradients
\usepackage{pst-plot} % For axes
\usepackage{changepage}% or chngpage -- note that the syntax differs slightly between the two packages
\usepackage{lscape}
\usepackage{fancyhdr}
\usepackage{bigdelim}
\usepackage{bigstrut}
\usepackage{subfigure}
\usepackage{bbding}
\usepackage{pifont}
\usepackage{setspace}
\usepackage{balance}
\usepackage{rotating}
\usepackage{tikz}
\usepackage{hvfloat}
\usepackage{multirow}
\usepackage[tc]{titlepic}
\usepackage{imakeidx}
\usepackage{floatpag}
\usepackage{caption}
\captionsetup[figure]{labelformat=empty}
\usepackage{floatrow}
\usepackage{lipsum}
\usepackage{paralist}
\usepackage{enumerate}
\usepackage{boxhandler}

\usepackage{enumitem}
\setlist[itemize]{leftmargin=*}
\setlist[enumerate]{leftmargin=*}

\indexsetup{othercode=\small}

\newcommand{\up}[1]{\ensuremath{^{\textrm{\scriptsize\underline{#1}}}}}
\newcommand{\low}[1]{\ensuremath{_{\textrm{\scriptsize\underline{#1}}}}}

\let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{%
  \clearpage
  {\pagestyle{empty}\origdoublepage}%
}

\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}{}}
\renewcommand{\headrulewidth}{0pt}
\fancyhead[LE]{\it \hspace{-1cm} \thechapter. \leftmark}
\fancyhead[RE,LO]{} \fancyhead[LO]{\it \thechapter. \leftmark}
\fancyhead[RO]{}

\interfootnotelinepenalty=10000

\usepackage{fix-cm}
\newcommand{\bigsize}{\fontsize{35pt}{20pt}\selectfont}

\newcommand\Chapter[2]{
  \chapter[#1]{#1\\[2ex]\Large\itshape#2}
}

\newcommand\chap[1]{%
  \chapter*{#1}%
  \addcontentsline{toc}{chapter}{#1}}
Last edited by localghost on Wed Nov 13, 2013 4:42 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Force Chapter Numbers in ToC

Post by localghost »

In absence of a self-contained and minimal example I would assume it's the new commands \Chapter and \chap that might cause the problem. But for a detailed answer you should make the problem comprehensible for others.


Best regards and welcome to the board
Thorsten
Ludwig
Posts: 2
Joined: Wed Nov 13, 2013 1:05 pm

Force Chapter Numbers in ToC

Post by Ludwig »

localghost wrote:In absence of a self-contained and minimal example I would assume it's the new commands \Chapter and \chap that might cause the problem. But for a detailed answer you should make the problem comprehensible for others.


Best regards and welcome to the board
Thorsten
Hello, thanks for your reply. Sorry for not providing more information. I will take look.
Post Reply