beamer add tag
zetyty
Is there a way to make the `sectionpage` the same in sections and subsections with Moloch theme?

With the MWE below, the section page displays the current section title **AND** the current subsection title when employed in a `\AtBeginSubsection` group. 

However, I would prefer that the sectionpage shows **ONLY** the title of the current section and **NOT** displaying the current subsection title at all (as it does when used in a `\AtBeginSection` group). In other words, I would like the sectionpage appears the same in both  `\AtBeginSection` and `\AtBeginSubsection`.

Why? Because, following [this question](https://topanswers.xyz/tex?q=7237), I already display the table of content (ToC) in sectionpage at each subsection. So, I find confusing and redundant to display the subsection title both in ToC and in the sectionpage title...

```
\documentclass{beamer}
\usetheme{moloch}
\useoutertheme{miniframes}
\setbeamertemplate{page number in head/foot}[framenumber]

\AtBeginSection{
	\begingroup
	\begin{frame}[noframenumbering,plain]
		\sectionpage
		\tableofcontents[currentsection,currentsubsection,subsectionstyle=show/shaded/hide]
	\end{frame}
	\endgroup	
}

\AtBeginSubsection{
	\begingroup
	\begin{frame}[noframenumbering,plain]
		\sectionpage
		\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/shaded]
	\end{frame}
	\endgroup	
}

\begin{document}
	\section{Section 1}
		\subsection{Subsection 1}
			\begin{frame}
				Text in subsection 1.1
			\end{frame}
		\subsection{Subsection 2}
			\begin{frame}
				Text in subsection 1.2
			\end{frame}
\end{document}
```

Current output:
![image.png](/image?hash=931c2a3eafa6e6c69daf5d2930418d79e8172c3edc2e9ba5aee98f03d008b262)

Desired output:
![image.png](/image?hash=85e0f901ef6f12aea55141fb25295130b441c0f59065db469d7be87b218fbdc9)
Top Answer
samcarter
You can redefine the `section page` template to remove the bits about the subsection:

```
\documentclass{beamer}
\usetheme{moloch}
\useoutertheme{miniframes}
\setbeamertemplate{page number in head/foot}[framenumber]

\AtBeginSection{
	\begingroup
	\begin{frame}[noframenumbering,plain]
		\sectionpage
		\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/shaded]
	\end{frame}
	\endgroup	
}

\AtBeginSubsection{
	\begingroup
	\begin{frame}[noframenumbering,plain]
		\sectionpage
		\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/shaded]
	\end{frame}
	\endgroup	
}

\makeatletter
\setbeamertemplate{section page}{
  \centering
  \begin{minipage}{0.7875\linewidth}
    \raggedright
    \usebeamercolor[fg]{section title}
    \usebeamerfont{section title}
    \insertsectionhead\\[-1ex]
    \usebeamertemplate*{progress bar in section page}
%    \par
%    \ifx\insertsubsectionhead\@empty\else%
%      \usebeamercolor[fg]{subsection title}%
%      \usebeamerfont{subsection title}%
%      \insertsubsectionhead
%    \fi
  \end{minipage}
  \par
  \vspace{\baselineskip}
}
\makeatother

\begin{document}
	\section{Section 1}
		\subsection{Subsection 1}
			\begin{frame}
				Text in subsection 1.1
			\end{frame}
		\subsection{Subsection 2}
			\begin{frame}
				Text in subsection 1.2
			\end{frame}
	\section{Section 1}
		\subsection{Subsection 1}
			\begin{frame}
				Text in subsection 1.1
			\end{frame}
		\subsection{Subsection 2}
			\begin{frame}
				Text in subsection 1.2
			\end{frame}      
\end{document}
```

![document-02.png](/image?hash=1ccb784f0c02e3381085899bbdb9b04c9ea112f223359a3cc6beb98d81a5af11)

(to avoid jumping of the text between frames, I unified the setting of subsections in other sections to be shaded. You can of course also hide them)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.