5

I've been scouring the internet for an answer to this question, unsuccessfully. I couldn't find it here. If there is an answer already, sorry and please direct me to it.

I'm trying to customize my presentation a lot and with my MWE, I've gotten stuck with a little detail that I can't figure out.

\documentclass{beamer}
\usetheme{Ilmenau}

\useoutertheme[subsection=false]{smoothbars}

\usepackage{lipsum}

\setbeamertemplate{footline}[default]
\setbeamertemplate{navigation symbols}{}

\definecolor{color3}{rgb}{.4 .4 .4}

\usecolortheme[named = color3]{structure}
\setbeamercolor{frametitle}{fg = white}
\setbeamercolor{background canvas}{bg = black}
\setbeamercolor{normal text}{fg = white}

\begin{document}
\begin{frame}
    \frametitle{Test}
    \framesubtitle{Test framesubtitle}
    \lipsum[4]
\end{frame}
\end{document}

When this code is run, it'll create a nearly black slide. EXCEPT for the transition from the title to the main body of the slide, where there's an annoying little white line. How can I have this color transition change from gray to black instead of from gray to white?

enter image description here

4

You need to redefine the beamer@belowframetitle shading used by the smoothbars outer theme:

\documentclass{beamer}
\usetheme{Ilmenau}
\useoutertheme[subsection=false]{smoothbars}

\usepackage{lipsum}

\setbeamertemplate{footline}[default]
\setbeamertemplate{navigation symbols}{}

\definecolor{color3}{rgb}{.4 .4 .4}

\usecolortheme[named = color3]{structure}
\setbeamercolor{frametitle}{fg = white}
\setbeamercolor{background canvas}{bg = black}
\setbeamercolor{normal text}{fg = white}

\makeatletter
\AtBeginDocument{
  {
    \pgfdeclareverticalshading{beamer@belowframetitle}{\the\paperwidth}{%
      color(0ex)=(black);%(global.bg);%
      color(1ex)=(frametitle.bg)
    }
  }
}
\makeatother

\begin{document}
\begin{frame}
    \frametitle{Test}
    \framesubtitle{Test framesubtitle}
    \lipsum[4]
\end{frame}
\end{document}

enter image description here

  • This is already better, but it suppresses the transition more than anything else. Is there some way to have that color transition remaining but fading into black? – HTM Sep 10 '13 at 18:35
  • @HTM Sure! Please see my updated answer (I was doing exactly that). – Gonzalo Medina Sep 10 '13 at 18:35
  • Excellent! That was exactly what I was looking for! Thanks so much! :-) As an aside: where would one learn these kinds of tricks? I'm no newbie to LaTeX or beamer, but have no clue how to do these things. – HTM Sep 10 '13 at 18:53
  • @HTM You're welcome! In this particular case, you need to go to the definitions of the themes themselves; you can find them under .../tex/latex/beamer/themes in particular, here: .../tex/latex/beamer/themes/outer/beameroutherthemesmotthbars.sty. There you find the original definitions for the shadings; a little knowledge of PGF allows you to easy modify them. By the way, please consider accepting the answer by clicking the checkmark to its left. In case of doubt, please see How do you accept an answer?. – Gonzalo Medina Sep 10 '13 at 18:57
  • The follow-up would be, how would I change the color of the upper headline (or whatever the name is)? Is there any easy code or would it be equally long (or even longer)? – HTM Sep 10 '13 at 23:02

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.