1

I want to have the same styles in titleformat command and ToC. How can I do this? I want to see "CHAPTER 1. SOME TITLE" in ToC in the example below:

\documentclass{extreport}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}

\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\bfseries\filcenter}{CHAPTER \thechapter. }{0mm}{}

\begin{document}
\tableofcontents
\chapter{SOME TITLE}
\lipsum[1]
\end{document}

ToC Title

1 Answers1

1

Along with titlesec, you can use titletoc to format the entries of the table of contents.

\documentclass{extreport}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}

\usepackage{titlesec}
\usepackage{titletoc}
\titleformat{\chapter}{\bfseries\filcenter}{CHAPTER \thechapter. }{0mm}{}
\titlecontents{chapter}[0mm]{\bfseries}{CHAPTER \thecontentslabel. }{}{}

\begin{document}
\tableofcontents
\chapter{SOME TITLE}
\lipsum[1]
\end{document}

For more details, see the documentation of titletoc, section 6.

Vincent
  • 20,157