2

I would like to use beamer: Create own headline theme to custom my headline theme but unfortunately my presentation started with table of content instead of titlepage and with zero

i would like my presentation to strat with titepage without counter number and the plan (table of content) start with zero after that

  1. Section ( long text here I)
  2. Section ( long text here II) and so on
\documentclass[hyperref={pdfpagemode=FullScreen,colorlinks=true},
xcolor={dvipsnames,svgnames,table}]{beamer}
\usepackage{concrete}
 \usetheme{Warsaw}
\setbeamercovered{transparent}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,french]{babel}
\usepackage{dsfont}
\usepackage{pifont}
\usepackage{enumitem}
\usepackage{pdfpages}% pour insérer des pages précises d’un pdf multipages
  \setlength\parindent{0pt}
\title[Very Very Long title here  ] %optional
{Very Very Long title here}
%\subtitle{A short story}

\author[Mohcine] % (optional, for multiple authors)
{Mohcine }

\institute[VFU] % (optional)
{
  Faculty of Mathematics\\
  Very Famous University

}

\date[VLC 2013] % (optional)
{Very Large Conference, March 2015}

%\logo{\includegraphics[height=1.5cm]{lion-logo.png}}
 \usepackage{color}
 \makeatletter
\def\colorizemath #1#2{%
    \expandafter\mathchardef\csname orig:math:#1\endcsname\mathcode`#1
    \mathcode`#1="8000
    \toks@\expandafter{\csname orig:math:#1\endcsname}%
    \begingroup
       \lccode`~=`#1
       \lowercase{%
    \endgroup
       \edef~{{\noexpand\color{#2}\the\toks@}}}%
   }
\@for\@tempa:=a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z\do{%
    \expandafter\colorizemath\@tempa{green}}
\@for\@tempa:=A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z\do{%
    \expandafter\colorizemath\@tempa{green}}
\@for\@tempa:=0,1,2,3,4,5,6,7,8,9\do{%
    \expandafter\colorizemath\@tempa{red}}
\makeatother

\everymath{\color{blue}}
\everydisplay{\color{blue}}



\definecolor{secinhead}{RGB}{249,196,95}
\definecolor{titlebg}{RGB}{51,51,51}

\setbeamercolor{secsubsec}{fg=secinhead,bg=black}
\setbeamercolor{frametitle}{fg=secinhead,bg=titlebg}

\usepackage{tikz}
\usetikzlibrary{shadings}
\definecolor{secinhead}{RGB}{249,196,95}
\definecolor{shadowbg}{RGB}{51,51,51}

\setbeamercolor{secsubsec}{fg=secinhead,bg=black}
\setbeamercolor{shadow}{fg=secinhead,bg=shadowbg}

\setbeamertemplate{headline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=\paperwidth,ht=8.25ex,dp=3.5ex]{secsubsec}%
    \raggedright
    \hspace*{2em}%
    {\sffamily\Large\color{secinhead}\thesection.~\insertsection\hfill\insertsubsection}%
    \hspace*{2em}%
  \end{beamercolorbox}%
  }\vskip-1pt%
  \hbox{%
  \tikz\draw[draw=none,top color=black,bottom color=shadowbg!60] (0,0) rectangle (\paperwidth,0.5);
  }%
}

\begin{document}
\setbeamertemplate{navigation symbols}{}

 \AtBeginSection[]

{
  \begin{frame}
    \frametitle{Table of Contents}
    \tableofcontents[currentsection]

  \end{frame}
}

\frame{\titlepage}

\section[Plan]{}
\begin{frame}[allowframebreaks]
\tableofcontents
\end{frame}

\begin{frame}
\frametitle{Table of Contents}
\tableofcontents
\end{frame}

\section[long text here I]{long text here I}
\begin{frame}
\end{frame}

\section[long text here II]{long text here II}
\begin{frame}
\end{frame}
\section[long text here III]{long text here III}
\begin{frame}
\end{frame}
\end{document}
  • 1
    The empty line between \AtBeginSection[] and {\begin{frame}... makes table of contents appears before maketitle frame. Suppress this empty line. – Ignasi Mar 20 '15 at 10:45
1

The document starts with

 \AtBeginSection[]

 {
     \begin{frame}
     \frametitle{Table of Contents}
     \tableofcontents[currentsection]

     \end{frame}
}

and because \AtBeginSection is separated (empty line) from {\begin{frame}... this frame is considered part of your presentation and not what should be done before every section starts. If this empty line is deleted or commented out,

 \AtBeginSection[]
 {
     \begin{frame}
     \frametitle{Table of Contents}
     \tableofcontents[currentsection]

     \end{frame}
}

or

 \AtBeginSection[]
 %    
 {
     \begin{frame}
     \frametitle{Table of Contents}
     \tableofcontents[currentsection]

     \end{frame}
}

everything will work. Although I'd suggest to move \AtBeginSection to the preamble.

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.