# setbeamertemplage + beamerarticle = bug

I've tried to use the package beamerarticle to get notes from my teaching slides.

It seems that beamerarticle has a problem parsing the file with setbeamertemplate commands that have bracket arguments.

In the (almost minimal) example below, the command \setbeamertemplate{itemize item}[square] is simply ignored in beamerarticle mode.

When the command has two bracket arguments (like in the two other commands), it is worse: the second argument is considered plain text and thus the compiler outputs a "missing \begin{document} error though it is still parsing the preamble.

No error happens with the same doc when the documentclass is beamer.

MWE:

% Case 1 : beamer original : no problem
%\documentclass{beamer}

% Case 2 :  beamerarticle mode : compilation issue
\documentclass{article}
\usepackage{beamerarticle}

\usetheme{Hannover}

%-- beamer setup

% a command that compiles ok in both mode, but with no effect in beameraritcle ??
\setbeamertemplate{itemize item}[square]

% a command that compiles in beamer, but produces error in beamerarticle

%another one

%--end beamer setup

\begin{document}

\begin{frame}{A first frame}{}
\begin{itemize}
\item toto
\end{itemize}

\begin{block}{titleblock}
a bloc
\end{block}
\end{frame}

\end{document}


Any ideas?

Hi @pierre my approach is follow the pages 210-213 of beamer user guide for work with the package beamerarticle.

Firstly, we create a file main.article.tex:

\documentclass{article}
\usepackage{beamerarticle}
\setjobnamebeamerversion{main.beamer}
\input{main}


Secondly, we create a file main.beamer.tex:

\documentclass[ignorenonframetext]{beamer}
\input{main}


And lastly, we create a file main.tex:

\mode<article>{
\usepackage{fullpage}
}

\mode<presentation>{
\setbeamertemplate{itemize item}[square]
\usetheme{Hannover}
}

\begin{document}

\begin{frame}{A first frame}{}

\begin{itemize}
\item toto
\end{itemize}

\begin{block}{titleblock}
a bloc
\end{block}

\end{frame}

\end{document}


We compile main.artice.tex and looks like

We compile main.beamer.tex and looks like

There are my suggest but I do not know if you want work by separate files.