1

I am writing a poster using the beamerposterpackage, and I'm using a template that a friend of mine gave me. In his template, the following code alters the default block template:

\setbeamertemplate{block begin}{
  \vskip1ex
  \begin{beamercolorbox}[rounded=true,shadow=true,leftskip=1cm,colsep*=.75ex]{block title}%
    \usebeamerfont*{block title}\insertblocktitle
  \end{beamercolorbox}%
  {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
  \usebeamerfont{block body}%
  \begin{beamercolorbox}[rounded=true,shadow=true,colsep*=.75ex,sep=.75ex,vmode]{block body}%
    \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
  }
  \setbeamertemplate{block end}{
  \end{beamercolorbox}
}

This gives a nice result. However, I want to have also highlighted blocks, and when I use alertblock or exampleblock they come out with not-rounded corners and no shadowing. How would I apply the above design to all blocks?

2

Please provide a Minimal Working Example in future. In this case, I basically borrowed example.tex from beamerposter to work with. I've taken out some extraneous details but this basically uses the same setup, theme and frame content, with modifications to demonstrate various block types.

\documentclass[final]{beamer}
\usetheme{Berlin}
\usepackage[orientation=portrait,size=a0,scale=1.4]{beamerposter}

\newenvironment{mybeamerboxtitle}[1]{%
  \vskip1ex
  \usebeamerfont{#1}%
  \begin{beamercolorbox}[rounded=true,shadow=true,leftskip=1cm,colsep*=.75ex]{#1}}{%
  \end{beamercolorbox}}
\newenvironment{mybeamerboxbody}[1]{%
  {\ifbeamercolorempty[bg]{#1}{}{\nointerlineskip\vskip-0.5pt}}%
  \usebeamerfont{#1}%
  \begin{beamercolorbox}[rounded=true,shadow=true,colsep*=.75ex,sep=.75ex,vmode]{#1}%
    \ifbeamercolorempty[bg]{#1}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
    }{%
  \end{beamercolorbox}}

\setbeamertemplate{block begin}{%
  \begin{mybeamerboxtitle}{block title}%
    \usebeamerfont*{block title}\insertblocktitle
  \end{mybeamerboxtitle}%
  \begin{mybeamerboxbody}{block body}%
  }
\setbeamertemplate{block end}{%
  \end{mybeamerboxbody}}

\setbeamertemplate{block alerted begin}{%
  \begin{mybeamerboxtitle}{block title alerted}%
    \usebeamerfont*{block title alerted}\insertblocktitle
  \end{mybeamerboxtitle}%
  \begin{mybeamerboxbody}{block body alerted}%
  }
\setbeamertemplate{block alerted end}{%
  \end{mybeamerboxbody}}

\setbeamertemplate{block example begin}{%
  \begin{mybeamerboxtitle}{block title example}%
    \usebeamerfont*{block title example}\insertblocktitle
  \end{mybeamerboxtitle}%
  \begin{mybeamerboxbody}{block body example}%
  }
\setbeamertemplate{block example end}{%
  \end{mybeamerboxbody}}


\begin{document}
  \begin{frame}{}
    \vfill
    \begin{block}{\large Fontsizes}
      \centering
      {\tiny tiny}\par
      {\scriptsize scriptsize}\par
      {\footnotesize footnotesize}\par
      {\normalsize normalsize}\par
      {\large large}\par
      {\Large Large}\par
      {\LARGE LARGE}\par
      {\veryHuge VeryHuge}\par
      {\VeryHuge VeryHuge}\par
      {\VERYHuge VERYHuge}\par
    \end{block}
    \vfill
    \vfill
    \begin{alertblock}{\large Fontsizes}
      \centering
      {\tiny tiny}\par
      {\scriptsize scriptsize}\par
      {\footnotesize footnotesize}\par
      {\normalsize normalsize}\par
      {\large large}\par
      {\Large Large}\par
      {\LARGE LARGE}\par
      {\veryHuge VeryHuge}\par
      {\VeryHuge VeryHuge}\par
      {\VERYHuge VERYHuge}\par
    \end{alertblock}
    \vfill
    \begin{columns}[t]
      \begin{column}{.48\linewidth}
        \begin{block}{Introduction}

          \begin{itemize}
          \item[]
            \begin{enumerate}
            \item some items
            \item some items
            \item some items
            \item some items
            \end{enumerate}
          \end{itemize}
        \end{block}
      \end{column}
      \begin{column}{.48\linewidth}
        \begin{block}{Introduction}
          \begin{itemize}
          \item some items and $\alpha=\gamma, \sum_{i}$
          \item some items
          \item some items
          \item some items
          \end{itemize}
          $$\alpha=\gamma, \sum_{i}$$
        \end{block}

        \begin{block}{Introduction}
          \begin{itemize}
          \item some items
          \item some items
          \item some items
          \item some items
          \end{itemize}
        \end{block}

        \begin{exampleblock}{Introduction}
          \begin{itemize}
          \item some items and $\alpha=\gamma, \sum_{i}$
          \item some items
          \item some items
          \item some items
          \end{itemize}
          $$\alpha=\gamma, \sum_{i}$$
        \end{exampleblock}
      \end{column}
    \end{columns}
  \end{frame}
\end{document}

produces:

enter image description here

Note that the grey background is not part of the document itself but I needed to go beyond that to make sure I captured everything since beamer uses zero margins.

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.