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.

Bonjour,

I desesperately try to change the colour of \insert(short)part in CambridgeUS theme.

Here is what I want:

\setbeamertemplate{headline}{%
  \leavevmode%
  \hbox{%
    \begin{beamercolorbox}[%
      wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]{%
        author in head/foot}%
      \usebeamerfont{%
        section in head/foot}%
      \insertpart%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[%
      wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]{%
        part in head/foot}%
      \usebeamerfont{%
        date in head/foot}%
      \insertsubsection%
    \end{beamercolorbox}}%
  \vskip0pt%
}

But whatever the \setbeamercolor I use, the fg colour for \insertpart (or \insertsection...) remains red!

For instance, I can change the bg colour:

\setbeamercolor*{palette tertiary}{fg=green,bg=black}

the background becomes black the the foreground (for \insertpart) remains red and is not turned into green!

Does anybody have an answer and a reference where this is documented?

share|improve this question
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  cgnieder Sep 10 '12 at 21:05
    
Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  Kurt Sep 10 '12 at 21:10
    
Check out the Beamer Manual. Part 3 is dedicated to "changing the way things look." –  Daryl Sep 10 '12 at 21:20
add comment

1 Answer

Bonjour. Your code works for me:

\documentclass{beamer}
\usetheme{CambridgeUS}

\setbeamercolor{palette tertiary}{fg=green,bg=black}

\setbeamertemplate{headline}{%
  \leavevmode%
  \hbox{%
    \begin{beamercolorbox}[%
      wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]{%
        author in head/foot}%
      \usebeamerfont{%
        section in head/foot}%
      \insertpart%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[%
      wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]{%
        part in head/foot}%
      \usebeamerfont{%
        date in head/foot}%
      \insertsubsection%
    \end{beamercolorbox}}%
  \vskip0pt%
}
\begin{document}

\part{Test Part}
\section{Test Section}
\begin{frame}
Test
\end{frame}

\end{document}

enter image description here

However, you must be careful; changing palette tertiary will affect other elements of the theme besides the headline (as can be seen in my example). If you want to change only the colors used in the headline, then you need to proceed in another way (setting the appropriate colors for the corresponding beamer boxes, for example).

share|improve this answer
    
The culprit has been found: in \hypersetup command, to feed the metadata, colorlinks=true override the changes made on colours for hyperlinks and \insertpart is a hyperlink... (similarly, you cannot change colours of items in toc) –  François Patte Sep 11 '12 at 10:38
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.