# Difference between \section{} and \section*{} in Beamer

I get a little confused about the difference between \section{} and \section*{} in Beamer. Could you please explain in detail with examples.

-

The brief answer is, \section inserts a new entry into the table of contents at the appropriate tree-level and also inserts a new entry into the navigation bars. But \section* only adds an entry in the navigation bars, not in the table of contents.

Now, let us go to the detailed answer, as you asked for. For this we consider this short file.

\documentclass{beamer}

\usetheme{Berkeley}

\usepackage{times}

\begin{document}
\begin{frame}
\tableofcontents
\end{frame}

\begin{frame}
\section{Section without Star}

\begin{itemize}
\item This will
\begin{itemize}
\item and will insert a new entry into the navigation bars.
\end{itemize}
\end{itemize}

\end{frame}

\begin{frame}
\section*{Section with Star}

\begin{itemize}
\item This will
\begin{itemize}
\item but will insert a new entry into the navigation bars.
\end{itemize}
\end{itemize}

\end{frame}

\end{document}


We are creating three slides (frames) here. The first one being the table of contents, the second with one normal section (not starred), the third one with a starred section.

Output

You can compile the complete file using pdflatex and observe the effects. Please remember to compile at least three times.
Please remember that the difference between \section and \section* is only important if you create a table of contents and use a theme with navigation bar. Otherwise, you do not notice any difference. Perhaps that was the source of confusion in your case.
Also, please be advised that the case of \section and \section* in beamer is different from that in documents (article or book class).