# Chapter numbers not showing on page, but showing in TOC

In my multi-chapter document, I have child docs that all use \chapter but the chapter number is not showing, just the chapter title. However, the numbers do show in the TOC. Below is the MWE for the master doc and a sample chapter. It is long, so bear with me, not sure how much more minimum I can go, but this recreates the problem:

\documentclass[12pt,letterpaper,truedoublespace]{report}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\makeatletter

\RequirePackage{setspace}[1998/04/8]

\newcommand{\etptsize}{12pt}

\DeclareOption{10pt}{\renewcommand{\etptsize}{10pt}}
\DeclareOption{11pt}{\renewcommand{\etptsize}{11pt}}
\DeclareOption{12pt}{\renewcommand{\etptsize}{12pt}}
\DeclareOption{letterpaper}{\PassOptionsToClass{letterpaper}{report}}

% The following options set the global amount of spacing

\newcommand{\etspacing}{\setstretch{1.37}}
\DeclareOption{truedoublespace}{\renewcommand{\etspacing}{\doublespacing}}
\DeclareOption{doublespace}{\renewcommand{\etspacing}{\setstretch{1.37}}}
\DeclareOption{onehalfspace}{\renewcommand{\etspacing}{\onehalfspacing}}
\DeclareOption{singlespace}{\renewcommand{\etspacing}{\singlespacing}}

% Normally, the chapter heads are all uppercase, but sometimes
% this causes problems.  The following option changes

% Pass all other options to report.cls.
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{report}
}

% CCW: font size modifications, from Martin Pergler
% Put it at document start, else some packages may clobber it.
% Thesis Office says minimum should be 9pt for microfilming, but they
% didn't actually complain about the standard LaTeX sizes (12/8/6) that
% I used previously.  So 8pt isn't too much of a cheat.
\AtBeginDocument{\DeclareMathSizes{12}{12}{10}{8}}

\etspacing

\newcommand{\dedication}{
\chapter*{}
\thispagestyle{empty}
}

% copyright page (if used, should appear directly after title page)
\if@twocolumn\@restonecoltrue\onecolumn
\else \newpage \fi
\thispagestyle{empty}%\setcounter{page}{2}%
\null\vfill
\vskip 15pt\relax
\if@restonecol\twocolumn \else \newpage \fi

