I'm trying to create a custom theme for beamer. However, when I tried to patch the navigation circles to be automatically included without subsections (using the solution of Beamer navigation circles without subsections?) the title page appears in the navigation circles.

I tried to remove all parts, but I can't find why it keeps adding the title page to the navigation bar. I tried my best to reduce the source to a MWE, and this code (below) produces the wrong circle. If you need more information I can provide the full or needed files.

enter image description here





\ifnum\insertframenumber>0\relax%remove it for the title page
\begin{beamercolorbox}[wd=\the\paperwidth,ht=0.6cm]{section in head/foot}
    \useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,0.6);
    \fill[secondColor] (0,0) rectangle(0.3,0.6);
    \fill[firstColor] (0.35,0) rectangle(\the\paperwidth,0.6);
    \node[anchor= west, white] at (0.3,0.3){\insertnavigation{0.85\paperwidth}};%

\vskip-1pt%skip after the begginning of the slide
  \useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,0.6);
  \fill[secondColor] (0,0) rectangle(0.3,1);
  \fill[firstColor] (0.35,0) rectangle(\the\paperwidth,0.6);
  \node[anchor=west, white,font=\large] at (0.4,0.25){\insertframetitle};

% fix the title page navigation bar
  \addtocounter{framenumber}{-1}%ensure that title page has 0 number

% Patches beamer so that "subsections numbered 0" show their slide entries.
% Solution from: https://tex.stackexchange.com/questions/2072/beamer-navigation-circles-without-subsections
\patchcmd{\slideentry}{\ifnum#2>0}{\ifnum2>0}{}{\@error{unable to patch}}% replace the subsection number test with a test that always returns true





\section{section name}


In your case, the title slide sits outside of any sections, so you could change the \slideentry conditions to require that the section number be strictly positive. i.e. change the \patchcmd{\slideentry} line to the following:

\patchcmd{\slideentry}{\ifnum#2>0}{\ifnum#1>0}{}{\@error{unable to patch}}% require section number to be strictly positive

Would that be good enough?

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.