Page LayoutAvoid blank space after chapters

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Seanshine
Posts: 52
Joined: Sat Apr 28, 2018 9:59 pm

Avoid blank space after chapters

Post by Seanshine »

Dear readers,

1. Within this class file. What does one add to the preamble to avoid blank space between chapters?
2. How can I have the list of figures and list of tables on the same page? And, how does one arrange the alignment in these lists? For example, it would prefer the figure/table numbers to be on the same vertical line as the title; at the moment there is a slight indent.
3. After \include{Appendices/Appendix}, how does one avoid the "A" in both the contents and the appendix title?

Thanks again!
Last edited by Seanshine on Fri Jul 06, 2018 10:07 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Avoid blank space after chapters

Post by Stefan Kottwitz »

Hi!

1. Which class file? And you you mean blank pages? Add "openany" as class options at the beginning.

2. This depends on the class file.

3. Use \chapter* or \addchap in the appendix.

Perhaps post some code, so we could talk about it specifically.

And btw. please make a topic for each separate question you have, in general. This keeps the forum sorted and we don't miss a question among others. Here is space for millions of topics / threads. ;-)

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Avoid blank space after chapters

Post by Johannes_B »

Code: Select all

\makeatletter
 \renewcommand*\l@figure{\@dottedtocline{2}{0em}{3.2em}}
 \renewcommand*\l@table{\@dottedtocline{2}{0em}{3.2em}}
 \makeatother
The list of figures, tables, as well as the table of contents are chapters. They always start on a new page.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Seanshine
Posts: 52
Joined: Sat Apr 28, 2018 9:59 pm

Avoid blank space after chapters

Post by Seanshine »

Of course the famous MastersDoctoralThesis.cls.

Stefan do you mean add 'openany' within the square brackets of:

\documentclass[
11pt,english, onehalfspacing, nolistspacing, liststotoc, headsepline,oneside,
chapterinoneline, reqno, a4paper, openany
%consistentlayout, change the layout of the declaration, abstract and acknowledgements pages to match the default layout
]{MastersDoctoralThesis}


'\addchap' WITHIN the appendix has worked! Thanks!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Avoid blank space after chapters

Post by Stefan Kottwitz »

Yes, within the square brackets.

Stefan
LaTeX.org admin
Seanshine
Posts: 52
Joined: Sat Apr 28, 2018 9:59 pm

Avoid blank space after chapters

Post by Seanshine »

Unforenately, 'openany' does not work; every new chapter starts on a new page, leaving blank space between chapters. I am I missing a package? Or is something in the class-file blocking it?

If I use \addchap with the appendix, is there still a way to number figures as 'A.1.' etc.?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Avoid blank space after chapters

Post by Johannes_B »

Every chapter starts on its own page by default. You don't want that behaviour? Please clarify.

I don't understand your point about the appendix. Please clarify.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Seanshine
Posts: 52
Joined: Sat Apr 28, 2018 9:59 pm

Avoid blank space after chapters

Post by Seanshine »

Correct. I would like to avoid blank space between chapters to reduce the number of pages (and save trees).

I posted some figures in the appendix which are now numbered '1,2,3,..' etc., because I used \addchap. I have changed it to 'A1, A2, etc.' again, but not sure if this is the correct way of doing so:

\appendix
\renewcommand{\thefigure}{A\arabic{figure}}
\setcounter{figure}{0}
\include{Appendices/Appendix}
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Avoid blank space after chapters

Post by Johannes_B »

I'll post a solution later today.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Avoid blank space after chapters

Post by Johannes_B »

Alright, i checked. I built something in that somethings act like chapters, although they are not. I remembered i had done something different that easily allows for every chapter what you want. I didn't.

So, there is only the hacky way: Add \let\clearpage\relax to your preamble.
Disclaimer: This might break something. Neither this class, nor the underlying book class is supposed to handle this.

Edit: This will definitely mess up page numbering. Better, add those lines to the preamble:

Code: Select all

\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\newcommand{\checktoopen}{%
	\ifdef{\phantomsection}{\phantomsection}{}%
}
\makeatletter
Disclaimer: Depending on what you use, well, in any case, the result will be extremely extremely ugly. There is a reason for consistency.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply