0

I tryed to get a different headline on the title page with if else fi, but it destroyed the frame styles. Why?

Need help in beamertheme.sty

\setbeamertemplate{headline}
{%
  \ifnum \insertpagenumber=1
    \begin{beamercolorbox}[wd=\paperwidth, ht=2mm, dp=1mm]{head1}\end{beamercolorbox}%
  \else
    \begin{beamercolorbox}[wd=\paperwidth, ht=2mm, dp=1mm]{head1}\end{beamercolorbox}%
    \vspace*{1mm}%
    \hspace{1mm}\includegraphics[width=0.1\paperwidth]{fig/logo.png}%
    \vspace{1mm}%
    \newline%
    \begin{beamercolorbox}[wd=\paperwidth, ht=0.5mm, dp=1mm]{head1}\end{beamercolorbox}%
  \fi
}
\setbeamercolor{head1}{fg=white, bg=black}

Title page with if else fi First frame with if else fi

without if else fi

\setbeamertemplate{headline}{%
  \begin{beamercolorbox}[wd=\paperwidth, ht=2mm, dp=1mm]{head1}\end{beamercolorbox}%
  \vspace*{1mm}%
  \hspace{1mm}\includegraphics[width=0.1\paperwidth]{fig/logo.png}%
  \vspace{1mm}%
  \newline%
  \begin{beamercolorbox}[wd=\paperwidth, ht=0.5mm, dp=1mm]{head1}\end{beamercolorbox}%
}
\setbeamercolor{head1}{fg=white, bg=black}

Title page without if else fi First frame without if else fi

Update: It looks like the next pages are aligned with the first headline.

  • 2
    The height of the headline template must be constant... – Paul Gaborit Jun 13 at 5:43
  • 1
    @PaulGaborit You are right. I misread the question. Merci! – user194703 Jun 13 at 6:00
  • @PaulGaborit I added enough \vspace and it works thx, but actually i wanted the headline on the title page to be bigger with a bigger LOGO. Is there a way to separate the first page from anothers? – Alex Jun 13 at 8:35
0

I found a dirty solution (works only if the headline on the title page is bigger):

beamerthemeooo.sty

% Head line for frames
\defbeamertemplate*{headline}{headline frames}
{%
  \begin{beamercolorbox}[wd=\paperwidth, ht=3mm]{head1}\end{beamercolorbox}%
  \vspace*{1mm}%
  \hspace*{1mm}\includegraphics[height=8mm]{fig/logo.png}%
  \vspace*{1mm}%
  \newline%
  \begin{beamercolorbox}[wd=\paperwidth, ht=1mm]{head1}\end{beamercolorbox}%
}
% Head line for title page
\defbeamertemplate*{headline}{headline titlepage}
{%
  \begin{beamercolorbox}[wd=\paperwidth, ht=3mm]{head1}\end{beamercolorbox}%
  \vspace*{1mm}
  \hspace*{1mm}\includegraphics[height=30mm]{fig/logo.png}
}
\setbeamercolor{head1}{fg=white, bg=black}

beamer.tex

\setbeamertemplate{headline}[headline frames]% for whole document
\begin{document}
\setbeamertemplate{headline}[headline titlepage]% change to titlepage headline
\begin{frame}
\titlepage
\end{frame}
\setbeamertemplate{headline}[headline frames]% change back to frame headline

new title page new frame page

| improve this answer | |

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.