Changing the textwidth of the notes in Beamer (repost from SO)

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!


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}