1

Recently I started to question my decision to enable the appearance of individual subsection titles before actual content. I still want to show the outline of the upcoming section once before the section's content, however I feel that showing the same outline with an upcoming subsection title emphasized is an overkill (IMHO this approach produces too many extra slides).

Therefore, while I'm still finalizing my decision, I'd like to have an option to switch my Beamer presentation's current behavior for section outline management, controlled by the following code. What should be changed in the code for the above-mentioned alternative behavior?

\AtBeginSubsection[]
{
  \begin{frame} %<beamer>
    \frametitle{Outline}
    \setcounter{tocdepth}{2}
    \tableofcontents[
      currentsection,
      currentsubsection,
      sectionstyle=show/hide,
      subsectionstyle=show/shaded/hide
    ]
  \end{frame}
}
7
  • So you want to show sections but not subsections. Is that right?
    – user11232
    Mar 30 '15 at 5:19
  • @HarishKumar: I want to show initially the presentation's TOC (1st level only - section titles). Then, before each section's content, I want to show the section's TOC (upcoming section's title + its subsections' titles all at once, one time) and other sections' titles only. Mar 30 '15 at 5:24
  • Can you please add a minimal working example (MWE) and save us some typing?
    – user11232
    Mar 30 '15 at 5:29
  • 1
    You may read 9.6.2 Mode Specifications. Such mechanism allows you to produce different versions of PDF. For example the familiar article and handout version; or you may create your own overkilled and underkilled version.
    – Symbol 1
    Mar 30 '15 at 5:30
  • @HarishKumar: Sure, will post an MWE soon. Mar 30 '15 at 5:34
1

I've already figured out my problem. The reason of the undesired behavior was that I was using two methods of section outline management simultaneously: manual (via \tableofcontents) and automatic (via \AtBeginSection). The following MWE with fix - disabling the automatic control code - illustrates the situation.

\documentclass[12pt]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{tikz}
\usetikzlibrary{mindmap, trees, shadows, shapes, backgrounds, calc, fadings, positioning, decorations.pathreplacing, intersections, fit}
\usepackage{smartdiagram}

\usepackage{palatino}

\usetheme{Boadilla}
\usecolortheme{orchid}
\useinnertheme{rectangles}
\beamertemplateshadingbackground{gray!5}{gray!20}
\setbeamertemplate{navigation symbols}{}

% THE FIX -- LEFT FOR ILLUSTRATION -- TO BE DELETED
%\AtBeginSection[]
%{
%  \begin{frame} %<beamer>
%    \frametitle{Outline}
%    \setcounter{tocdepth}{2}
%    \tableofcontents[
%    currentsection,
%    currentsubsection,
%    sectionstyle=show/hide,
%    subsectionstyle=show/shaded/hide
%    ]
%  \end{frame}
%}

\begin{document}

% Produce top-level TOC
\frame{\tableofcontents[hideallsubsections]}

\section{Introduction}
\frame[shrink=10]{\tableofcontents[currentsection,hideothersubsections]}

\subsection{Background and Problem}
\subsection{Research Goals and Questions}
\subsection{Relevance and Significance}
% Other subsections here

\section{Existing Research}
\frame[shrink=10]{\tableofcontents[currentsection,hideothersubsections]}

\subsection{Information Systems Success}
\subsection{Free/Libre and Open Source Software (FLOSS)}
\subsection{The Success of FLOSS}
% Other subsections here

\section{Methodology}
\frame[shrink=10]{\tableofcontents[currentsection,hideothersubsections]}

\subsection{Research Design}
\subsection{Measurement of Variables}
\subsection{Data Analysis}
% Other subsections here

\section{Results}
\frame[shrink=10]{\tableofcontents[currentsection,hideothersubsections]}

\subsection{Research Workflow: Reproducible Research Approach}
\subsection{Design of Research Software}
\subsection{Reformulated Hypotheses}
% Other subsections here

\section{Conclusions}
\frame[shrink=10]{\tableofcontents[currentsection,hideothersubsections]}

\subsection{Discussion}
\subsection{Implications}
\subsection{Limitations}
\subsection{Future Research}
\subsection{Summary}

\end{document}
3
  • 1
    Perhaps it is more elegant to use the automatic method with options, such as subsectionstyle=hide, instead of the manual method, but I could not figure out the right combination of options for \AtBeginSection for the correct behavior. Mar 30 '15 at 7:20
  • 2
    Try with \AtBeginSection[] { \begin{frame} %<beamer> \frametitle{Outline} \setcounter{tocdepth}{2} \tableofcontents[ currentsection, currentsubsection, sectionstyle=show/show, subsectionstyle=show/show/hide ] \end{frame} } and delete all manual toc frames except the first one. I think it does what you want.
    – Ignasi
    Oct 27 '15 at 8:52
  • @Ignasi: Just saw your comment, accidentally. Thank you for your advice (+1). I will keep it in mind for my future Beamer "adventures". May 24 '16 at 21:14

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.