Dependendo do conteúdo, \AtBeginSectionrecebo erros diferentes

Dependendo do conteúdo, \AtBeginSectionrecebo erros diferentes

Eu tenho um MWE básico [depois de remover 400 linhas de código não relacionadas :(] contendo uma beamerapresentação com uma bibliografia gerada por 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}

Dependendo do conteúdo, \AtBeginSectionrecebo erros diferentes

Erro 1 ( plainopção ativa)

\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$}'.

Erro 2 ( plainopçãonãoativo/ tikzpictureremovido)

\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.

Sem erro (nenhum conteúdo)

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

insira a descrição da imagem aqui

É possível reproduzir o problema?

Responder1

\printbibliographychamadas \section*. Portanto, você está tentando aninhar a framedentro de a frame, o que não funciona.

Ou use

\AtBeginSection[]{%
  ...
}

para evitar o material de personalização em seções não numeradas ou use

\printbibliography[heading=none]

para evitar \printbibliographya criação de um título de seção.

informação relacionada