Abhängig vom Inhalt \AtBeginSectionerhalte ich unterschiedliche Fehlermeldungen

Abhängig vom Inhalt \AtBeginSectionerhalte ich unterschiedliche Fehlermeldungen

Ich habe ein einfaches MWE [nachdem ich 400 unabhängige Codezeilen entfernt habe :(], das eine beamerPräsentation mit einer von generierten Bibliografie enthält biblatex.

\documentclass{beamer}

\usepackage{tikz}

\usepackage{biblatex}   

\begin{filecontents}{BibDatabase.bib}
@book{Miller2012,
    author = {Adam Miller},
    title = {Clever Book Title},
    date = {2012},
}
\end{filecontents}

\addbibresource{BibDatabase.bib}    

\AtBeginSection{
    \begin{frame}[plain]
    \begin{tikzpicture}
    \end{tikzpicture}
    \end{frame}
}

\begin{document}

\section{test}
\begin{frame}
  \cite{Miller2012}
  \printbibliography
\end{frame}

\end{document}

Abhängig vom Inhalt \AtBeginSectionerhalte ich unterschiedliche Fehlermeldungen

Fehler 1 ( plainOption aktiv)

\begin{frame}[plain]
\begin{tikzpicture}
\end{tikzpicture}
\end{frame}
! Extra }, or forgotten \endgroup.
\endframe ->\egroup 
                    \begingroup \def \@currenvir {frame}
l.30 \end{frame}

I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.

Fehler 2 ( plainOptionnichtaktiv / tikzpictureentfernt)

\AtBeginSection{
    \begin{frame}%[plain]
    \begin{tikzpicture}
    \end{tikzpicture}
    \end{frame}
}

\AtBeginSection{
    \begin{frame}%[plain]
    %\begin{tikzpicture}
    %\end{tikzpicture}
    \end{frame}
}
! Missing \endcsname inserted.
<to be read again> 
                   \vrule 
l.30 \end{frame}

The control sequence marked <to be read again> should
not appear between \csname and \endcsname.

Kein Fehler (überhaupt kein Inhalt)

\AtBeginSection{
%   \begin{frame}%[plain]
%   \begin{tikzpicture}
%   \end{tikzpicture}
%   \end{frame}
}

Bildbeschreibung hier eingeben

Können Sie das Problem reproduzieren?

Antwort1

\printbibliographyruft auf \section*. Sie versuchen also, ein framein ein zu verschachteln frame, was nicht funktionieren kann.

Verwenden Sie entweder

\AtBeginSection[]{%
  ...
}

um den Anpassungskram in nicht nummerierten Abschnitten zu vermeiden, oder verwenden Sie

\printbibliography[heading=none]

um \printbibliographydie Erstellung einer Abschnittsüberschrift zu vermeiden.

verwandte Informationen