# Beamer: Aspect ratio of notes and slides

This is intended as a follow-up question to this. That question did not get any answer (but focuses also on a slightly different situation).

Consider the following: I have a presentation that I want to be in aspect ratio 16:9. However I also use beamer to create note slides (using the option notes=only). Those I want to have as 4:3 slides (for reasons of printing and convenience).

Now, of course I could switch the aspectratio option every time I switch from notes to presentation and vice versa (what by the way destroys the layout within the slide preview), but isn't there any other solution?

(I would also be interested, why the slide preview isn't really right-aligned with the aspectratio=169 option.)

\documentclass[aspectratio=169,notes=only]{beamer}

\begin{document}
\begin{frame}{Testtitle}
This is a test slide.
\end{frame}
\note[itemize]{\item A note}
\end{document}


Edit: Because Dr. Manuel Kuehner thought of beamerarticle: I do those notes for me (not as handout), they are just a help for presenting. This is not intended to get some article-like document, but just a small preview of the slide and the notes (as beamer at least does for 4:3).

• As to "why the slide preview isn't really right-aligned" (not a solution, just an explanation): Most probably because in the default template for the note page, there are quite a lot of hard coded values in cm. If you would adjust them, you could probably have the preview right aligned. – samcarter_is_at_topanswers.xyz Mar 16 '17 at 16:17
• @samcarter Thank you for the reply. I thought that this extra topic would boil down to hard coded lengths. Hopefully there's someone who also knows something about the rest. – TeXnician Mar 16 '17 at 20:39

Would it be enough if the aspect ratio is automatically determined if or if not you are compiling your notes?

I replaced the deprecated option notes=only with \setbeameroption{show only notes}

\documentclass{beamer}

% Comment and uncomment here to switch between notes and frames
%\setbeameroption{show only notes}

\makeatletter
\ifbeamer@notesnormals%
\beamer@paperwidth 16.00cm%
\beamer@paperheight 9.00cm%
\geometry{papersize={\beamer@paperwidth,\beamer@paperheight}}
\fi%
\makeatother

\begin{document}
\begin{frame}{Testtitle}
This is a test slide.
\end{frame}
\note[itemize]{\item A note}
\end{document}


To deal with the aspect ration, one maybe could take advantage of the fact that you are compiling your slides and the notes separately. My idea is to first compile the slides, let's call the resulting pdf slides.pdf. Now assuming that every slide has a corresponding notes page, one can replace the preview by a page from the previously compiled slides.

\documentclass{beamer}

% Comment and uncomment here to switch between notes and frames
\setbeameroption{show only notes}

\makeatletter
\ifbeamer@notesnormals%
\beamer@paperwidth 16.00cm%
\beamer@paperheight 9.00cm%
\geometry{papersize={\beamer@paperwidth,\beamer@paperheight}}
\fi%

\setbeamertemplate{note page}{%
{%
\scriptsize
\usebeamerfont{note title}\usebeamercolor[fg]{note title}%
\ifbeamercolorempty[bg]{note title}{}{%
\insertvrule{.25\paperheight}{note title.bg}%
\vskip-.25\paperheight%
\nointerlineskip%
}%
\vbox{
\hfill\includegraphics[height=0.25\paperheight, page=\thepage]{slides}\hskip-\Gm@rmargin\hskip0pt%
\vskip-0.25\paperheight%
\nointerlineskip
\begin{pgfpicture}{0cm}{0cm}{0cm}{0cm}
\begin{pgflowlevelscope}{\pgftransformrotate{90}}
{\pgftransformshift{\pgfpoint{-2cm}{0.2cm}}%
\pgftext[base,left]{\usebeamerfont{note date}\usebeamercolor[fg]{note date}\the\year-\ifnum\month<10\relax0\fi\the\month-\ifnum\day<10\relax0\fi\the\day}}
\end{pgflowlevelscope}
\end{pgfpicture}}
\nointerlineskip
\vbox to .25\paperheight{\vskip0.5em
\hbox{\insertshorttitle[width=8cm]}%
\setbox\beamer@tempbox=\hbox{\insertsection}%
\hbox{\ifdim\wd\beamer@tempbox>1pt{\hskip4pt\raise3pt\hbox{\vrule
width0.4pt height7pt\vrule width 9pt
height0.4pt}}\hskip1pt\hbox{\begin{minipage}[t]{7.5cm}\def\breakhere{}\insertsection\end{minipage}}\fi%
}%
\setbox\beamer@tempbox=\hbox{\insertsubsection}%
\hbox{\ifdim\wd\beamer@tempbox>1pt{\hskip17.4pt\raise3pt\hbox{\vrule
width0.4pt height7pt\vrule width 9pt
height0.4pt}}\hskip1pt\hbox{\begin{minipage}[t]{7.5cm}\def\breakhere{}\insertsubsection\end{minipage}}\fi%
}%
\setbox\beamer@tempbox=\hbox{\insertshortframetitle}%
\hbox{\ifdim\wd\beamer@tempbox>1pt{\hskip30.8pt\raise3pt\hbox{\vrule
width0.4pt height7pt\vrule width 9pt
height0.4pt}}\hskip1pt\hbox{\insertshortframetitle[width=7cm]}\fi%
}%
\vfil}%
}%
\ifbeamercolorempty[bg]{note page}{}{%
\nointerlineskip%
\insertvrule{.75\paperheight}{note page.bg}%
\vskip-.75\paperheight%
}%
\vskip.25em
\nointerlineskip
\insertnote
}

\makeatother

\begin{document}
\begin{frame}{Testtitle}
This is a test slide.
\end{frame}
\note[itemize]{\item A note}

\begin{frame}{Testtitle}
This is a test slide.
\end{frame}
\note[itemize]{\item A note}

\end{document}


To automatically compile everything, you could use a script or an automation tool like arara to automatically compile the following sequence of commands:

pdflatex -jobname=slides test
pdflatex "\PassOptionsToClass{notes=only}{beamer}\input{test}"


(assuming your file is called test.tex)

• That's a good starter, but unfortunately there's one important thing missing. This version totally destroys the preview with some very full slides and that's the point I was asking for. Is there a version to manipulate the size of the preview the same way? – TeXnician Mar 16 '17 at 21:10
• @TeXnician Please see my edit. – samcarter_is_at_topanswers.xyz Mar 16 '17 at 21:30
• +1 That works at least to solve my problem. Is there a way to automate the procedure (for notes if file slides does not exist firstly create it and then use it)? I don't know, maybe it is possible to set \jobname. – TeXnician Mar 17 '17 at 5:23