0

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.

  • What is \medium? That is the problem. – azetina May 26 '15 at 19:34
  • since you're specifying fonts, and the next thing you ask for is \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. – barbara beeton May 26 '15 at 19:35
  • \medium is a command that doesn't exist. Probably you meant mdseries. – Bernard May 26 '15 at 19:37
  • I was trying to specify the size of the font, but I must have misunderstood the advice here: tex.stackexchange.com/questions/59726/… – Steven Arntson May 26 '15 at 19:45
  • @StevenArntson -- then what you probably meant was \normalsize. – barbara beeton May 26 '15 at 19:53
1

you have used the command \medium, which doesn't exist. what you probably meant is \mdseries, which is the default.

since you responded in a comment that what you really want to do is change the size of the font, the command for that is \normalsize.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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