3

Solved by inserting this in the preamble (made by touhami from the comments):

\makeatletter \def\clearforchapter{\clearpage\if@twoside \ifodd\c@page\else \hbox{}\vfill\begin{center}This page intentionally left blank.\end{center}\vfill \thispagestyle{cleared}%
\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}\makeatother

This puts the line in the middle of the blank page.


Who do I write “This page intentionally left blank.” on left (even numbered) blank pages? I've searched and found many solutions, which doesn't work with my setup. My custom made chapters start on a right (odd numbered) side. Solutions that I've found, but didn't work for me:
How do I make pages which were "intentionally left blank"?
How to make "This page intentionally left blank." in KOMA script
"This page was left intionally blank" on center of page
https://gist.github.com/philipptempel/5220000

My setup is like this (If you were wondering, my notes are in Danish):

Preamble:

\documentclass[a4paper,11pt,oldfontcommands]{memoir}
\setlrmarginsandblock{2.5cm}{1.5cm}{1} 
\setulmarginsandblock{2.5cm}{*}{1} 
\setheadfoot{2\onelineskip}{\footskip}
\checkandfixthelayout
\usepackage{tikz}
\usepackage{lipsum}
\usetikzlibrary{positioning}

%%%%%%
% CHAPTER STYLES
%%%%%%
\makechapterstyle{simple}{
  \renewcommand*{\printchaptername}{}
  \setlength{\afterchapskip}{1cm}       
  \renewcommand*{\printchaptertitle}[1]{\flushleft\chaptitlefont##1}
  }

\makechapterstyle{box}{%
  \setlength{\midchapskip}{-58pt}       %
  \setlength{\afterchapskip}{10mm}      %
  \renewcommand*{\printchaptername}{}   %
  \renewcommand*{\printchapternum}{     %
    \flushleft
    \begin{tikzpicture}
      \draw [fill=black] (0,0) rectangle (2cm,2cm);
      \node [text=white] at (1cm,1cm) { \chapnumfont\thechapter };
    \end{tikzpicture}}%
  \renewcommand{\printchaptertitle}[1]{%
        \hspace*{30mm}\chaptitlefont\MakeUppercase{##1}}} 

\makeatletter
\settocpreprocessor{chapter}{%
  \let\tempf@rtoc\f@rtoc%
  \def\f@rtoc{%
  \texorpdfstring{\MakeTextUppercase{\tempf@rtoc}}{\tempf@rtoc}}%
}
\makeatother

%%%%%%
% gør at subsections også nummeres
%%%%%%
\setsecnumdepth{subsection}
\usepackage{graphicx}
\usepackage{framed}
\usepackage[danish]{babel}

%%%%%%
% PAGESTYLE
%%%%%%
\copypagestyle{chapter}{plain} %Dette kopierer "plain"-stilen, så den kan overskrives, og sætte sidetal på højre/venstre side ved kapitelstart.
\makeoddfoot{chapter}
  {}% Venstre side.
  {}% Midten.
  {\thepage}% Højre side.
\makeevenfoot{chapter}
  {\thepage}% Venstre side.
  {}% Midten.
  {}% Højre side.

\makepagestyle{bachelor}
\makepsmarks{bachelor}{
  \createmark{chapter}      {both}{shownumber}{}{. \ }
  \createmark{section}      {both}{shownumber}{}{ -\ } 
}
\makeoddhead{bachelor}%
  {}%
  {}%
  {\rightmark}%
\makeevenhead{bachelor}%
  {\leftmark}%
  {}%
  {}
% sidens fod: sidetal/sidste side
\makeoddfoot{bachelor}
  {} %venstre side.
  {} %midten.
  {\thepage} %højre side.
\makeevenfoot{bachelor}
  {\thepage} %venstre side.
  {} %midten.
  {} %højre side.
% smid en linje under
\makeheadrule{bachelor}{\textwidth}{\normalrulethickness}

%%%% Laver pagestyle til appendiks
\makepagestyle{appendiks}
\makepsmarks{appendiks}{
  \createmark{chapter}      {both}{shownumber}{}{ -\ }
}
\makeoddhead{appendiks}%
  {}%
  {}%
  {\rightmark}%
\makeevenhead{appendiks}%
  {\leftmark}%
  {}%
  {}
\makeoddfoot{appendiks}
  {} %venstre side.
  {} %midten.
  {\thepage} %højre side.
\makeevenfoot{appendiks}
  {\thepage} %venstre side.
  {} %midten.
  {} %højre side.
\makeheadrule{appendiks}{\textwidth}{\normalrulethickness}

\nouppercaseheads
\pagestyle{bachelor}
%%%%%%

Content:

\begin{document}
\chapterstyle{simple}

\chapter*{Chapter guide}
Gives an overview and acts as a guide for the report.
\tableofcontents* 
\chapterstyle{box} 
\pagestyle{bachelor}

\chapter{First Chapter}
\lipsum

\chapterstyle{simple} 
\bibliography{sources} 
\chapterstyle{box}
\pagestyle{appendiks}

\appendix
\input{appendix.tex} 
\end{document}

Any help is greatly appreciated.

  • please make your code minimal. All these packages are necessary? We don't need the included pdf and it's better if you replace \input{some.tex} with some bla bla text. – touhami Sep 26 '15 at 11:56
  • 1
    you can try: \makeatletter \def\clearforchapter{\clearpage\if@twoside \ifodd\c@page\else \hbox{}This page intentionally left blank.\thispagestyle{cleared}% \newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}\makeatother – touhami Sep 26 '15 at 12:14
  • touhami, your suggestion works. The line is set to the top left corner. Is it possible to use \center or something like it, to have the line displayed in the middle of the page (both the middle of the horizontal and vertical axes)? – user38934 Sep 26 '15 at 12:24
  • you can do any thing you want. – touhami Sep 26 '15 at 12:42
  • 1
    for example \vfill\begin{center}This page intentionally left blank\end{center}\vfill – touhami Sep 26 '15 at 13:02
5

Solved by inserting this in the preamble (made by touhami from the comments):

\makeatletter \def\clearforchapter{\clearpage\if@twoside \ifodd\c@page\else \hbox{}\vfill\begin{center}This page intentionally left blank.\end{center}\vfill \thispagestyle{cleared}%
\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}\makeatother

This puts the line in the middle of the blank page.

4

Section 18.13 of the memoir manual (texdoc memman or texdoc memoir) deals with issues like this. For instance:

\chapter{One}
...
\cleartooddpage[\vspace*{\fill}\centering BLANK PAGE \vspace*{\fill}]
\chapter{Next}

will center BLANK PAGE both vertically and horizontally if the page before \chapter{Next} would be even numbered.

  • I have just tried this (without the suggestions from touhami), and it doesn't work. If I put it before a chapter, I get a compile error message. – user38934 Sep 26 '15 at 18:35
  • (+1, though I might add \thispagestyle{empty} to the optional argument.) @user38934 -- Note that "it doesn't work" and a "compile error" message is usually insufficient information for others to diagnose the problem. The code works for me.... – jon Sep 26 '15 at 20:04
  • 1
    I got it to work now. Using this method, doesn't make the page completely blank, but has my page number in the bottom corner - which is a nice option. One downside to this method could be that, the code has to be placed before every chapter to be effective, instead of writing it once in the preamble. – user38934 Sep 27 '15 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.