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.

On one particular frame I would like to remove the shadow that the theme I am using inserts under the title. The reason is that with a black background (which I use only on this frame), it looks quite ugly.

Do you have any idea how I can do that? I've managed to remove the shadow under a block environment, thanks to:

\setbeamertemplate{blocks}[rounded]% [shadow=false]

but I could not find a similar thing for \titleframe (except one that you can only put in your preamble - which would not help, in my case).

Thank you very much for your help.

share|improve this question

4 Answers 4

I did some digging, and I figured out how to do it.

The title page is defined in the title page Beamer template. Luckily, this template takes a parameter which gets passed to the beamercolorbox that is used for the title/author/institute/date. In beamerinnerthemerounded.sty, the parameters to this template are set by default to:

\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=\beamer@themerounded@shadow]

All we have to do is reset the parameters to remove the shadow. To do this, simply call:

\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true]

before you make the call to \titlepage. That should do it.

share|improve this answer

Ok, this method works:

1° Put between opening and closing braces everything concerning the frame(s) for which you want the theme to be modified. Do any modifications you want (background color, etc) there.

2° Redefine the frametitle template (I use the Frankfurt theme, so the original definitions are coming from the smoothbars theme, see the beamerthemeFrankfurt.sty file).

To do that, I have copy pasted the original definition of the frametitle template directly in my .tex file, where I needed it to be changed, and removed parts where shading was included:

%%%Copy-paste from /usr/share/texmf/tex/latex/beamer/themes/outer/beamerouterthemesmoothbars.sty:

\setbeamertemplate{frametitle}{
\nointerlineskip%
  \usebeamerfont{headline}%
  \begin{beamercolorbox}[wd=\paperwidth,ht=1.5ex,dp=0ex,vmode]{empty}
    \pgfuseshading{beamer@aboveframetitle}%
  \end{beamercolorbox}%
  \vskip-.5ex%
  \nointerlineskip%
  \begin{beamercolorbox}[wd=\paperwidth,leftskip=.3cm,rightskip=.3cm plus1fil,vmode]{frametitle}
    \usebeamerfont*{frametitle}\insertframetitle%
      \ifx\insertframesubtitle\@empty%
        \strut\par%
      \else
        \par{\usebeamerfont*{framesubtitle}{\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}\strut\par}%
      \fi%%
    \usebeamerfont{headline}%
%%%%\vskip.5ex %REMOVE THIS SPACE, WHICH IS DEDICATED TO SHADING, DEFINED BELOW (OPTIONAL)
  \end{beamercolorbox}%
  \nointerlineskip
%%%% SHADING DEF:
%%%%  \begin{beamercolorbox}[wd=\paperwidth,ht=.5ex,dp=0ex]{empty}
%%%%  \pgfuseshading{beamer@belowframetitle}%
%%%%\end{beamercolorbox}%

}

It might not be the best way to achieve this but the result is exactly what I needed.

To improve it, one should look in the direction of ESultanik's answer, once "titlepage" replaced by "frametitle". (It does work for the titlepage).

\setbeamertemplate{frametitle}[default][colsep=-4bp,rounded=false,shadow=false]

does something similar to what is needed but it looks very different from what Frankfurt theme without shadowing looks like. There is no straightforward way to apply changes/options to

\setbeamertemplate{frametitle}[Frankfurt]

because it doesn't accept any. An other way could be to start from the default theme and apply laboriously every modification made by the theme (painful, the above solution looks easier).

NB:

  • ESultanik, you have confused the title of a frame and the titlepage. Nevertheless, it is your answer which made me find a working solution (though maybe not the best one).

  • vanden: this is true but I have used a temporary account so I could not add comments, after cleaning cookies, even for my own question.

share|improve this answer
    
Ah, you are correct: I was confusing the title page with the title of a frame. –  ESultanik Sep 18 '10 at 18:21

One option is to use this patch to Beamer that uses "real" transparency for all shadows. On the page with the black background the transparent shadows would simply disappear.

Edit: If I recall correctly, all you have to do to use the patch is download beamerbaseboxes.sty from that link and put it in the same directory as your .tex file. That's it!

share|improve this answer

Now, a better alternative would be that the shadowing effect was not ugly in the first place (then, there would be no need to remove it - which can still be done using the previous solution).

The reason why those 'shadows' below titleframes look ugly when you change your background colour is because of the way colours are handled in beamer.

You can fix that the following way. Before the(se) slide(s) put:

%%
%SOME CHANGES HERE, LIKE THE NEW BACKGROUND COLOUR..
%\setbeamercolor{background canvas}{bg=black}
%\setbeamertemplate{blocks}[rounded][shadow=false] %%TO REMOVE THE PSEUDO-SHADOW UNDER BLOCKS
%%

\pgfdeclareverticalshading{beamer@belowframetitle}{\the\paperwidth}{%
      color(0ex)=(black);%PUT THE COLOUR YOU WANT, INSTEAD OF black
      color(0.5ex)=(frametitle.bg)
    }

Then your slide and, finally, once you want the previous theme to come back:

\pgfdeclareverticalshading{beamer@belowframetitle}{\the\paperwidth}{%
      color(0ex)=(bg);% bg BEING THE "normal text" BACKGROUND COLOUR
      color(0.5ex)=(frametitle.bg)
    }

We have finally found this with a colleague. Thanks for your help.

share|improve this answer

Your Answer

 
discard

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