I have the following MWE:
\documentclass[twoside]{book}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,headheight=28pt,bindingoffset=6mm]{geometry}
\usepackage[pagestyles]{titlesec}
\usepackage{lipsum}
\usepackage{fancyhdr}
\titleformat{\chapter}[display]
{\normalfont\bfseries}{}{10pt}{\Huge}
\newpagestyle{mystyle}{
\sethead[][][\chaptertitle]{\thesection~\sectiontitle}{}{\thepage}}
\begin{document}
\pagestyle{mystyle}
\chapter{A chapter}
\lipsum[1-40]
\end{document}
This successfully removes the word 'chapter' from the chapter titles. However I want to include the chapter count number as well. Something like '1. Introduction'. How do I do this using titlesec?
Best Answer
You shouldn't use the
display
style if you want the chapter label on the same line as the chapter title. Use the defaulthang
style, orblock
if you want to centre it. Notetwoside
isn't necessary: it's the default in thebook
class. Also don't loadfancyhdr
if you want to usetitlesec
with thepagestyles
option, which loadstitleps
, and it may conflict withfancyhdr
.Here is a code: