forked from xenohedron/hpmor-xetex
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hp-colophon.tex
49 lines (48 loc) · 1.88 KB
/
hp-colophon.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
% We want the total number of real pages (sheets) to be a multiple of 4, and we
% want the colophon to land on the last page (which will necessarily be an even
% page). So we might need to insert up to 3 blank pages before the colophon.
%
% Note that the \include command used to include this file makes a new page, so
% if the current page here is a multiple of 4, we don't need to insert any blank
% page.
%
% First we calculate the current page number modulo 4:
\makeatletter
\@tempcnta=\c@sheetsequence% The sheetsequence counter defined by the memoir class
\newcount\blobb
\blobb=\c@sheetsequence
\divide\@tempcnta by 4
\multiply\@tempcnta by 4
\multiply\@tempcnta by -1
\advance\@tempcnta by \c@sheetsequence
%
% Now @tempcnta holds @sheetsequence % 4. We will add pages and increment @tempcnta
% until it reaches 4 (unless it is 0, in which case there is no page to add).
\ifnum\@tempcnta>0
\loop
\thispagestyle{empty}% Disable headers/footers
\null% There must be "something" on the current page for \newpage to have an effect
\newpage% Make new page
\advance\@tempcnta by 1
\ifnum\@tempcnta<4
\repeat
\fi
\makeatother
%
% Now the current page is a muliple of 4. We put the colophon here.
{\null\vfil%
\thispagestyle{empty}\noindent\rightskip=0pt plus 1fil\leftskip=0pt plus 1fil\parfillskip=0pt%
\vbox{
\parshape 1 0em 21em
\noindent
\leftskip=0pt\rightskip=0pt\parfillskip=0pt plus 1fil{}\emph{This book was
formatted by fans of the story. The text was set in 10½~point
URW~Garamond~No.~8. Parseltongue was set in Huerta Tipografica's Alegreya Sans
Light Italic. Chapter headings were set in Lumos, by Sarah McFalls, inspired by
the display font used in the US editions of the Harry Potter books. The
cover was created by \CoverAuthor. Typesetting was done using
\emph{\LaTeX}; the source code can be found at
\mbox{\url{\PdfSourceUrl}}. This book was built on \today.}
}\vskip\footskip%
\vfil\vfil
\newpage }