[Tex/LaTex] LaTeX Beamer: Frame outside sections – additional problem with outline between sections

beamersectioning

I refer you to this answer to a similar question.

I want exactly what the author of that post wanted, namely a slide with no section in the navigation bar highlighted for that slide. I find that the solution given there does not work for me, presumably because of this code being operative in my case:

\AtBeginSubsection
{
  \begin{frame}<beamer>{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

\AtBeginSection
{
  \begin{frame}<beamer>{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

I get the desired result of the last frame having no section highlighted in the sidebar. But I get the additional undesired result of a outline slide (with all sections shaded).

Below is a full example.

\documentclass{beamer}
\usetheme[hideothersubsections]{Hannover}

\begin{document}


  %=======BEGIN OUTLINE COMMANDS============
\AtBeginSubsection
{
  \begin{frame}<beamer>{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

\AtBeginSection
{
  \begin{frame}<beamer>{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}
%=======END OUTLINE COMMANDS============



\section{First Section}

\begin{frame}
  \begin{itemize}
    \item Blah
    \item Blah
    \item Blah
  \end{itemize}
\end{frame}


\section{Second Section}

\begin{frame}
  \begin{itemize}
    \item Blah
    \item Blah
    \item Blah
  \end{itemize}
\end{frame}

\section{Third Section}

\begin{frame}
  \begin{itemize}
    \item Blah
    \item Blah
    \item Blah
  \end{itemize}
\end{frame}


\section*{}

\begin{frame}

Thank you for your attention!

\end{frame}


\end{document}

Best Answer

Just redefine \AtBeginSection before the final slide:

\documentclass{beamer}
\usetheme[hideothersubsections]{Hannover}

\begin{document}


  %=======BEGIN OUTLINE COMMANDS============
\AtBeginSubsection
{
  \begin{frame}<beamer>{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

\AtBeginSection
{
  \begin{frame}<beamer>{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}
%=======END OUTLINE COMMANDS============



\section{First Section}

\begin{frame}
  \begin{itemize}
    \item Blah
    \item Blah
    \item Blah
  \end{itemize}
\end{frame}


\section{Second Section}

\begin{frame}
  \begin{itemize}
    \item Blah
    \item Blah
    \item Blah
  \end{itemize}
\end{frame}

\section{Third Section}

\begin{frame}
  \begin{itemize}
    \item Blah
    \item Blah
    \item Blah
  \end{itemize}
\end{frame}

\AtBeginSection{}
\section*{}

\begin{frame}

Thank you for your attention!

\end{frame}


\end{document}

Results