2

I have slides (slides.pdf; my own construction based on scrartcl) to teach from. Students asked to put in blank slides (to have space to put down notes). I first tried to write a shell script (getting the page number from slides.pdf, creating a second document blanks.pdf (same number of pages) with just blank pages, then merging the two with pdftk), but it's tedious and requires various tools. I am wondering if this can be done in LaTeX. I only have some explicit \clearpage statements, but when there are longer formulas (extending over a page), there is an automatic page break on the slides. I could imagine LaTeX knows when these page breaks happen, so if there is a way to tell LaTeX to put in two page breaks instead of just one, that would nicely give empty pages. Any ideas? Ideally, the page numbers should not advance... hope that's possible (?)

\documentclass{scrartcl}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{blindtext}
\begin{document}
\blindtext[4]
{\allowdisplaybreaks
  \begin{align*}
    &\phantom{{}\Leftrightarrow{}}\ \langle X_n-\hat{X}_n,Y\rangle=0,\quad\forall\,Y\in\mathcal{H}_{n-1}\\
    &\Leftrightarrow\ \underbrace{\langle
      X_n-\hat{X}_n,\sum_{k=1}^{n-1}\alpha_kX_{n-k}\rangle}_{=\,\sum_{k=1}^{n-1}\alpha_k\langle
      X_n-\hat{X}_n,X_{n-k}\rangle}=0,\quad\forall\,\alpha_1,\dots,\alpha_{n-1}\\
    &\Leftrightarrow\underbrace{\langle X_n-\hat{X}_n,X_l\rangle}_{\substack{
      =\,E((X_n-\sum_{k=1}^{n-1}\phi_{n-1,k}X_{n-k})X_l)\\
    =\,E(X_nX_l)-\sum_{k=1}^{n-1}\phi_{n-1,k}E(X_{n-k}X_l)}}\hspace{-10mm}=0,\quad\forall\,l\in\{1,\dots,n-1\}\\
    &\Leftrightarrow\ \gamma(n-l)=\sum_{k=1}^{n-1}\gamma(n-k-l)\phi_{n-1,k}\\[-1mm]
    &\Leftrightarrow\ \gamma(h)=\sum_{k=1}^{n-1}\gamma(h-k)\phi_{n-1,k},\quad\forall\,h\in\{1,\dots,n-1\}\\[-1mm]
    &\Leftrightarrow\
      \Gamma_{n-1}\bm{\phi}_{n-1}=\bm{\gamma}_{n-1}
  \end{align*}}%
\end{document}

I also found this and then tried the solution there, but it only puts in one empty page (on the next page break after the command). I wonder if this can be adjusted (?)

Another option would be to actually use a two-sided layout (and put in empty pages if the page is an even page)... but that seems to be quite a bit intrusive.

Longer Update

A minimal example of what John suggested worked well. However, when I put it in my real document, I obtained weird errors. I then did the obvious, namely minimize the document to a MWE. Here it is. And, yes, it is minimal... whenever I omit a line of the following, it will produce an error, even if I replace words in the text by other words... very strange. The error is:

LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.58   \item A
               (model for)
? 
\documentclass[paper=128mm:96mm, parskip=half-]{scrartcl}
\linespread{1.12}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{microtype}
\usepackage[includefoot, left=5mm, right=5mm, bottom=3.5mm, top=4mm, footskip=4mm]{geometry}
\usepackage{titlesec}
\usepackage{enumitem}
\usepackage{biblatex}
\usepackage{filecontents}
\usepackage{afterpage}
\setlist{
  align=left,
  labelsep=*,
  leftmargin=*,
  topsep=-1.2mm,
  itemsep=-1.4mm
}
\titlespacing{\subsubsection}{0mm}{0ex plus 1ex minus .2ex}{-0.8ex plus .2ex}
\setcounter{secnumdepth}{3}
\newcommand{\insertblanks}{\strut\newpage\afterpage{\insertblanks}}
\begin{filecontents*}{bib.bib}
@ARTICLE{bib:markowitz-52,}
@ARTICLE{bib:harrison-kreps-79,}
@ARTICLE{bib:harrison-pliska-81,}
\end{filecontents*}
\begin{document}
\afterpage{\insertblanks}
\subsection{Foo}
\subsubsection{Bar}
\subsubsection*{Foobar}
\begin{itemize}
\item foo bar foo bar
  \begin{itemize}
  \item or sell (\emph{put}) an asset at an agreed-upon
