This answer is based on the comments from Werner, so all credits shall go to him.
\documentclass{beamer}
\usepackage{tikz}
\makeatletter
\let\oldsection\section
\renewcommand{\section}[2][]{%
\oldsection[#1]{#2}% Call default \section (this also steps the section counter)
\hypertarget{\csname Section\Alph{section}\endcsname}{}%
\setbox0=\hbox{#1}\ifdim\wd0=0pt%
\immediate\write\@auxout%
{\string\global\string\def\string\Section\Alph{section}{%
\arabic{section}{.} #2}}%
%{\string\global\string\def\string\Section\Alph{section}{#2}}%
\else%
\immediate\write\@auxout%
{\string\global\string\def\string\Section\Alph{section}{%
\arabic{section}{.} #1}}%
%{\string\global\string\def\string\Section\Alph{section}{#1}}%
\fi%
}
\makeatother
\makeatletter
\let\oldsubsection\subsection
\renewcommand{\subsection}[2][]{%
\oldsubsection[#1]{#2}% Call default \subsection (this also steps the subsection counter)
\hypertarget{\csname Section\Alph{section}subsection\Alph{subsection}\endcsname}{}%
\setbox0=\hbox{#1}\ifdim\wd0=0pt%
\immediate\write\@auxout%
{\string\global\string\def\string\Section\Alph{section}subsection\Alph{subsection}{%
\arabic{section}.\arabic{subsection}{.} #2}}%
%{\string\global\string\def\string\Section\Alph{section}subsection\Alph{subsection}{#2}}%
\else%
\immediate\write\@auxout%
{\string\global\string\def\string\Section\Alph{section}subsection\Alph{subsection}{%
\arabic{section}.\arabic{subsection}{.} #1}}%
%{\string\global\string\def\string\Section\Alph{section}subsection\Alph{subsection}{#1}}%
\fi%
}
\makeatother
\begin{document}
\begin{frame}
% Print sections with hyperlinks
\foreach \Idxsec in {A,...,Z}{%
\ifcsname Section\Idxsec \endcsname
\xdef\sectionname{\csname Section\Idxsec\endcsname}
\hyperlink{\sectionname}{\sectionname}\par
\fi
}
% Print subsections with hyperlinks
\foreach \Idxsec in {A,...,Z}{%
\foreach \Idxsubsec in {A,...,Z}{%
\ifcsname Section\Idxsec subsection\Idxsubsec \endcsname
\xdef\subsectionname{\csname Section\Idxsec subsection\Idxsubsec\endcsname}
\hyperlink{\subsectionname}{\subsectionname}\par
\fi
}
}
% Print sections and subsections with hyperlinks
\foreach \Idxsec in {A,...,Z}{%
\ifcsname Section\Idxsec \endcsname
\xdef\sectionname{\csname Section\Idxsec\endcsname}
\hyperlink{\sectionname}{\sectionname}\par
\foreach \Idxsubsec in {A,...,Z}{%
\ifcsname Section\Idxsec subsection\Idxsubsec \endcsname
\xdef\subsectionname{\csname Section\Idxsec subsection\Idxsubsec\endcsname}
\hyperlink{\subsectionname}{\subsectionname}\par
\fi
}
\fi
}
\end{frame}
\end{document}
.tocfile 2) to manipulate the creation of the.tocfile to already contain the mindmap code or 3) to use the beamer way and modify the definition of\insertsectionnavigationand\insertsubsectionnavigation. But I have not enoughtikz/mindmap knowledge to do either. – samcarter_is_at_topanswers.xyz Nov 08 '16 at 20:59\foreachto build the section and them connect its leafs (wich would be the subsections). – cacamailg Nov 08 '16 at 21:12\csname...\endcsnamewhich doesn't throw an error when you make a call to it. However, you may as well define something with\providecommandto make sure it exists. Then, I write to the.auxwhich is read in around\begin{document}. That allows you to use the defined macros in a similar way to how one would use\labelsand\ref`s. – Werner Nov 08 '16 at 21:18\SectionXSubsectionYto expand to\tableofcontents[..]. That's what I don't understand in your question. Your title suggests you want to retrieve the\subsectiontitle, but your question uses\tableofcontentsas the definition. – Werner Nov 08 '16 at 21:19csname... \endcsname. – cacamailg Nov 08 '16 at 21:24Undefined control sequence. l.23 \global\defA .A{} subsection 1.1{A.A{} subsection 1.1}. – cacamailg Nov 08 '16 at 21:44