4

I like that the first section in my presentation start with number bigger than 1, for example with 7. I try with adding \setcounter{section}{7} in preamble as well before first section (as is suggested for example in answer on this question), but number of the first section stay the same, i.e. 1 and not become 7 as i expected:

\documentclass{beamer}
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]

\begin{document}  
\begin{frame}[plain]
    \frametitle{Vsebina}
\tableofcontents
\end{frame}
   
\addtocounter{section}{7}% <--- doesn't help
\section{TEST}
\subsection{test a}
\subsection{test b}
\subsection{test c}

\begin{frame}
\frametitle{Introduction}
\end{frame}

enter image description here

Do I miss something?

I use recent version of beamer (v3.55).

2
  • 1
    Are you looking for this? You "only" need \makeatletter \beamer@tocsectionnumber=7 \makeatother.
    – user121799
    Feb 3, 2019 at 20:28
  • @marmot, no. searching on site doesn't show me this answer :-(. i will read it.
    – Zarko
    Feb 3, 2019 at 20:32

1 Answer 1

3

Full credit goes to Gonzalo Medina's answer and Google. ;-)

\documentclass{beamer}
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]
\makeatletter
\newcommand{\ShiftSectionNumber}[1]{%
\beamer@tocsectionnumber=\numexpr#1+\beamer@tocsectionnumber}
\makeatother

\begin{document}  
\ShiftSectionNumber{7}

\begin{frame}[plain]
    \frametitle{Vsebina}
\tableofcontents
\end{frame}

\section{TEST}
\subsection{test a}
\subsection{test b}
\subsection{test c}

\begin{frame}
\frametitle{Introduction}
\end{frame}
\end{document}

enter image description here

2
  • thank you for answer. however for my need is suffucient solution which you suggested in comment :-). i will close the question as duplicate ... looking Gonzales answer, the answer on ling in my question is misleading...
    – Zarko
    Feb 3, 2019 at 20:40
  • @Zarko I think that, if you want to close it as a duplicate, then this (which I just found now) would be more appropriate. Yet I do not know if it is a duplicate. Depends on the standards. If you have very tough standards, then this is a duplicate, but so are more than 70% of the questions. I actually think yours is a very nice question, and many who prepare slides for lectures, say, may wonder about the same thing.
    – user121799
    Feb 3, 2019 at 20:57

Not the answer you're looking for? Browse other questions tagged .