2

I want to include the subsection navigation on the section slide (through \insertsubsectionnavigation) and align it with the current section. I am having trouble aligning them properly though, see below.

enter image description here

Any thoughts on how to align it such that "Method A" is on the same line as "Methodology"?

MWE:

\documentclass[aspectratio=43]{beamer}

\usepackage{pbox}
\setbeamercolor{section in head/foot}{fg=white}
\setbeamertemplate{section in head/foot}{%
        \usebeamerfont{sectionpage}\usebeamercolor[fg]{titlepages}\raggedright%
        \huge\insertsectionhead%
      \hspace{0.1\textwidth}%
      \begin{minipage}[b]{0.5\textwidth}
        \large\insertsubsectionnavigation{\linewidth}
      \end{minipage}
}
\setbeamertemplate{section in head/foot shaded}{%
    \pbox[c][4ex][c]{0.2\textwidth}{%
      %
      \color{black!75}\Large\centering\insertsectionhead%
    }\hspace*{1pt}%
}
\setbeamercolor{subsection in head/foot}{fg=white}
\setbeamertemplate{subsection in head/foot}{%
    \footnotesize\hspace*{-1pt}\setlength\fboxsep{0pt}%
    \pbox[c][4ex][c]{\textwidth}{%
            \centering\small\insertsubsectionhead%
    }\hspace*{1pt}%
}
\setbeamertemplate{subsection in head/foot shaded}{%
    \footnotesize \hspace*{-1pt}\setlength\fboxsep{0pt}%
    \pbox[c][4ex][c]{\textwidth}{%
      %
      \color{black!75}\small\insertsubsectionhead%
    }\hspace*{1pt}%
}

\AtBeginSection[]{%
        {\setbeamercolor{background canvas}{bg=blue!50}%
        \frame{%
            \huge\insertsectionnavigation{0.6\linewidth}{}{}%
            \addtocounter{framenumber}{-1}}}%
        }

\AtBeginSubsection[]{{\setbeamercolor{background canvas}{bg=blue!50}\frame{\mbox{}\hspace{0.1\textwidth}Subsection \thesubsection\addtocounter{framenumber}{-1}}}}

\begin{document}

\section*{Overview}

\begin{frame}{Overview}

\end{frame}

\section{Methodology}

\subsection{Method A}

\begin{frame}{Method A is good}

    Total: \inserttotalframenumber

\end{frame}

\subsection*{Method B}

\begin{frame}{Method B is better}

    Because it is better.

\end{frame}

\subsection*{Method C}

\begin{frame}{Method C is the best}

    Because it is the best.

\end{frame}

\section{Results}

\subsection*{Preliminary results}

\begin{frame}{Early results}

    Not good.

\end{frame}

\subsection*{Final results}

\begin{frame}{These results are beautiful.}

    Perfect.

\end{frame}

\end{document}
1

Quick hack:

\documentclass[aspectratio=43]{beamer}

\usepackage{pbox}
\setbeamercolor{section in head/foot}{fg=white}
\setbeamertemplate{section in head/foot}{%
        \usebeamerfont{sectionpage}\usebeamercolor[fg]{titlepages}\raggedright%
        \huge\insertsectionhead%
      \hspace{0.1\textwidth}%
      \begin{minipage}[b][.5\textheight][t]{0.5\textwidth}
        \vspace*{4.3cm}
        \large\insertsubsectionnavigation{\linewidth}
      \end{minipage}
}
\setbeamertemplate{section in head/foot shaded}{%
    \pbox[c][4ex][c]{0.2\textwidth}{%
      %
      \color{black!75}\Large\centering\insertsectionhead%
    }\hspace*{1pt}%
}
\setbeamercolor{subsection in head/foot}{fg=white}
\setbeamertemplate{subsection in head/foot}{%
    \footnotesize\hspace*{-1pt}\setlength\fboxsep{0pt}%
    \pbox[c][4ex][c]{\textwidth}{%
            \centering\small\insertsubsectionhead%
    }\hspace*{1pt}%
}
\setbeamertemplate{subsection in head/foot shaded}{%
    \footnotesize \hspace*{-1pt}\setlength\fboxsep{0pt}%
    \pbox[c][4ex][c]{\textwidth}{%
      %
      \color{black!75}\small\insertsubsectionhead%
    }\hspace*{1pt}%
}

\AtBeginSection[]{%
        {\setbeamercolor{background canvas}{bg=blue!50}%
        \frame{%
            \huge\insertsectionnavigation{0.6\linewidth}{}{}%
            \addtocounter{framenumber}{-1}}}%
        }

\AtBeginSubsection[]{{\setbeamercolor{background canvas}{bg=blue!50}\frame{\mbox{}\hspace{0.1\textwidth}Subsection \thesubsection\addtocounter{framenumber}{-1}}}}

\begin{document}

\section*{Overview}

\begin{frame}{Overview}

\end{frame}

\section{Methodology} % if this does not have a star, it works.

\subsection{Method A}
    \subsection{Method A}
        \subsection{Method A}
            \subsection{Method A}
                \subsection{Method A}
                    \subsection{Method A}

\begin{frame}{Method A is good}

    Total: \inserttotalframenumber

\end{frame}

\subsection*{Method B}

\begin{frame}{Method B is better}

    Because it is better.

\end{frame}

\subsection*{Method C}

\begin{frame}{Method C is the best}

    Because it is the best.

\end{frame}

\section{Results}

\subsection*{Preliminary results}

\begin{frame}{Early results}

    Not good.

\end{frame}

\subsection*{Final results}

\begin{frame}{These results are beautiful.}

    Perfect.

\end{frame}

\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.