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 using latex to create a poster, and I'd like to have a bit more padding around the titles of the blocks. Where is the setting for this?

Here is a minimum working example... beamerposter_block_height.tex:

\documentclass[final]{beamer}
\mode<presentation>{\usetheme{MWE_theme}}
\usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}
\begin{document}
\begin{frame}
    \begin{block}{Introduction}
        the rain in spain                    
    \end{block}
\end{frame}
\end{document}

beamerthemeMWE_theme.sty:

\ProvidesPackage{beamerthemeMWE_theme}
\setbeamercolor*{block body}{bg=white,fg=black,series=\bfseries,family=\rmfamily}
\setbeamercolor*{block title}{fg=white,bg=gray}
\setbeamerfont{block title}{size=\LARGE,series=\bfseries}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{block begin}{
  \vskip.75ex
  \begin{beamercolorbox}[ht=10ex,dp=0.5ex,center,leftskip=1em,colsep*=.75ex]{block title}%
    \usebeamerfont*{block title}%
    %{\rule[-0.4ex]{0mm}{2ex}\insertblocktitle}%
    {\vskip5ex
     \textbf{\phantom{Gg}\insertblocktitle}% phantom because of baseline problem
     \vskip5ex
    }
  \end{beamercolorbox}%
  {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
  \usebeamerfont{block body}%
  \begin{beamercolorbox}[leftskip=1em,colsep*=.75ex,sep=0.5ex,vmode]{block body}%
    \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
  }
  \setbeamertemplate{block end}{
  \end{beamercolorbox}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setbeamertemplate{blocks}[rounded]%[shadow=true]
share|improve this question
    
Could you expand your code to a minimal working example, please? Short comment: series=\serif should not be set as a beamer color and I doubt that \serif is a valid command, use \setbeamerfont{block title}{size=\LARGE,series=\bfseries,family=\rmfamily}instead)! –  hakaze Sep 6 '12 at 15:28
    
I was hoping someone just knew the command. I don't really have a problem to debug, I just don't know where to set a variable. Anyway, that's a MWE, and you can hopefully see that the block title looks vertically cramped... Incidentally, the body text still doesn't want to become serif, although your suggestion worked fine for the block title. –  craq Sep 6 '12 at 16:42
2  
There's a problem with your beamerthemeMWE_theme.sty file; the final line \setbeamertemplate{blocks}[rounded]%[shadow=true] overrides some of the settings that appear before; is this intentional or is a mistake? –  Gonzalo Medina Sep 6 '12 at 17:53
    
@GonzaloMedina, I guess it's a mistake. I want rounded block corners, but I didn't know that this conflicted with any of the other commands. How should it be done? –  craq Sep 10 '12 at 7:43

2 Answers 2

up vote 1 down vote accepted

A dirty trick in situations like this is to insert a strut using \rule.

\begin{block}{\rule[-0.6ex]{0pt}{2.5ex}Introduction}
the rain in spain
\end{block}
share|improve this answer
    
Thanks, that works great. If there isn't a setting for title height, I'll go with the dirty trick. –  craq Sep 10 '12 at 7:48
    
as a follow up question... I tried a \rule command within the style file (commented out in the MWE). Why doesn't that work? –  craq Sep 10 '12 at 8:04
    
Another question, perhaps a little late: is there any way to hook such a rule onto the definition of block? –  Sean Allred Apr 18 '13 at 21:25

Now that I'm aware of it, I use the tcolorbox package which has customisable spacing around the title, and many more settings.

share|improve this answer

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.