Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to create my own beamer theme; I want to use a mini frame navigation in headline (included by using \insertnavigation) but the colors not working as I want them yet.

Here´s the output of my headline:

enter image description here

When going forward in the presentation, the current active section is shown in black. How can I change its color to the gold I've already used?

Also I´d like to change the shading of inactive sections to get them a little brighter than they are at the moment.

Here´s the important part of my colortheme.sty and the outertheme.sty:

% Setzt Deep Harlequin (dunkler)  
\definecolor{jvagreen}{RGB}{22, 89, 0}

% Setzt Vivid Gold (dunkler)
\definecolor{jvagold}{RGB}{231, 202, 0}

% Farbe der Elemente der headline
\setbeamercolor{section in head/foot}{fg = jvagold, bg = jvagreen}

=====================================================================

% Komprimiert die miniframe Kreise auf eine Linie
\beamer@compresstrue


% Definiert die headline
\setbeamertemplate{headline}
{ 
\usebeamercolor{seperation line}
% Bindet die Grafik ein
\includegraphics[width=0.15\paperwidth]{Wappen_JvA}
\begin{beamercolorbox}[wd=.85\paperwidth,right]{section in head/foot}
    \rule{0.85\paperwidth}{1pt}
    %Vertikaler Abstand
    \vskip10pt
    %Fügt die Standard-Navi ein (miniframes)
    \insertnavigation{0.85\paperwidth}
    \vskip8pt
    \rule{0.85\paperwidth}{0.5pt}
    \vskip7.5pt
    % Horizontaler Abstand
    \leftskip=10pt
    % Fügt den frametitle an dieser Stelle ein
    \insertframetitle
    \vskip20pt
    \leftskip=0pt
    \rule{0.85\paperwidth}{1pt}
\end{beamercolorbox} 
}

If you have any ideas on how to change it in the way I want it to be or suggestions / improvements to my code, please let me know ;)

share|improve this question
1  
\insertframetitle won't be recognized inside the headline template. You need to set the headline and frametitle templates separately. –  Gonzalo Medina May 28 '12 at 14:57
    
Well he's giving me a compile error, but basically it works ;) He inserts the frame title as asked. Could u show me how to separate them correctly? –  JvA May 28 '12 at 15:42
    
You should use \setbeamertemplate{frametitle} as you did for the headline: you have to remove part of the code in your actual headline and put it in the frametitle. –  Claudio Fiandrino May 28 '12 at 15:46
    
Mmmhh yeah, that works, but doesn't give the result I want ... the frame title is supposed to be only in the headline, not on the frame itself a second time. –  JvA May 28 '12 at 16:02
    
@JvA: it is just matter of defining in a proper way the vertical spacing. I think it is perfectly possible get your desired result with this approach. –  Claudio Fiandrino May 28 '12 at 16:09
show 2 more comments

1 Answer

As said in the comments, the right way to proceed is to define separately the two templates headline and frametitle.

Here is a possible implementation (as test image I used the logo of my university):

\documentclass{beamer}
\usepackage{lmodern}
%=====================================================================
% Color definition

% Setzt Deep Harlequin (dunkler)  
\definecolor{jvagreen}{RGB}{22, 89, 0}

% Setzt Vivid Gold (dunkler)
\definecolor{jvagold}{RGB}{231, 202, 0}

% Farbe der Elemente der headline
\setbeamercolor{section in head/foot}{fg = jvagold, bg = jvagreen}

%=====================================================================
% Templates - headline, frametitle

\makeatletter
% Komprimiert die miniframe Kreise auf eine Linie
\beamer@compresstrue
\makeatother

% Definiert die headline
\setbeamertemplate{headline}
{ 
\includegraphics[width=0.15\paperwidth]{logopolito} % test logo
\begin{beamercolorbox}[wd=.85\paperwidth,right]{section in head/foot}
    \rule{0.85\paperwidth}{1pt}
    %Vertikaler Abstand
    \vskip10pt
    %Fügt die Standard-Navi ein (miniframes)
    \insertnavigation{0.85\paperwidth}
    \vskip8pt
    \rule{0.85\paperwidth}{0.5pt}
    \vskip27.5pt % same height of the example provided, but IMHO is too much
    \rule{0.85\paperwidth}{1pt}
\end{beamercolorbox} 
}

% definition of the frametitle
\setbeamertemplate{frametitle}
{
\vskip-24pt % to shift up the frametitle
\hbox{ 
 \begin{beamercolorbox}[wd=.0675\textwidth]{} % left shift
 \end{beamercolorbox} 
 \begin{beamercolorbox}[sep=4pt]{section in head/foot}
 \insertframetitle
 \end{beamercolorbox} 
 }
}

\begin{document}
\section{Test 1}
\subsection{first}
\begin{frame}{A title}
hello
\end{frame}

\subsection{second}
\begin{frame}{A second title}
hello
\end{frame}

\section{Test 2}
\subsection{first}
\begin{frame}{Another title}
hello
\end{frame}

\subsection{second}
\begin{frame}{A second title}
hello
\end{frame}

\section{Test 3}
\subsection{first}
\begin{frame}{Last title}
hello
\end{frame}

\subsection{second}
\begin{frame}{A second title}
hello
\end{frame}

\subsection{second}
\begin{frame}{A third title}
hello
\end{frame}
\end{document}

The final result is:

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.