Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My university requires the chapter headings to be on a separate page and vertically and horizontally cantered. Based on some of the answers on this forum i used the following code to achieve it.

\documentclass[thesis,letterpaper,12pt]{utthesis}
\usepackage{fancyhdr}                % fancy headers and footers
\usepackage{titlesec}
\titleformat{\chapter}[display]{\vfil\normalfont\huge\bfseries\centering}{\chaptertitlename\ \thechapter}{20pt}{\Huge}    % for vertical and horizontal centring
 \renewcommand\contentsname{Table of Contents}
\setcounter{chapter}{-1}  % PACKAGES PRELOADED WITH CLASS: amsmath,amsthm,amssymb,setspace,geometry,hyperref,and color
\begin{document}
\pagenumbering{alph} % this is needed to clear certain issues with the hyperref package
\pagenumbering{roman}
\setcounter{page}{10}
\addToPDFBookmarks{0}{Table of Contents}{f}
\tableofcontents
\include{chapters/preface}
\include{chapters/chap1}`

I was running all fine, but now i have noticed that the table of contents is not showing properly. It starts at almost the end of the page although it should start from the beginning of the page. Can anyone help?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

You can move the \titleformat command to the body of your document immediately before the point where you want the change to begin acting; in your case you can move \titleformat from the preamble and use it after \tableofcontents:

\documentclass[thesis,letterpaper,12pt]{utthesis}
\usepackage{fancyhdr}                % fancy headers and footers
\usepackage{titlesec}
 \renewcommand\contentsname{Table of Contents}
\setcounter{chapter}{-1}  % PACKAGES PRELOADED WITH CLASS: amsmath,amsthm,amssymb,setspace,geometry,hyperref,and color
\begin{document}
\pagenumbering{alph} % this is needed to clear certain issues with the hyperref package
\pagenumbering{roman}
\setcounter{page}{10}
\addToPDFBookmarks{0}{Table of Contents}{f}
\tableofcontents

\titleformat{\chapter}[display]{\vfil\normalfont\huge\bfseries\centering}{\chaptertitlename\ \thechapter}{20pt}{\Huge}    % for vertical and horizontal centring
\include{chapters/preface}
\include{chapters/chap1}
\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.