price (the \emph{strike price $K$}) during a predetermined period
(\emph{American}) or date (\emph{exercise date $T$}; \emph{European});
  \item \emph{Futures} (obligation for the buyer (seller) to purchase (sell) an asset at a predetermined date and price);
  \item \emph{Swaps} (any exchange of an asset for another to change the
         maturity (e.g., of a bond) or because investment objectives have changed; include currency swaps, interest rate swaps).
  \end{itemize}
\item Babylon of 1800 BC: early evidence for options to provide financial cover against crop failure
\end{itemize}
\subsubsection*{Academic innovation in the 20th century}
\begin{itemize}
\item Before 1950: Desirability of an investment was measured in terms of
its return.
\item \textcite{bib:markowitz-52}: Desirability of an investment was decided upon a risk-return diagram
(x-axis: risk, i.e., standard deviation; y-axis: expected
return). An \emph{efficient frontier} determined the optimal return for a
\item Late 20th century: Theory
      milestone for quantifying and managing financial risk)
\item Black--Scholes--Merton formula
      for the price of a European call option (Nobel Prize 1997)
\item \textcite{bib:harrison-kreps-79}, \textcite{bib:harrison-pliska-81}:
  Fundamental theorems of asset pricing
  \begin{enumerate}
  \item A (model for)
  \end{enumerate}
\end{itemize}
\end{document}
2
  • Do you want to preserve the current page numbers? Dec 2, 2015 at 17:06
  • Hi, yes, so the blank pages should contain nothing and the page number should not be advanced. Dec 2, 2015 at 17:59

4 Answers 4

2

Note: \newpage, \pagebreak and \clearpage do nothing to an empty page, so you need to add something invisible first. BTW, \clearpage is used primarily to clear the float queue.

\documentclass{scrartcl}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{afterpage}
\usepackage{mwe}

\newcommand{\repeatafter}{%
  \thispagestyle{empty}%
  \addtocounter{page}{-1}%
  \null\newpage
  \afterpage{\repeatafter}%
}

\begin{document}
\afterpage{\repeatafter}

\lipsum[1-16]
\end{document}
2
  • Hi John, thanks for helping. A MWE worked, but when I put it in my longer document, it failed. I updated my question with a 'MWE'... after using LaTeX for about 11 years now, I never found a strange (MW)Example like this. Do you see what's going on? Dec 2, 2015 at 21:39
  • It seems that itemize doesn't like \strut, but \null or \hbox{} (same thing) works in the new MWE. One would think that it doesn't matter what was going on when the page broke, but that seems not to be the case. Dec 3, 2015 at 4:58
0

Take a look at the package afterpage, which seems to do exactly what you would want. Load it in the preamble, and then on every page put \afterpage{${}$\clearpage}. It seems just \afterpage{\clearpage} doesn't do the job, so I put in an empty symbol ${}$ to make it work.

There's probably a neater way of doing this with this package, but that's the direction you should go.

1
  • See below my MWE. I don't know where the pages start/end, and afterpage can only do a specific page. Or do you have a global solution based on afterpage which does not require to treat every page manually? Dec 2, 2015 at 14:24
0

Due to my problems with the MWE I posted I realized another solution: I use geometry and scrartcl's paper option for creating slides in the right format. A very simple but powerful solution is then to simply adjust the bottom argument of geometry paired with a larger paper height. This way one 'fakes' a larger page and gets white space below each slide.

1
  • You can use \documentclass[multi={minipage},border=5mm]{standalone} and create indefinitily long pages..you would have to manually add white space at the end of each minipage, though. Dec 3, 2015 at 5:05
0

My suggestion (as your first attempted shell script), would be to make a new file, which takes your slides.pdf and gives a new pdf that includes the empty pages. The package pdfpages is very powerful for these kind of things. For your purpose, you can do the following:

\documentclass{article}
\usepackage{pdfpages}
\begin{document}

\includepdf[pages=-, fitpaper=true, pagecommand={\null\newpage}]{slides.pdf}

\end{document}

The pages=- option makes it take all the pages of the given pdf. The fitpaper=true makes the pages of the new pdf exactly the same size as your first original page. The pagecommand={\null\newpage} adds a new page after each inserted page. (The \null here is to put something empty on a new page).

Downside: this removes features of the document (as it just prints the pdf pages in a new pdf), like reference links in the file or the table of content in the pdf viewer. If this file is intended for printing, this does not matter.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .