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 »

Hi Johannes, thanks for coming back to me!

This is my entire main.tex:

Code: Select all

Code, edit and compile here:
\documentclass[
11pt,english, onehalfspacing, nolistspacing, liststotoc, headsepline,oneside,
chapterinoneline, reqno, a4paper
%consistentlayout, change the layout of the declaration, abstract and acknowledgements pages to match the default layout
]{MastersDoctoralThesis}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsthm, amsmath, amssymb, amsfonts, exscale, latexsym, float, eucal, mathtools}
\usepackage{booktabs, floatrow, threeparttable, adjustbox, textcomp, mathpazo, lipsum}
\usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex}
\usepackage[autostyle=true]{csquotes}
\usepackage{apacite}
\bibliographystyle{apacite}
\addbibresource{References.bib}
%----------------------------------------------------------------------------------------
% ADDITIONAL THESIS FORMATTING
%----------------------------------------------------------------------------------------
\AtBeginDocument{
\hypersetup{pdftitle=\ttitle} % Set the PDF's title to your title
\hypersetup{pdfauthor=\authorname} % Set the PDF's author to your name
\hypersetup{pdfkeywords=\keywordnames} % Set the PDF's keywords to your keywords
}
\renewcommand{\chapterbelowskip}{\vspace{20pt}} % spacing after chapter title
\renewcommand*\chaptermarkformat{\chapapp \thechapter\enskip}
\renewcommand{\chapterfont}{\LARGE\bfseries}
\newcommand{\E}{\mathrm{E}}
\newcommand{\Var}{\mathrm{Var}}
\renewcommand{\baselinestretch}{1.2} % in-text line spacing
\makeatletter % align list of figures and tables
\renewcommand*\l@figure{\@dottedtocline{2}{0em}{3.2em}}
\renewcommand*\l@table{\@dottedtocline{2}{0em}{3.2em}}
\makeatother
%----------------------------------------------------------------------------------------
% MARGIN SETTINGS
%----------------------------------------------------------------------------------------
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Where do you suggest to add in those lines? Because it didn't have the desired effect, yet.
What does

Code: Select all

Code, edit and compile here:
\makeatletter
\patchcmd{\scr@startchapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
do?

Thanks again! Best, Sean

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
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

\usepackage{apacite}
\bibliographystyle{apacite}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
You have to get errors with that. Those packages are incompatible with biblatex, which you are using a few lines earlier.

When did i tell you to use

Code: Select all

Code, edit and compile here:
\makeatletter
\patchcmd{\scr@startchapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
? Never.
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 »

I'll remove those few lines, not sure why I added them.

I've tried your suggestion in the preamble, but unfortunately it did not remove the blank spaces.
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 tested it, it does work.
Please show us a minimal working example.
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 »

Code: Select all

Code, edit and compile here:
\documentclass[
11pt,english, onehalfspacing, nolistspacing, liststotoc, headsepline,oneside,
chapterinoneline, reqno, a4paper
%consistentlayout, change the layout of the declaration, abstract and acknowledgements pages to match the default layout
]{MastersDoctoralThesis}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsthm, amsmath, amssymb, amsfonts, exscale, latexsym, float, eucal, mathtools}
\usepackage{booktabs, floatrow, threeparttable, adjustbox, textcomp, mathpazo, lipsum}
\usepackage[backend=bibtex, style=apa, natbib=true]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\usepackage[autostyle=true]{csquotes}
\addbibresource{References.bib}
%----------------------------------------------------------------------------------------
% ADDITIONAL THESIS FORMATTING
%----------------------------------------------------------------------------------------
\AtBeginDocument{
\hypersetup{pdftitle=\ttitle} % Set the PDF's title to your title
\hypersetup{pdfauthor=\authorname} % Set the PDF's author to your name
\hypersetup{pdfkeywords=\keywordnames} % Set the PDF's keywords to your keywords
}
\renewcommand{\chapterbelowskip}{\vspace{20pt}} % spacing after chapter title
\renewcommand*\chaptermarkformat{\chapapp \thechapter\enskip}
\renewcommand{\chapterfont}{\LARGE\bfseries}
\newcommand{\E}{\mathrm{E}}
\newcommand{\Var}{\mathrm{Var}}
\renewcommand{\baselinestretch}{1.2} % in-text line spacing
\makeatletter % align list of figures and tables
\renewcommand*\l@figure{\@dottedtocline{2}{0em}{3.2em}}
\renewcommand*\l@table{\@dottedtocline{2}{0em}{3.2em}}
\makeatother
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\newcommand{\checktoopen}{%
\ifdef{\phantomsection}{\phantomsection}{}%
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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 »

The error messages never bothered you? Never mentioned them?
I made a copy mistake, it needs to be \renewcommand{\checktoopen}

Nevertheless, the fix works for your example, if i just ignore all error messages. Like using float and floatrow together. Or the fact that `\chapapp` is undefined.

Code: Select all

Code, edit and compile here:
\documentclass[
11pt,english, onehalfspacing, nolistspacing, liststotoc, headsepline,oneside,
hapterinoneline, reqno, a4paper,
nohyperref% For the MWE
%consistentlayout, change the layout of the declaration, abstract and acknowledgements pages to match the default layout
]{MastersDoctoralThesis}
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\renewcommand{\checktoopen}{%
\ifdef{\phantomsection}{\phantomsection}{}%
}
\makeatletter
\begin{document}
\frontmatter
\pagestyle{plain}
\tableofcontents
\clearpage%\newpage% Do not use \newpage if you don't understand it
\listoffigures
\listoftables
\mainmatter
\pagestyle{thesis}
\chapter{Wombat}
\chapter{Capybara}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
What you see above is a minimal working example. What happens if you run exactly that code? Please show the log file as well (as attachment).
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 »

Errors:

1. Package floatrow Error: Do not use float package with floatrow.
2. Package biblatex Error: Biber backend is required by style.
3. Package biblatex Error: Option 'sorting=apa' invalid.

Is that what you need?
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 »

Seanshine wrote:Errors:

1. Package floatrow Error: Do not use float package with floatrow.
2. Package biblatex Error: Biber backend is required by style.
3. Package biblatex Error: Option 'sorting=apa' invalid.

Is that what you need?
No, this is what you need to fix.
What happens if you run exactly that code? Please show the log file as well (as attachment).
You did not answer my question.
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 »

I am working in ShareLatex, I clicked ''logs and output files''.

With running 'exactly that code' you mean open a 'blank' MastersDoctoralClass.cls and post in your code in the main?
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 »

Yes, use a fresh copy of the template and use the code i posted as main.
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