0

I want to make chapter headings colorful in a memoir. I've tried the approach proposed here. The only problem with this solution is that the unnumbered chapters remain unchanged. Is there a starred version of \printchaptername?

\documentclass[12pt,a4paper,oneside]{memoir}

\usepackage{fontspec}
\usepackage{xcolor}
\usepackage{lipsum}

\addtodef{\printchaptername}{\color{red}}{}

\begin{document}

\chapter*{Foo}
\lipsum[1-3]

\chapter{Bar}
\lipsum[4-6]

\end{document}

screenshot

3
  • always make a small but complete example, that makes it much easier to test your issue. Commented Mar 9, 2023 at 20:45
  • @Ulrike Fischer : Done
    – Tonechas
    Commented Mar 9, 2023 at 21:59
  • redefine \chaptitlefont, \chapnumfont and \chapnamefont. Commented Mar 9, 2023 at 22:24

1 Answer 1

1

Please test this code:

\documentclass[12pt,a4paper,oneside]{memoir}

\usepackage{fontspec}
\usepackage{xcolor}
\usepackage{lipsum}

\addtodef{\printchaptername}{\color{red}}{}

\addtodef{\printchapternonum}{\color{red}}{} % this takes care of unnumbered chapters

\begin{document}
    
    \chapter*{Foo}
    \lipsum[1-2]
    
    \chapter{Bar}
    \lipsum[4-6]
    
\end{document}

a

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .