# Beamerposter and altering blocks, alert blocks and example blocks

So I'm just trying to get comfortable with making a poster with beamer. I'd like to be able to customize a few different block type environments and I'm not sure the best way to go about this. Additionally, I'm confused with possible conflicts between different packages and themes. So far I have been exploring two approaches: (1) altering the blocks, alert blocks and example blocks within beamer and (2) defining new block type environments with \newenvironment.

I've been unsuccessful with either, and I have some questions about both. In either case the basic code I'm using is:

\documentclass[final]{beamer}
\usepackage[scale=0.90]{beamerposter} %scale is for fontsize?
\usepackage[absolute,overlay]{textpos}
\usepackage{color}
\usepackage{tikz}
\usepackage{amsmath,amssymb,latexsym}

\setlength{\TPHorizModule}{\paperwidth}
\setlength{\TPVertModule}{1 cm}

\usetheme{confposter}

\title{Title}
\author{Some People}
\institute{Department of Blah}
\begin{document}

\begin{textblock}{0.3}(.01,10)
\begin{exampleblock}{An exampleblock environment}
Some text.
\end{exampleblock}

\begin{block}{A block environment}
Some text.
\end{block}
Some text.
\end{textblock}
\end{document}


So first with approach (1) I'd like to independently alter and define the three types of blocks so I can get three distinct textbox type things to my liking. Looking at the beamer manual it appeared that \setbeamertemplate{block} could be used but that this can't modify alert and example blocks. Additionally, I can't find a detailed explanation of the different options with the \setbeamertemplate command. I did play around with some pre made color themes like whale and orchid and basically I'd like to do what they do myself. Is there a way to personally affect similar changes within the latex document? Additionally, is \usetheme{confposter} going to affect/conflict with the templates of the blocks? I'm only using it because it won't compile the title and authors and such on the top when I take it out.

The other approach (2) I was playing around with was with \newenvironment which I was trying based on Define a new block environment in LaTeX beamer. For example doing

\newenvironment<>{test1}[1][]{
\setbeamercolor{block body example}{fg=black,bg=blue}
\setbeamercolor{block title example}{fg=white,bg=red!75!black}
\begin{example}[]}{\end{example}
}


And then invoking

\begin{test1}[blah title]
stuff
\end{test1}


However, I couldn't find additional documentation that really detailed the options in \newenvironment. For example I couldn't get it to not say example in the Title etc. Can you point me in the direction of some documentation about \newenvironment and it's respective options?

So overall, do you think either of these approaches are good? Can you suggest something else or detailed documentation that would be pertinent to my aim?

1. You can change the color attributes for the foreground and background for each kind of block independently using

%For example blocks
\setbeamercolor{block title example}{fg=red,bg=orange}
\setbeamercolor{block body example}{fg=cyan,bg=yellow}

%For blocks
\setbeamercolor{block title}{fg=white,bg=blue}
\setbeamercolor{block body}{fg=white,bg=green!40!black}


Using font templates with the same names you can also control the fonts attributes, if desired.

An example code:

\documentclass[final]{beamer}
\usepackage[scale=0.90]{beamerposter} %scale is for fontsize?
\usepackage[absolute,overlay]{textpos}
\usepackage{color}
\usepackage{tikz}
\usepackage{amsmath,amssymb,latexsym}

\setlength{\TPHorizModule}{\paperwidth}
\setlength{\TPVertModule}{1 cm}

%For example blocks
\setbeamercolor{block title example}{fg=red,bg=orange}
\setbeamercolor{block body example}{fg=cyan,bg=yellow}

%For blocks
\setbeamercolor{block title}{fg=white,bg=blue}
\setbeamercolor{block body}{fg=white,bg=green!40!black}

%\usetheme{confposter}

\title{Title}
\author{Some People}
\institute{Department of Blah}
\begin{document}

\begin{textblock}{0.3}(.01,10)
\begin{exampleblock}{An exampleblock environment}
Some text.
\end{exampleblock}

\begin{block}{A block environment}
Some text.
\end{block}
Some text.
\end{textblock}
\end{document}


2. I would suggest you to have a look at the tcolorbox package with its beamer skin to define new types of blocks; here's a little example:

\documentclass[final,dvipsnames]{beamer}
\usepackage[scale=0.90]{beamerposter} %scale is for fontsize?
\usepackage[absolute,overlay]{textpos}
\usepackage{color}
\usepackage{tikz}
\usepackage{amsmath,amssymb,latexsym}
\usepackage[many]{tcolorbox}

%\usetheme{confposter}

\newtcolorbox{myblock}[1][]{
beamer,
width=\textwidth+7pt,
enlarge left by=-3pt,
colframe=block body.bg,
bottom=0pt,
top=-2pt,
left=0pt,
right=0pt,
toptitle=-1pt,
bottomtitle=-1pt,
fonttitle=\normalfont,
interior titled code={
(title.south west) --
(title.south east) {[rounded corners] --
(title.north east)  --
(title.north west)} --
(title.south west);
}
}

\title{Title}
\author{Some People}
\institute{Department of Blah}

\begin{document}

\begin{frame}
\begin{columns}
\column{0.3\textwidth}
\begin{block}{A standard block}
This box ia a box provided by the \texttt{beamer} class.
\end{block}

\begin{myblock}[An example with \texttt{tcolorbox}]
This box looks like a box provided by the \texttt{beamer} class.
\end{myblock}
\end{columns}
\end{frame}

\end{document}


The result:

• Great thanks. What about altering more fundamental characteristics like rounding, shadow etc? i.e. in the \newenvironment approach I was playing with the use of \setbeamertemplate{blocks}[] and then doing options in []. But it didn't seem like \setbemeartemplate{alert block or example block} was working for those respective types. Can you suggest documentation for changing those kind of aspects? Thanks so much! – Fractal20 Feb 22 '15 at 18:32
• @Fractal20 the beamer manual explains available options for blocks. If you want extensive customization, use the second approach I suggested using tcolorbox. – Gonzalo Medina Feb 22 '15 at 18:33