# Positioning Epigraphs in the Same Place on a Page

I am using epigraph to provide pre-chapter heading quotes in my report class document--which is actually causing the problems as this is the first time I am trying to use the report class. The problem is that as the epigraphs are of variable length (number of lines), they are all positioned in a random place on the page.

Admittedly, after looking at this topic here which is about epigraphs for reports in general, it would seem that there could be a better option than the epigraph environment that I could use for this purpose. If the below is too complex to be reasonably viable, then a solution could also use a method different to epigraph as long as it provided the same capability.

I have been trying to use \epigraphhead, but this seems to work very variably. In any case, the position of the quotes is not maintained predictably by this.

So, for the examples below:

\documentclass[12pt,oneside]{report}

\usepackage{epigraph}

\setlength{\epigraphwidth}{8.0cm}

\begin{document}

\dropchapter{4cm}

\clearpage\newpage
\chapter{First}
\epigraphhead[48]{\epigraph{\raggedleft{A slight breeze at this moment sprang up,\\and the great sails began to move,\\seeing which Don Quixote exclaimed,\\Though ye flourish more arms than\\the giant Briareus, ye have to reckon with me."}}{\emph{The Ingenious Nobleman Mister Quixote\\of La Mancha'}, Chapter~\RNum{8}\\Miguel de Cervantes Saavedra}}

\clearpage\newpage
\chapter{Second}
\epigraphhead[48]{\epigraph{\raggedleft{It is pleasant, when the sea is high and the winds are dashing the waves about, to watch from the shores the struggles of another.}}{Titus Lucretius Carus}}

\end{document}


Now, my objective would be to either:

• position the epigraphs so that the dividing line is always in the same place on the page;
• position the epigraphs so that the first line is always in the same place; or
• position the epigraphs so that the last line is always in the same place.

My preference would be for the first one, but I have no idea how to even try it. I thought that the behaviour for the second one would be granted by the \epigraphhead, but it does something very weird.

And for the last one, I imagine it would be possible to link it directly to the chapter title and work from there, but I again have no good idea of how to start this.

• It would be not very difficult to place the epigraphs as you want them, but imho as chapter pages are quite far away from each other it doesn't make much sense to concentrate on similar alignments, it is more important that on every page the placement of the epigraph looks good. – Ulrike Fischer Aug 10 '17 at 22:26
• @UlrikeFischer: That may be the case for your documents. I like consistency in things like this though, and I feel that this would be provided by positioning (even if it looks a bit worse overall -- and I am not sure that this would be a result...). – gktscrk Aug 10 '17 at 22:41

Well, you could use page nodes....

% !TeX program = lualatex
\documentclass[12pt,oneside]{report}

\usepackage{epigraph}
\usepackage{tikzpagenodes}

\newcommand{\epgr}[3]{
\begin{tikzpicture}[remember picture,overlay,shift={(current page.north east)}]
\node[align=left,anchor=north east]{\parbox{8cm}{\fontsize{10}{12}\selectfont%
\raggedleft#1\\\rule{7cm}{0.1mm}\\\emph{#2}#3}};
%   }}};
\end{tikzpicture}}
\begin{document}

\dropchapter{4cm}

\clearpage\newpage
\chapter{First}
\epgr{A slight breeze at this moment sprang up,\\and the great sails began to move,\\seeing which Don Quixote exclaimed,\\Though ye flourish more arms than\\the giant Briareus, ye have to reckon with me.''}{The Ingenious Nobleman Mister Quixote\\of La Mancha', }{Chapter 8\\Miguel de Cervantes Saavedra}
%   \epigraph{\raggedleft{A slight breeze at this moment sprang up,\\and the great sails began to move,\\seeing which Don Quixote exclaimed,\\Though ye flourish more arms than\\the giant Briareus, ye have to reckon with me."}}{\emph{The Ingenious Nobleman Mister Quixote\\of La Mancha'},
%       Chapter 8\\Miguel de Cervantes Saavedra}}
%   }}

\clearpage
\newpage

\chapter{Second}
\epgr{It is pleasant, when the sea is high and the winds are dashing the waves about, to watch from the shores the struggles of another.}{}{Titus Lucretius Carus}

\end{document}

• Thanks. You are absolutely correct. For the answer to actually shift the position (to beyond the top corner...), you should note that a xshift and yshift are necessary. I changed the node position to \node[align=left,anchor=north east] at ([xshift=-2.5cm,yshift=-4cm]current page.north east)` for myself but obviously this could be whatever... – gktscrk Aug 11 '17 at 8:15
• That's right: I'd left the fine tuning to you. – JPi Aug 11 '17 at 8:25
• I guess it is clear from the code, but could be useful of you to mention that in the post. Anyways, cheers! – gktscrk Aug 11 '17 at 10:29
• I agree........ – JPi Aug 11 '17 at 10:53