# "Undefined control sequence" error using handoutWithNotes

I'd like to print handout slides with handoutWithNotes package associated with beamer, but a simple try

\documentclass[handout]{beamer}
\usepackage{pgfpages}
\usepackage{handoutWithNotes}
\pgfpagesuselayout{2 on 1 with notes}[a4paper,border shrink=5mm]

\begin{document}
\begin{frame}
My first slide
\end{frame}
\begin{frame}
Second one
\end{frame}
\begin{frame}
Third
\end{frame}
\end{document}


returned me always the error message such as

! Undefined control sequence.
\@begindocumenthook ...ox { \vskip .05\pageheight
Notes\vskip .1\pageheight ...
l.8 \begin{document}


Apparently it comes with \pgfpagesuselayout{2 on 1 with notes}[a4paper,border shrink=5mm] "with notes" argument.

I run the file either with MiKTeX 2.8 or 2.9, either under Windows XP or Windows 10.

• The package handoutWithNotes would appear to be somewhat uncommon. Is it available online? If so, where?
– Mico
Dec 2 '19 at 8:26
• I get an error ! LaTeX Error: File handoutWithNotes.sty' not found.. Dec 2 '19 at 8:26
• I get the same error as the post owner! @UlrikeFischer, you have to copy the package into your project folder or install it with MikTeX before you can use it Dec 10 '19 at 17:24
• @Mico guidodiepen.nl/2009/07/… that's where the package is from Dec 10 '19 at 22:09

What fixed it for me was replacing \pageheight with \paperheight everywhere in handoutWithNotes.sty`. See also https://github.com/gdiepen/latexbeamer-handoutWithNotes/pull/5.