I am using 'memoir' for a thesis, and I have chosen the vertical space between a chapter title and the following section to be exactly fixed, \afterchapskip being 120pt for each new chapter. What I would like to do now is to create an epigraph environment such that, for each chapter, the quote is put inside this vertical (fixed) region.
EDIT: Here is a sketch of what I mean, which might make things clearer
The idea is to keep the vertical space between the title and the first section at 120pt, no matter the size of the quote (they'll remain short).
How can I achieve this? I have tried to first 'save' the vertical space using a minipage environment of 120pt, and then put the quote inside. The problem I encounter, however, is that the actual minipage position is moved together with the main text by LaTeX, so that in the end nothing is fixed at all.
The following does not work but, for your information, I have tried something like this:
%ifemptyarg[
\makeatletter
\def\ifemptyarg#1{%
\if\relax\detokenize{#1}\relax % H. Oberdiek
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi}
\makeatother
%%source: http://tex.stackexchange.com/questions/308/different-command-definitions-with-and-without-optional-argument
%ifemptyarg]
\newcommand{\chaptercustom}[4]{
\ifemptyarg{#2}
{
%if no quote is provided, just go for the usual chapter:
\chapter{#1}
}
{
%otherwise:
\renewcommand*{\afterchaptertitle}{} %remove the space normally following the chapter title
\chapter{#1} %display title
\begin{flushright}
\noindent\begin{minipage}[b][\afterchapskip]{0.5\linewidth}
\flushright \normalsize\normalfont
#2\\
\textsc{#3}\hspace{1pt}---\hspace{1pt}#4%
\end{minipage}
\end{flushright}
\renewcommand*{\afterchaptertitle}{
\vspace{\afterchapskip} % recover the usual structure for fore-coming chapters
}
}
}
Called inside the main document via:
\chaptercustom{<CHAPTERTITLE>}{<QUOTE>}{<AUTHOR>}{<SOURCE>}
If needed, here is the chapter style I have written:
\newcommand{\afterchapskipcustomvalue}{120pt}
\makechapterstyle{myChapStyle}{
\renewcommand{\chapterheadstart}{}
\setlength{\midchapskip}{7pt}
\setlength{\afterchapskip}{\afterchapskipcustomvalue}
\renewcommand*{\chapnamefont}{\Large\scshape\MakeLowercase}
\renewcommand*{\chapnumfont}{\normalsize}
\renewcommand*{\afterchapternum}{
\vspace{\midchapskip}
\hrule
}
\renewcommand*{\chaptitlefont}{
\LARGE
\bfseries
}
\renewcommand*{\printchaptertitle}[1]{
\vspace{\onelineskip}
\chaptitlefont ##1
}
\renewcommand*{\printchapternonum}{
\vphantom{\printchaptername}
\afterchapternum
}
\renewcommand*{\afterchaptertitle}{
\vspace{\afterchapskip}
}
}
Thank you very much for your time and suggestions!