3
votes

I have a test document using memoir and I'd like to figure out how to change the font and color of sections and lower levels.

\documentclass{memoir}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\setsansfont{Helvetica}
\usepackage{blindtext}

\begin{document}
    \blinddocument
\end{document}

I understand that memoir includes the functionality of titlesec, and this seems to be described in section 6 of the manual, but I just can't figure out the incantation to make it work. If I wanted \section to be in the sans font in blue, and the lower levels to be in green, what are the commands to make this happen?

1

1 Answers

3
votes

Use \setXheadstyle{<style>} to set the <style> of X where

  • sec denotes \section,

  • subsec denotes \subsection

  • subsubsec denotes \subsubsection,

  • para denotes \paragraph, and

  • subpara denotes \subparagraph.

enter image description here

\documentclass{memoir}

\usepackage{blindtext,xcolor}

\setsecheadstyle{\sffamily\color{blue}}% Set \section style
\setsubsecheadstyle{\sffamily\color{green}}% Set \subsection style

\begin{document}

\blinddocument

\end{document}