4

Package memoir has an \epigraph command to typeset “Inspirational” quote at start of chapter. While the manual explains how to modify the thickness of the line that is drawn between quote and author, I cannot find a way to change its color. How can it be done?

Minimum non-working example:

\documentclass{memoir}
\begin{document}
\epigraph{Some inspirational quote}{The Author (1900--2010)}
\end{document}
6

Looking into memoir.cls helps ;-)

The command for drawing the rule is \@epirule, which is basically nothing different then a wrapper for a standard rule with some width etc. settings. However, there is no color, indeed.

Using a grouped {\color{yourcolor}\rule...} (see code below) works. Grouping is necessary, otherwise the color setting would bleed into typesetting and all would be blue, for example.

\documentclass{memoir}

\usepackage{xcolor}
\newcommand{\epigraphrulecolor}{blue}
\makeatletter
\renewcommand{\@epirule}{{\color{\epigraphrulecolor}\rule[.5ex]{\epigraphwidth}{\epigraphrule}}}
\makeatother
\begin{document}
\epigraph{Some inspirational quote}{The Author (1900--2010)}
\end{document}

enter image description here

5

This is just a complement to Christians solution which can be made a bit simpler.

\documentclass{memoir}
\usepackage{xcolor}
\newcommand{\epigraphrulecolor}{blue}
\makeatletter
\addtodef\@epirule{\color{\epigraphrulecolor}}{}
\makeatother
\begin{document}
\epigraph{Some inspirational quote}{The Author (1900--2010)}
\end{document}

We simply prepend the color

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.