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 want to define a custom block in beamer.

Here are my definitions:

\documentclass[svgnames]{beamer}
\usepackage{xcolor}
\setbeamertemplate{blocks}[rounded]
\setbeamercolor{block title}{fg=White,bg=Red}
\setbeamercolor{block body}{bg=Blue}
\begin{document}

\begin{frame}
\begin{block}{lala}
fdsfdf
\end{block}
\end{frame}

\end{document}

How do I get rid of the fading effect between the title and the body?

share|improve this question
add comment

1 Answer

I don't know if I understand your question correctly; if you want to get rid of the vertical shading that goes from the lower part of the title area to the upper part of the body area, you can use \pgfdeclareverticalshading to change the vertical shading bmb@transition (the original definition can be found in beamerbaseboxes.sty):

\documentclass[svgnames]{beamer}
\usepackage{xcolor}
\setbeamertemplate{blocks}[rounded][shadow=false]
\setbeamercolor{block title}{fg=White,bg=Red}
\setbeamercolor{block body}{bg=Blue}

\makeatletter
\pgfdeclareverticalshading[lower.bg,upper.bg]{bmb@transition}{200cm}{%
  color(0pt)=(lower.bg); color(4pt)=(lower.bg); color(4pt)=(upper.bg)}
\makeatother

\begin{document}

\begin{frame}
\begin{block}{lala}
fdsfdf
\end{block}
\end{frame}

\end{document}
share|improve this answer
    
+1 Oh, that is good to know, Gonzalo. Is it similarly possible to get rid of the shadow's shading (with [shadow=true]) as well? –  Daniel Mar 8 '12 at 22:40
    
@Daniel: I think I don't understand your question, do you mean to eliminate the shadow when using the shadow=true option? –  Gonzalo Medina Mar 8 '12 at 22:47
    
No, I mean to have the shadow, but not a shaded shadow :-) (that is, the complete shadow should be just one grey value). Background: The softened shadows induce long processing times when printing on a PS printer, which is an issue for printing lecture notes in large quantities. –  Daniel Mar 8 '12 at 22:51
    
@Daniel: Ah; in this case, you'll have to change the vertical shading bmb@shadow and the radial shadings bmb@shadowball and bmb@shadowballlarge; the original definitions are in beamerbaseboxes.sty. –  Gonzalo Medina Mar 8 '12 at 23:04
    
Thanks Gonzalo, I will have a look! –  Daniel Mar 9 '12 at 7:53
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.