%
% \topmatter : Things like Abstract, Acknowledgments.
%    Usage:
%       \topmatter{Title Of Matter}
%
%       Use like \chapter, once for each page of matter you want.  Don't
%       use numbered sections within these.  Use \section* instead.
%
\newcommand{\topmatter}[1]{
\chapter*{#1}
}

%
% redefinition of abstract environment
%

\renewenvironment{abstract}{\topmatter{Abstract}}{}
\newenvironment{acknowledgments}{\topmatter{Acknowledgments}}{}

%
% \mainmatter : Signals the start of the document's body.
%    Usage:
%       \mainmatter
%
%       Use once before the first numbered \chapter.
%
\newcommand{\mainmatter}{
\clearpage
\pagenumbering{arabic}
}

%
% Title Page Information Commands
%    Example Usage:
%       \title{Stones And L^2 Invariants}
%       \author{Fred D. Belitnikoff}
%       \department{Mathematics}
%       \division{Physical Sciences}  (Sciences with an s!)
%
%
\renewcommand{\title}[1]{\gdef\@title{#1}}
\renewcommand{\author}[1]{\gdef\@author{#1}}
\newcommand{\department}[1]{\gdef\@department{#1}}
\newcommand{\division}[1]{\gdef\@division{#1}}
\newcommand{\degree}[1]{\gdef\@degree{#1}}
\renewcommand{\date}[1]{\gdef\@date{#1}}

%
% \maketitle :  Makes the U. of Chicago dissertation title page.
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%     Internal Formatting Commands For This Thesis Style
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Renew commands that make chapter & section headers
%
\setlength{\topmargin}{0.5in}   % really 1.5in, added by bph for OAP standards
\normalfont\large\bfseries
\begin{center}
\etchapterheadstyle{\@chapapp{ \thechapter}}  %  CHAPTER 1 or APPENDIX
\end{center}
\setlength{\topmargin}{0in}   % back to 1in

}}
\setlength{\topmargin}{0.5in}    % really 1.5in, added by bph for OAP standards
\normalfont\large\bfseries
\begin{center}
\end{center}
\setlength{\topmargin}{0in}   % back to 1in
}}
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\large\bfseries\centering}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\large\itshape\centering}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\large}}
%\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
%                              {3.25ex \@plus1ex \@minus.2ex}%
%                              {-1em}%
%                              {\normalfont\normalsize\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\small\bfseries}}
%\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
%                             {3.25ex \@plus1ex \@minus .2ex}%
%                             {-1em}%
%                             {\normalfont\normalsize\itshape}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\small\bfseries}}

% Change style of printing chapters in TOC to match chapter headings.

\renewcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\vskip 1.0em \@plus\p@
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode
\hskip -\leftskip
% CCW: The following 3 lines add dots to the chapter TOC listings
\leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill
\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty
\endgroup
\fi}

% Change the margins to fit requirements
% Because most printers add 0.25in on both margins by default, use {0.25in} for 1.5in margins, or {0in} for 1.25in margins
\setlength{\oddsidemargin}{0.25in}  % for 1.5in
\setlength{\evensidemargin}{0.25in}  % for 1.5in
%\setlength{\oddsidemargin}{0in}  % for 1.25in
%\setlength{\evensidemargin}{0in}  % for 1.25in
\setlength{\textwidth}{6.25in}
% Printers do not seem to add anything to top/bottom margins, so {0in} does in fact leave a 0in top margin
\setlength{\topmargin}{0in}   % really 1in
\setlength{\textheight}{8.25in}
\setlength{\footskip}{0.5in}

% Changing where the page numbers go on pages that aren't the first
% page of a chapter.

%changed by Yahui Peng 2/1/10
\markright{}
\pagestyle{plain}

%% Added by CWH for SSD/Anthro requirements: the first page of a chapter,
%% use \page in footer center; otherwise \page in header right
%\usepackage{fancyhdr}
%\pagestyle{fancy}
%\fancyfoot{}

%
% CCW fixed bug where multipage LOT/LOF were listed in TOC with wrong
% page number.

\let\oldtableofcontents = \tableofcontents
\renewcommand{\tableofcontents}{
\begin{singlespace}
\oldtableofcontents
\end{singlespace}
}

\let\oldlistoftables = \listoftables
\renewcommand{\listoftables}{
\begin{singlespace}
% This works b/c multiple \newpage's are treated as one
\newpage
\oldlistoftables
\end{singlespace}
}

\let\oldlistoffigures = \listoffigures
\renewcommand{\listoffigures}{
\begin{singlespace}
% This works b/c multiple \newpage's are treated as one
\newpage
\oldlistoffigures
\end{singlespace}
}

\renewcommand{\figurename}{Figure}
\providecommand{\fnum@figure}[1]{\textbf{\figurename~\thefigure}.}

\widowpenalty=10000
\clubpenalty=10000
\raggedbottom

\@ifundefined{showcaptionsetup}{}{%
\PassOptionsToPackage{caption=false}{subfig}}

\makeatother

\begin{document}

\dedication \begin{center} \emph{In order to properly understand the big picture, we should fear becoming mentally clouded and obsessed with one small section of truth.}\\\emph{- Xunzi}\end{center}

\tableofcontents

\clearpage

\pagenumbering{arabic}

\setcounter{page}{1}

\chapter{Introduction}

The Late Neolithic (3000-2000 bce) is characterized by the spread
of the Longshan Culture Complex throughout the Huang-Huai floodplain,
covering all regions occupied by the earlier Yangshao and Dawenkou
cultures (Chang 1986; Fitzgerald-Huber 1983; Liu 2004; Liu and Chen
2006). Definition of local Longshan phases is based primarily on minor
stylistic differences in the pottery inventories of these regions,
though such stylistic criteria are limited to external, decorative
features of the pottery.

\section{Research Questions}

The developments that took place in the communities of the Luoyang
Basin between 3000 and 1500 BCE provide an excellent opportunity for
studying the emergence of the state through material culture.

\end{document}


Edit #1:

I figured this out with much help from Sora and Christian. In response to my comment about having the chapter # and chapter title on separate lines, I believe the first set of code was intended to do just that. It worked in LyX (which probably ignored the second set), but not in LaTeX (which probably ignored the first set). So, I now have:

\renewcommand{\@makechapterhead}[1]{{
\setlength{\topmargin}{0.5in}
\normalfont\large\bfseries
\begin{center}
\etchapterheadstyle{\@chapapp{~\thechapter}}  %  CHAP or APP #
\\
\end{center}
\setlength{\topmargin}{0in}
}}


Perfect!

• Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Jul 27 '14 at 20:42
• Definitely need an MWE. How are you defining \chapapp{} and the other macros in that snippet? Please make sure that you MWE can be compiled to reproduce the issue. – cfr Jul 27 '14 at 22:01
• @Christian I'm still learning LaTeX (coming from LyX), but the MWE Sora. provides below is a great start. Will provide more helpful info in the future. – charles Jul 28 '14 at 15:32
• @charles: The point is: Other users still have no clue about the documentclass and the relevant packages, although you stated that it is some modified package/class file. Is that file available or rests in peace on somebody's disk? – user31729 Jul 28 '14 at 15:59
• @Christian MWE created! – charles Jul 28 '14 at 16:49


\etchapterheadstyle{\@chapapp{ \thechapter}}  %  CHAPTER 1 or APPENDIX


However, this obvious doubling of the chapter title has no effect, since the command is completely overruled by the

\etchapterheadstyle{#1}     %     TITLE OF CHAPTER,


outputting just the chapter name, but not the number via \thechapter. \@chapapp prepends the word CHAPTER, so omit it, if not needed. In this sense, the solution by Sora was indeed working, however, he/she could not know of the additional \renewcommand.

I used the MWE in order to relieve the OP of to much additions by himself to be done afterwards, so its a long code, but I marked the relevant code with some surrounding %%%%%%%%%%%%%%%%%%%%%%%

\documentclass[12pt,letterpaper,truedoublespace]{report}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\makeatletter

\RequirePackage{setspace}[1998/04/8]

\newcommand{\etptsize}{12pt}

\DeclareOption{10pt}{\renewcommand{\etptsize}{10pt}}
\DeclareOption{11pt}{\renewcommand{\etptsize}{11pt}}
\DeclareOption{12pt}{\renewcommand{\etptsize}{12pt}}
\DeclareOption{letterpaper}{\PassOptionsToClass{letterpaper}{report}}

% The following options set the global amount of spacing

\newcommand{\etspacing}{\setstretch{1.37}}
\DeclareOption{truedoublespace}{\renewcommand{\etspacing}{\doublespacing}}
\DeclareOption{doublespace}{\renewcommand{\etspacing}{\setstretch{1.37}}}
\DeclareOption{onehalfspace}{\renewcommand{\etspacing}{\onehalfspacing}}
\DeclareOption{singlespace}{\renewcommand{\etspacing}{\singlespacing}}

% Normally, the chapter heads are all uppercase, but sometimes
% this causes problems.  The following option changes

% Pass all other options to report.cls.
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{report}
}

% CCW: font size modifications, from Martin Pergler
% Put it at document start, else some packages may clobber it.
% Thesis Office says minimum should be 9pt for microfilming, but they
% didn't actually complain about the standard LaTeX sizes (12/8/6) that
% I used previously.  So 8pt isn't too much of a cheat.
\AtBeginDocument{\DeclareMathSizes{12}{12}{10}{8}}

\etspacing

\newcommand{\dedication}{
\chapter*{}
\thispagestyle{empty}
}

% copyright page (if used, should appear directly after title page)
\if@twocolumn\@restonecoltrue\onecolumn
\else \newpage \fi
\thispagestyle{empty}%\setcounter{page}{2}%
\null\vfill
\vskip 15pt\relax
\if@restonecol\twocolumn \else \newpage \fi

%
% \topmatter : Things like Abstract, Acknowledgments.
%    Usage:
%       \topmatter{Title Of Matter}
%
%       Use like \chapter, once for each page of matter you want.  Don't
%       use numbered sections within these.  Use \section* instead.
%
\newcommand{\topmatter}[1]{
\chapter*{#1}
}

%
% redefinition of abstract environment
%

\renewenvironment{abstract}{\topmatter{Abstract}}{}
\newenvironment{acknowledgments}{\topmatter{Acknowledgments}}{}

%
% \mainmatter : Signals the start of the document's body.
%    Usage:
%       \mainmatter
%
%       Use once before the first numbered \chapter.
%
\newcommand{\mainmatter}{
\clearpage
\pagenumbering{arabic}
}

%
% Title Page Information Commands
%    Example Usage:
%       \title{Stones And L^2 Invariants}
%       \author{Fred D. Belitnikoff}
%       \department{Mathematics}
%       \division{Physical Sciences}  (Sciences with an s!)
%
%
\renewcommand{\title}[1]{\gdef\@title{#1}}
\renewcommand{\author}[1]{\gdef\@author{#1}}
\newcommand{\department}[1]{\gdef\@department{#1}}
\newcommand{\division}[1]{\gdef\@division{#1}}
\newcommand{\degree}[1]{\gdef\@degree{#1}}
\renewcommand{\date}[1]{\gdef\@date{#1}}

%
% \maketitle :  Makes the U. of Chicago dissertation title page.
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%     Internal Formatting Commands For This Thesis Style
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Renew commands that make chapter & section headers
%
%%%%% Completely unused since overruled

\setlength{\topmargin}{0.5in}   % really 1.5in, added by bph for OAP standards
\normalfont\large\bfseries
\begin{center}
\etchapterheadstyle{\@chapapp{ \thechapter}}  %  CHAPTER 1 or APPENDIX
\end{center}
\setlength{\topmargin}{0in}   % back to 1in

}}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Now the 'real' \@makechapterhead follows
\setlength{\topmargin}{0.5in}    % really 1.5in, added by bph for OAP standards
\normalfont\large\bfseries
\begin{center}
\end{center}
\setlength{\topmargin}{0in}   % back to 1in
}}%%%

\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\large\bfseries\centering}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\large\itshape\centering}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\large}}
%\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
%                              {3.25ex \@plus1ex \@minus.2ex}%
%                              {-1em}%
%                              {\normalfont\normalsize\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\small\bfseries}}
%\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
%                             {3.25ex \@plus1ex \@minus .2ex}%
%                             {-1em}%
%                             {\normalfont\normalsize\itshape}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\small\bfseries}}

% Change style of printing chapters in TOC to match chapter headings.

\renewcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\vskip 1.0em \@plus\p@
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode
\hskip -\leftskip
% CCW: The following 3 lines add dots to the chapter TOC listings
\leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill
\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty
\endgroup
\fi}

% Change the margins to fit requirements
% Because most printers add 0.25in on both margins by default, use {0.25in} for 1.5in margins, or {0in} for 1.25in margins
\setlength{\oddsidemargin}{0.25in}  % for 1.5in
\setlength{\evensidemargin}{0.25in}  % for 1.5in
%\setlength{\oddsidemargin}{0in}  % for 1.25in
%\setlength{\evensidemargin}{0in}  % for 1.25in
\setlength{\textwidth}{6.25in}
% Printers do not seem to add anything to top/bottom margins, so {0in} does in fact leave a 0in top margin
\setlength{\topmargin}{0in}   % really 1in
\setlength{\textheight}{8.25in}
\setlength{\footskip}{0.5in}

% Changing where the page numbers go on pages that aren't the first
% page of a chapter.

%changed by Yahui Peng 2/1/10
\markright{}
\pagestyle{plain}

%% Added by CWH for SSD/Anthro requirements: the first page of a chapter,
%% use \page in footer center; otherwise \page in header right
%\usepackage{fancyhdr}
%\pagestyle{fancy}
%\fancyfoot{}

%
% CCW fixed bug where multipage LOT/LOF were listed in TOC with wrong
% page number.

\let\oldtableofcontents = \tableofcontents
\renewcommand{\tableofcontents}{
\begin{singlespace}
\oldtableofcontents
\end{singlespace}
}

\let\oldlistoftables = \listoftables
\renewcommand{\listoftables}{
\begin{singlespace}
% This works b/c multiple \newpage's are treated as one
\newpage
\oldlistoftables
\end{singlespace}
}

\let\oldlistoffigures = \listoffigures
\renewcommand{\listoffigures}{
\begin{singlespace}
% This works b/c multiple \newpage's are treated as one
\newpage
\oldlistoffigures
\end{singlespace}
}

\renewcommand{\figurename}{Figure}
\providecommand{\fnum@figure}[1]{\textbf{\figurename~\thefigure}.}

\widowpenalty=10000
\clubpenalty=10000
\raggedbottom

\@ifundefined{showcaptionsetup}{}{%
\PassOptionsToPackage{caption=false}{subfig}}

\makeatother

\begin{document}

\dedication \begin{center} \emph{In order to properly understand the big picture, we should fear becoming mentally clouded and obsessed with one small section of truth.}\\\emph{- Xunzi}\end{center}

\tableofcontents

\clearpage

\pagenumbering{arabic}

\setcounter{page}{1}

\chapter{Introduction}

The Late Neolithic (3000-2000 bce) is characterized by the spread
of the Longshan Culture Complex throughout the Huang-Huai floodplain,
covering all regions occupied by the earlier Yangshao and Dawenkou
cultures (Chang 1986; Fitzgerald-Huber 1983; Liu 2004; Liu and Chen
2006). Definition of local Longshan phases is based primarily on minor
stylistic differences in the pottery inventories of these regions,
though such stylistic criteria are limited to external, decorative
features of the pottery.

\section{Research Questions}

The developments that took place in the communities of the Luoyang
Basin between 3000 and 1500 BCE provide an excellent opportunity for
studying the emergence of the state through material culture.

\chapter{Results}
\end{document}


Note: In my point of view, there is some code, which could be done easier with titlesec or with KOMA classes.

• Works like a charm! In older drafts (when I was using LyX), and based on colleagues theses, it looks like there needs to be a line break between "Chapter #" and the chapter title. How would I work that into this new code? – charles Jul 28 '14 at 20:42
• Also, can I just go ahead and remove that first set of (now) redundant code? Will also look into titlesec. – charles Jul 28 '14 at 20:44
• @charles: Well, the line between Chapter # and title is actually the basic setup of report or book class, without this redefinitions in your file – user31729 Jul 28 '14 at 20:48
• see edit to OP above. – charles Jul 28 '14 at 21:14
• Solved! Linebreak added, see Edit #1 above! – charles Jul 28 '14 at 21:23

In lack of an MWE and judging by the usage of \etchapterheadstyle, I assume you are using the University of Chicago's math thesis style or a style based on it.

I did my best to make up a minimum working example of your code and I figured out that replacing \chapapp by \@chapapp worked for me.

Depending on where exactly you redefine \@makechapterhead, you might need to enclose the code by \makeatletter [...] \makeatother.

Sample code:

\documentclass{easychithesis}

\begin{document}
\makeatletter
\setlength{\topmargin}{0.5in}
\normalfont\large\bfseries
\begin{center}
\end{center}
\setlength{\topmargin}{0in}
}}
\makeatother

\tableofcontents

\mainmatter

\chapter{Introduction}
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt\ldots

\chapter{Background}
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie\ldots

\chapter{Further investigations}
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit\ldots
\end{document}


Sample output (first two pages):

• This is not an answer by the standards we use here. In its present form is better suited as a comment to the OP's question. – Gonzalo Medina Jul 28 '14 at 0:23
• Yes, much better. Thanks! I'll delete my comments shortly. – Gonzalo Medina Jul 28 '14 at 0:56
• @Sora. Excellent deduction! This is a UChicago thesis. Many thanks for that- I'm still not so good at creating MWE, esp. for this kind of "complex" document. I will try out your solution and report back shortly. – charles Jul 28 '14 at 15:29
• @Sora. This didn't seem to work for me. Yes, this is definitely a modified easychithesis. See addendum above. – charles Jul 28 '14 at 15:50