0

I'm making a poster with beamer and beamer-poster and I have a problem with my blocks. The title and the body are misaligned.

enter image description here

This is a minimalist example :

\usepackage{lipsum}

\usepackage[orientation=landscape,size=a0,scale=1.9,debug]{beamerposter}

\title[my pres]{my pres}
\author[my name]{my name}
\institute[My home]{My home}
\date{29/05/2011}

\definecolor{couleurtexte}{RGB}{255,255,255}
\definecolor{couleurconsole}{RGB}{0,0,0}

\begin{document}
\begin{frame}
\vfill
\begin{columns}[T]
\begin{column}{.25\linewidth}
\vbox to .95\textheight{%
\begin{block}{block 1}
\lipsum[1]%
\end{block}
\vfill
\begin{block}{block 2}%
\lipsum[1]%
\end{block}%
\vfill
\begin{block}{block 3}
\begin{itemize}
\item some items
\item some items
\item some items
\item some items
\end{itemize}
\end{block}
}
\end{column}
\end{columns}
\vfill
\end{frame}
\end{document}

and the associated theme file :

\ProvidesPackage{beamerthemetm1} 

\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\definecolor{firstcolor}{RGB}{0,68,255}
\definecolor{secondcolor}{RGB}{0,54,204}
\definecolor{thirdcolor}{RGB}{0,41,153}
\definecolor{backgroundcolor}{RGB}{77,124,255}

\setbeamercolor{background canvas}{bg=backgroundcolor}
\setbeamercolor{headline}{fg=black,bg=firstcolor}
\setbeamercolor{footline}{fg=couleurtexte, bg=firstcolor}
\setbeamerfont{footline}{size=\normalsize}

\setbeamercolor{separation line}{bg=black}
\setbeamercolor{title in headline}{fg=couleurtexte}
\setbeamercolor{author in headline}{fg=couleurtexte}
\setbeamercolor{institute in headline}{fg=couleurtexte}

\setbeamercolor{framesubtitle}{fg=couleurtexte, bg=ta2gray}
\setbeamercolor{author in head/foot}{fg=couleurtexte, bg=black}
\setbeamercolor{title in head/foot}{fg=couleurtexte, bg=black}

\setbeamercolor*{normal text}{fg=couleurtexte, bg=couleurtexte}
\setbeamercolor*{block begin}{bg=secondcolor,fg=black}
\setbeamercolor*{block end}{bg=secondcolor,fg=black}
\setbeamercolor*{block body}{bg=firstcolor,fg=black}
\setbeamercolor*{block title}{fg=couleurtexte,bg=secondcolor}

\setbeamerfont{block title}{size=\normalsize}
\setbeamerfont{block body}{size=\tiny}

I think the problem is caused by the difference of font size in title and body (same sizes give a correct alignement)

Do you know why I get this error and how to correct it ?

2

The beamer blocks are defined like this:

\defbeamertemplate*{block begin}{default}
{
  \par\vskip\medskipamount%
  \begin{beamercolorbox}[colsep*=.75ex]{block title}% <-- LINE 1
    \usebeamerfont*{block title}\insertblocktitle%
  \end{beamercolorbox}%
  {\parskip0pt\par}%
  \ifbeamercolorempty[bg]{block title}
  {}
  {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
  \usebeamerfont{block body}%
  \begin{beamercolorbox}[colsep*=.75ex,vmode]{block body}% <-- LINE 2
    \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\defbeamertemplate*{block end}{default}  
{\end{beamercolorbox}\vskip\smallskipamount}

Responsible for the behavior you see is the beamercolorbox option colsep which is font size dependent. So what you want to do is redefine the block begin templates with an font size independent measure (like mm for example):

\setbeamertemplate{block begin}
{
  \par\vskip\medskipamount%
  \begin{beamercolorbox}[colsep*=2mm]{block title}
    \usebeamerfont*{block title}\insertblocktitle%
  \end{beamercolorbox}%
  {\parskip0pt\par}%
  \ifbeamercolorempty[bg]{block title}
  {}
  {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
  \usebeamerfont{block body}%
  \begin{beamercolorbox}[colsep*=2mm,vmode]{block body}%
    \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}

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.