I defined a chapter style for memoir as follows:




    \renewcommand\chaptitlefont{\normalfont\Huge\bfseries\scshape \color{nicered}}
    \renewcommand\printchaptertitle[1]{\chaptitlefont ##1}

\setlength\afterchapskip {\onelineskip }
\setlength\beforechapskip {\onelineskip }



   \chapter{Chapter 1}


when I run this through latex I get an error message

! Undefined control sequence.
\chapnamefont ... \Large \scshape \raggedleft \so 

l.33 \chapter{Chapter 1}

The control sequence at the end of the top line
of your error message was never \def'ed.

but thereaftere everything works as intended. I tried to figure out what's wrong by reading memman.pdf, but it is intimidating.

  • Welcome to TeX.SX! Apart from an error due to the misplaced \afterchapskip in \afterchaptertitle, I have no problem with \chapter. Can you make a complete example showing the issue?
    – egreg
    Jan 29 '16 at 21:25
  • What is \so supposed to do?
    – cfr
    Jan 29 '16 at 23:59
  • \so is defined neither by the LaTeX kernel nor by memoir.
    – egreg
    Jan 30 '16 at 0:00
  • @egreg: I edited it to be a complete example. The error message is from the log file. In the console it flags \chapter as the undefined control sequence.
    – gcc
    Jan 30 '16 at 0:00
  • No it is saying that \so is undefined. The last command on that line, it complains of. The control sequence at the end of the top line...
    – cfr
    Jan 30 '16 at 0:01

The macro \so is defined by soul; but there's a better method for obtaining the “letter space” effect, with microtype:


  \renewcommand\printchaptertitle[1]{\chaptitlefont ##1}%







I've fixed some other glitches in the code. The main correction is removing \bfseries. Only a few fonts have boldface small caps, but in any case this would be too much: you already have \Huge and color.

enter image description here

  • Hi Enrico. How are you doing? No unsung hero badge sorry. :)
    – user11232
    Jan 30 '16 at 1:39

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.