I'm new to titlesec
and LaTeX in general, trying to use it to achieve chapters in a {book}
class that are medium-sized and on the same line, viz:
Chapter 1: An Unlikely Event
Here's a minimized example:
\documentclass[english,12pt,oneside]{book}
\usepackage{titlesec}
\titleformat{\chapter}[hang]{\normalfont\medium\bfseries}{\chaptertitlename\ \thechapter:}{1em}{}
\begin{document}
\chapter{An Unlikely Event}
\end{document}
The error that returns is:
ERROR: Undefined control sequence.
--- TeX said ---
<argument> \normalfont \medium
\bfseries
l.77 \chapter{An Unlikely Event}
--- HELP ---
TeX encountered an unknown command name. You probably misspelled the
name ...
I think this is probably a simple error on my part, but I'm too young to know what it is.
\medium
? That is the problem.\bfseries
, you needn't specify "medium". there is\mdseries
, to which is equated\mediumseries
, but no\medium
-- but since it's redundant anyhow, you can just get rid of it.\medium
is a command that doesn't exist. Probably you meantmdseries
.\normalsize
.