I want to remove the frame header line every time a new section starts.
I created my own command to do that but I have some problems with the \ifnum command.
I tried to use \ifnum\insertframenumber=\insertsectionstartpage as a condition to check if a new section starts an then remove the header (like frame 2). LaTeX always seems to execute the else branch, although the condition should evaluate to true... I also tried the \ifthenelse command, but it didn't work either.
Does anybody have an explanation for that?
Here my minimal working example:
\documentclass[t,8pt]{beamer}
\usepackage{ifthen}
\usetheme{Warsaw}
\newcommand{\HeaderFrame}[2]{
\ifnum\insertframenumber=\insertsectionstartpage
{
\makeatletter
\setbeamertemplate{headline}[default]
\def\beamer@entrycode{\vspace*{-\headheight}}
\makeatother
\begin{frame}{#1}
#2
\end{frame}
}
\else
\begin{frame}{#1}
\insertframenumber~\insertsectionstartpage
\end{frame}
\fi
}
\begin{document}
\section{Test1}
\HeaderFrame{Test}{
That is a test
}
\section{Test2}
{
\makeatletter
\setbeamertemplate{headline}[default]
\def\beamer@entrycode{\vspace*{-\headheight}}
\makeatother
\begin{frame}{New Frame}
Test
\end{frame}
}
\section{Test3}
\end{document}

fragileorplain. – samcarter_is_at_topanswers.xyz Feb 08 '17 at 13:55