14

I've asked this on SO and didn't get a good answer, so I'm reposting it here.


I've been using the beamer class to create presentations in LaTeX and I love it. Recently I started using the \note command to add notes to my handout so that I have a printed version with some pointers to remind myself of things I want to say in the lecture.
I have a problem with the longer lines in the notes environment as they seems to spill out of the right end of the page without formatting correctly. I don't know if this is so for a reason, but in any case, I would like to find out how to change it. Clearly, I do not want to change the width of the text everywhere, only in the note environment.

Here is a minimal example:

\documentclass[beamer]{beamer}
\title{An example of itemize in notes not working in beamer}
\usetheme{Boadilla}
\setbeameroption{show notes}
\begin{document}
\begin{frame}
$$  e^{i\pi}+1=0$$
\end{frame}
\note[itemize]{
\item At vero eos et accusamus et iusto odio dignissimos ducimus qui blandiis pra
}
\end{document}

which results in: alt text

Without the [itemize] option it works fine. If you put a \begin{itemize}...\end{itemize} environment manually the result is the same.

Any ideas?

Thanks

  • Not sure if this is helpful information to anyone trying to solve a problem like this, but I noticed that changing the theme from Boadilla to something else, or deleting the reference to a theme altogether, solved the problem. FWIW, the two themes I used to test this were Warsaw and Berlin – Digger Dec 1 '15 at 4:29
  • I'd like to add that I found the above to be true for the following versions of Beamer: 3.07-2 and 3.10-2. – Digger Dec 1 '15 at 16:40
13

I've isolated the problem down to the infolines outer theme and specifically the line:

\setbeamersize{text margin left=1em,text margin right=1em}

towards the end. What seems to be happening is that the note templates aren't quite configured correctly with regard to changing the margins. Some length that the itemize environment uses to figure out its width is not getting set correctly when using notes. As I've not much idea which lengths these are, and which beamer mucks about with, I've not much of an idea as to how to properly fix this.

However, I have a way to improperly fix this. What I found was that by putting the note within a minipage environment of the right width worked. That reset all the correct widths to the right ones without my having to know any of the 'orrible details! Of course, that's a bit annoying to put in every time so it's possible to force it by modifying the beamer template for the notes page. Copying out the default one, and adding the necessary lines, I arrived at:

\makeatletter
\defbeamertemplate{note page}{infolines}
{%
  {%
    \scriptsize
    \insertvrule{.25\paperheight}{white!90!black}
    \vskip-.25\paperheight
    \nointerlineskip
    \vbox{
      \hfill\insertslideintonotes{0.25}\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]{\footnotesize\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}%
  }%
  \vskip.25em
  \nointerlineskip
  \begin{minipage}{\textwidth} % this is an addition
  \insertnote
  \end{minipage}               % this is an addition
}
\makeatother

\setbeamertemplate{note page}[infolines]

and that seemed to work fine!

2

In case you want to correct the right margin of note pages in "plain" style:

\makeatletter
\defbeamertemplate{note page}{plain2}
{
  \vskip.25em
  \nointerlineskip
  \begin{minipage}{\textwidth} % this is an addition
  \insertnote
  \end{minipage}               % this is an addition
}
\makeatother

\setbeamertemplate{note page}[plain2]
\setbeameroption{show notes on second screen}

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.