I need to insert subsubsections (mind the subsub) in footline for presentation with beamer and AnnArbor theme, like subsection with \insertsubsectionnavigationhorizontal.
Asked
Active
Viewed 578 times
0
Dr. Manuel Kuehner
- 22,451
miloud
- 11
-
3Welcome to TEX.SE. Even some people can read French, please, write in English. – Sigur Jun 03 '18 at 19:30
-
any one have a solution! – miloud Jun 05 '18 at 19:20
1 Answers
1
Partial solution:
You'll have to manually specify at the begin of each subsection how many subsubsections are in this subsection.
\documentclass{beamer}
\usetheme{AnnArbor}
\usepackage{pgffor}
\newcounter{totalsubsub}
\AtBeginSubsubsection[]{\label{subsubsec:\thesection:\thesubsection:\thesubsubsection}}
\setbeamertemplate{footline}
{%
\leavevmode%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
\ifnum\thetotalsubsub>0
\foreach \i in {1,...,\thetotalsubsub}{%
\hfill
\ifnum\i=\thesubsubsection
\usebeamercolor[fg]{subsubsection in sidebar}
\else
\usebeamercolor[fg]{subsubsection in sidebar shaded}
\fi
\hyperlink{subsubsec:\thesection:\thesubsection:\i}{\nameref{subsubsec:\thesection:\thesubsection:\i}}
}
\hfill
\hspace*{0pt}
\fi
\end{beamercolorbox}%
}
\begin{document}
\section{section}
\subsection{sub 1}
\setcounter{totalsubsub}{3}
\subsubsection{subsub 1}
\begin{frame}
subsub 1
\end{frame}
\subsubsection{subsub 2}
\begin{frame}
subsub 2
\end{frame}
\subsubsection{subsub 3}
\begin{frame}
subsub 3
\end{frame}
\subsection{sub 2}
\setcounter{totalsubsub}{0}
\begin{frame}
abc
\end{frame}
\end{document}
For automatically retrieving the number of subsubsections per subsection the xcntperchap package might be helpful. I tried to use it similarly to https://tex.stackexchange.com/a/303968/36296 but I only managed to get the numbers for the first section.
samcarter_is_at_topanswers.xyz
- 158,329
-
thanks samcarter, but i want to insert subsubsection, not subsection, with AnnArbor theme. – miloud Jun 03 '18 at 20:46
-
1
-
