changeset 958:5efe424fbff6 build-default-348

Automated merge with ssh://hg.cryhavoc.org.uk/dottes
author Jim Hague <jim.hague@acm.org>
date Wed, 07 Aug 2019 08:21:26 +0100
parents ac49e478bdd8 (current diff) 2e51b0787a54 (diff)
children 3e8fd8bd5707
files
diffstat 4 files changed, 55 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Tue Aug 06 21:56:56 2019 +0100
+++ b/.hgignore	Wed Aug 07 08:21:26 2019 +0100
@@ -16,3 +16,4 @@
 web/tunes.*/
 Morris-.*
 Session-.*
+Library-.*
--- a/docend.A4.tex	Tue Aug 06 21:56:56 2019 +0100
+++ b/docend.A4.tex	Wed Aug 07 08:21:26 2019 +0100
@@ -1,3 +1,16 @@
+% Inside back cover.
+\newpage
+\thispagestyle{empty}
+\hbox{}
+
+% Back cover page - or it it?
+\newpage
+
+% Pad pages to multiple of 4.
+\newcounter{frontpages}
+\setcounter{frontpages}{3 + \thelastfrontmatterpage}
+\padpages{4}{\thefrontpages}
+
 \pagecolor{havocpurple}
 \thispagestyle{empty}
 \mbox{}
--- a/docsetup.A4.tex	Tue Aug 06 21:56:56 2019 +0100
+++ b/docsetup.A4.tex	Wed Aug 07 08:21:26 2019 +0100
@@ -18,10 +18,12 @@
 \includegraphics[width=0.5\textwidth,keepaspectratio]{buzzard}
 \vfill
 {\Large Compiled by Jim Hague}\\
-% Inside cover
+
+% Inside front cover
 \newpage
 \pagecolor{white}
 \hbox{}
+
 \newpage
 {\Large \havocfont{Ye}}\\[\baselineskip]
 {\Huge \havocfont{Crie Havock}}\\[\baselineskip]
@@ -38,5 +40,5 @@
 
 % Page appearance.
 \newcommand*{\pagestylemod}{}
-\newcommand*{\tunestart}{}
-\newcommand*{\tuneend}{\vfill}
+\newcommand*{\tunestart}{\filbreak\vfill}
+\newcommand*{\tuneend}{}
--- a/dottes.tex	Tue Aug 06 21:56:56 2019 +0100
+++ b/dottes.tex	Wed Aug 07 08:21:26 2019 +0100
@@ -1,11 +1,13 @@
 \input{docclass.tex}
 
 \usepackage{array}
+\usepackage{calc}
 \usepackage{caption}
 \usepackage{color}
 \usepackage{fontspec}
 \usepackage{graphicx}
 \usepackage{fancyhdr}
+\usepackage{ifthen}
 \usepackage[defaultlines=4,all]{nowidow}
 \usepackage{tabularx}
 \usepackage{longtable}
@@ -47,6 +49,15 @@
   \fi}
 \makeatother
 
+% Replace \mainmatter with one that does a \clearpage
+% not a \cleardoublepage.
+\makeatletter
+\renewcommand\mainmatter{%
+   \clearpage
+   \@mainmattertrue
+   \pagenumbering{arabic}}
+\makeatother
+
 % Show the main tune graphic and optional change.
 % Args are:
 %   1. Tune name
@@ -89,6 +100,28 @@
   \end{figure}
 }
 
+% Add blank pages to make total page count up to a multiple
+% Args are:
+%   1. Multiple desired
+%   2. Pages before start of current page count
+\newcounter{modpage}
+\newcounter{modpageno}
+\newcounter{modpagenodiv}
+\newcommand{\padpages}[2]{%
+    \pagestyle{empty}%
+    \setcounter{modpageno}{\thepage + #2}%
+    \setcounter{modpagenodiv}{\themodpageno/#1}%
+    \setcounter{modpage}{\themodpageno - #1*\themodpagenodiv}%
+    \ifthenelse{\themodpage=0}%
+        {\relax}%
+        {\setcounter{modpage}{#1 - \themodpage}%
+            \whiledo{\themodpage>0}{%
+                \mbox{}\clearpage\mbox{}%
+                \setcounter{modpage}{\themodpage - 1}%
+            }% end whiledo
+        }% end ifthenelse
+}% end padpages
+
 % ----- Paper size document setup
 
 \input{docsetup.tex}
@@ -237,6 +270,9 @@
 
 \tableofcontents
 
+\newcounter{lastfrontmatterpage}
+\setcounter{lastfrontmatterpage}{\value{page}}
+
 % -----
 
 \mainmatter
@@ -245,8 +281,6 @@
 
 % -----
 
-\cleardoublepage
-
 \chapter{List of tune first lines}
 
 You know the feeling. Everyone has just launched into a well-loved tune.