1

The following code is from (https://tex.stackexchange.com/a/443455/201720) and it works perfectly for making sure that new sections start on odd page numbers.

\documentclass[a4paper,10pt,twoside]{article}
\usepackage{blindtext}
\usepackage{etoolbox}
\pretocmd{\section}{\cleardoublepage}{}{}
\begin{document}
\section{One}
\blindtext
\section{two}
\blindtext
\end{document}

How can I edit this code to also have the blank pages say "This page intentionally left blank" in the center?

I have seen various solutions, but none of them seem to be for the article class.

3

I have borrowed \cleartooddpage from the memoir class which clears to the next odd page and can also put something on the skipped page.

% articleclearprob.tex  SE 566319
\documentclass[a4paper,10pt,twoside]{article}
\usepackage{blindtext}
\usepackage{etoolbox}

\makeatletter
% \cleartooddpage is from the memoir class
\newcommand{\cleartooddpage}[1][\@empty]{%
  \clearpage%
  \ifodd\c@page\else\hbox{}#1\clearpage\fi}
\makeatother
%  macro to clear to odd page and put a specific text at the centre of a skipped page
\newcommand{\leftblank}{%
  \cleartooddpage[\vspace*{\fill}\hfill This page intentionally left blank\hfill\vspace*{\fill}]}

%\pretocmd{\section}{\cleardoublepage}{}{}
\pretocmd{\section}{\leftblank}{}{}

\begin{document}
\section{One}
\blindtext
\section{two}
\blindtext
\end{document}
3
  • Very helpful, thank you very much! I am not sure if I am the only one having this issue or if I have poor eyesight, however, it seems to me that the text "This page intentionally left blank" is a bit of off the center of the page.
    – Aziz
    Oct 12 '20 at 13:15
  • 1
    @Aziz It is centered on an even numbered page. It is up to you how you specify the text and its position on the skipped page. Oct 12 '20 at 17:17
  • Right... I will try to figure it out. Thank you again.
    – Aziz
    Oct 13 '20 at 4:56

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.