Foggalong / edinburgh-math-latex

LaTeX templates for the University of Edinburgh's School of Mathematics
LaTeX Project Public License v1.3c
8 stars 3 forks source link

Option to Avoid Blank Pages for Unnumbered Chapters #14

Closed Syuizen closed 2 months ago

Syuizen commented 3 months ago

Hi there,

First off, thank you for providing this excellent stylesheet! It has been a pleasure to use, and it really makes the thesis writing process much smoother.

I've just started working on my thesis, and I noticed that when using the twoside option, the stylesheet enforces all chapters to begin on odd-numbered pages. While this is great for numbered chapters, it results in undesired blank pages between certain unnumbered chapters like the abstract and lay summary, as well as chapters like acknowledgement.

An ugly way to fix

To address this, I’ve temporarily redefined the \cleardoublepage command for these specific unnumbered chapters, so they don’t force a new odd-numbered page. Here's a snippet of how I’ve done this:

\begin{document}

% Temporarily redefine \cleardoublepage
\let\origcleardoublepage\cleardoublepage
\let\cleardoublepage\clearpage

\flushbottom
\pagenumbering{roman}

\maketitle

\declaration{}

\abstract{}

\laysummary{}

\tableofcontents

% Restore original  \cleardoublepage behaviour
\let\cleardoublepage\origcleardoublepage

Other thoughts

It would be fantastic if the stylesheet could include an option or a more elegant solution to handle these unnumbered chapters without inserting blank pages. This would help avoid the need for users to manually redefine commands or implement workarounds, ensuring a cleaner and more intuitive experience.

Thank you for considering this request, and I appreciate all the work that’s gone into this project!

Foggalong commented 3 months ago

Thanks for this feature request!

I did a quick check that this was allowable within the thesis guidelines, but neither they nor the supporting documents say anything either way. Looking at a theses outside the School of Maths (where most people use either this stylesheet or the one that preceded it), it looks like there's no standard on whether to clear the double page through the unnumbered chapters or not. There's this example which doesn't from Business, and this example which does from Law. So all good!

I'll see if I can add a feature which more elegantly provides this as an option for you :slightly_smiling_face:

Foggalong commented 2 months ago

Hey @Syuizen, I've done some digging and the behaviour you mention here

when using the twoside option, the stylesheet enforces all chapters to begin on odd-numbered pages

isn't actually a feature of edmaths, it'll be a feature of the document class you're using. Building on your example, when I compile the document below

\documentclass[12pt,twoside]{report}

\title{Thesis Title}
\author{Author Name}
\date{YYYY}

\usepackage{lipsum}
\usepackage[phd]{edmaths}

\begin{document}

\flushbottom
\pagenumbering{roman}

\maketitle

\declaration{\lipsum[21-22]}

\abstract{\lipsum[23-24]}

\laysummary{\lipsum[25-26]}

\tableofcontents

\chapter{Theorems}

\lipsum[1-10]

\chapter{Examples}

\lipsum[10-20]

\end{document}

some of the chapters (both numbered and unnumbered) do actually start on even pages.

Screenshot from 2024-08-30 16-01-45

If I then change the document class to book for example,

\documentclass[12pt,twoside]{book}

I get a document which looks a lot more like the one you described with many blank pages in places it's unnecessary to have them. My guess is that you're using the book class or another class which is built on top of book.

Screenshot from 2024-08-30 16-09-52

If you don't want / are unable to switch to a document class like report, then then workaround you've come up with is probably the best solution. That said, make sure your initial redefining of \cleardoublepage comes after \maketitle rather than before it.

\maketitle

% Temporarily redefine \cleardoublepage
\let\origcleardoublepage\cleardoublepage
\let\cleardoublepage\clearpage

\declaration{}

While it's not a requirement that chapters start on odd pages, it is a requirement that the initial title page is followed by a blank page. With this change, it produces something like you desired, with the book class, and which is still compatible with the university typesetting rules.

Screenshot from 2024-08-30 16-17-29

Hope that's helpful, and let me know if you've any questions!

Syuizen commented 2 months ago

Hi @Foggalong , thanks a lot for the follow-up. Yes, such behaviour is related to the specific documentclass. Thanks for the tip about redefining the \cleardoublepage after the \maketitle! Nice catch, I totally overlooked it.