0

I had to mess with the settings of the book class to match people's will. Removing the "Chapter X \\ Xtitle" part and replacing it with "X. Xtitle" for instance. In verdana 14 (so I compile with XeLaTeX, also because the body text is written in Perpetua, 13pt).

Anyway, I whittled my code down to the following MWE. How do I get rid of "0. Chapter title" in \frontmatter book chapter titles? But I do want to keep "Chapter title".

\documentclass{book}

\usepackage{lipsum} \usepackage{fontspec} % compile w/XeLaTeX \setmainfont{Perpetua} \newfontfamily\chapterfont{Verdana}

\makeatletter % https://tex.stackexchange.com/questions/18604/chapter-formatting \def@makechapterhead#1{% {\parindent \z@ \raggedright \chapterfont\fontsize{14pt}{0pt}\bfseries \ifnum \c@secnumdepth >\m@ne \thechapter.\ % <-- Chapter # (without "Chapter") \fi \interlinepenalty@M #1\par\nobreak% <------------------ Chapter title \vskip 12pt% <------------------ Space between chapter title and first paragraph }} \makeatother

\begin{document}

\frontmatter \chapter{Preface} \lipsum \chapter{Abstract} \lipsum \tableofcontents \mainmatter \chapter{A chapter} \lipsum \chapter{Another chapter} \lipsum

\end{document}

Any thoughts?


Edited to include fontspec and some settings in the package to remove the most egregious errors in the MWE.There are a few commands that are terminated with a space which is code copied from another answer.

BlueIris
  • 339

0 Answers0