I'm trying to set up a template for a section frame. On this frame I want to load an image selected by the section title as described in this question.
But when applying the suggested solution I get an endless loop. The following MWE throws an error:
\documentclass{beamer}
\usetheme{default}
\usepackage{graphicx}
\usepackage{inputenc}
\usepackage[space]{grffile}
\begin{document}
\section{some section name}
\begin{frame}{\insertsectionhead}
\insertsectionhead
% this line causes:
% TeX capacity exceeded, sorry [input stack size=5000]. \section{some section name}
\includegraphics[draft]{\insertsectionhead}
\end{frame}
\end{document}
how can I use the section name as file name in \includegraphics{} avoiding the endless loop?
graphicxis loaded bybeamer. why you not use solution in given link as it is? – Zarko Oct 28 '18 at 09:14