From fdb9d7d5af44502b77fe0d937c21c024545bfc75 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Tue, 6 Aug 2019 20:50:23 +0100 Subject: [PATCH 1/5] Add Library transposition dirs in .hgignore, like Morris and Session. --- .hgignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgignore b/.hgignore index 400511c..0003815 100644 --- a/.hgignore +++ b/.hgignore @@ -16,3 +16,4 @@ web/Library.*/ web/tunes.*/ Morris-.* Session-.* +Library-.* From 66b6858437b69c78834715c4f2406189bb3617f0 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Tue, 6 Aug 2019 22:24:02 +0100 Subject: [PATCH 2/5] Don't \cleardoublepage before mainmatter or backmatter. --- dottes.tex | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dottes.tex b/dottes.tex index ac9659e..9388142 100644 --- a/dottes.tex +++ b/dottes.tex @@ -47,6 +47,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 @@ -245,8 +254,6 @@ in 2018. % ----- -\cleardoublepage - \chapter{List of tune first lines} You know the feeling. Everyone has just launched into a well-loved tune. From e7f4b4995f617ec565703567ba4ae9efdb05f5a0 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Tue, 6 Aug 2019 23:29:51 +0100 Subject: [PATCH 3/5] Round A4 up to a multiple of 4 total pages. I can't easily get the number of actual pages processed, so rely on telling the (rather hacky, and surprising - I have to divide to a separate counter to force an integer result) macro the number of pages used before the current numbering started. --- docend.A4.tex | 1 + dottes.tex | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/docend.A4.tex b/docend.A4.tex index c54e624..c48a883 100644 --- a/docend.A4.tex +++ b/docend.A4.tex @@ -1,3 +1,4 @@ +\padpages{4}{8} \pagecolor{havocpurple} \thispagestyle{empty} \mbox{} diff --git a/dottes.tex b/dottes.tex index 9388142..c98657d 100644 --- a/dottes.tex +++ b/dottes.tex @@ -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} @@ -98,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} From 8450b2dfa442bbe0df995bc7d10a6f61f3e17211 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Wed, 7 Aug 2019 00:01:44 +0100 Subject: [PATCH 4/5] Encourage A4 to page break before a tune. This enourages page breaks to happen before tune start, and not between the tune image and any following wording. Also move the vfill to the tune start. That way, if the break does not happen, the vfill will, and the following tune will be spaced down to the bottom of the page if it's the only other tune on the page. Otherwise everything tends to clump at the top of the page. --- docsetup.A4.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docsetup.A4.tex b/docsetup.A4.tex index 1fde6c9..9d0ce11 100644 --- a/docsetup.A4.tex +++ b/docsetup.A4.tex @@ -38,5 +38,5 @@ % Page appearance. \newcommand*{\pagestylemod}{} -\newcommand*{\tunestart}{} -\newcommand*{\tuneend}{\vfill} +\newcommand*{\tunestart}{\filbreak\vfill} +\newcommand*{\tuneend}{} From 4b6e14d20d74f70899be41240085a33804d1e3b0 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Wed, 7 Aug 2019 08:21:23 +0100 Subject: [PATCH 5/5] Update page padding to work with variable length front matter. --- docend.A4.tex | 14 +++++++++++++- docsetup.A4.tex | 4 +++- dottes.tex | 3 +++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docend.A4.tex b/docend.A4.tex index c48a883..d9432a6 100644 --- a/docend.A4.tex +++ b/docend.A4.tex @@ -1,4 +1,16 @@ -\padpages{4}{8} +% 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{} diff --git a/docsetup.A4.tex b/docsetup.A4.tex index 9d0ce11..76c1062 100644 --- a/docsetup.A4.tex +++ b/docsetup.A4.tex @@ -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] diff --git a/dottes.tex b/dottes.tex index c98657d..9c8e583 100644 --- a/dottes.tex +++ b/dottes.tex @@ -270,6 +270,9 @@ in 2018. \tableofcontents +\newcounter{lastfrontmatterpage} +\setcounter{lastfrontmatterpage}{\value{page}} + % ----- \mainmatter