I stumbled in a similar problem and solved it with the tcolorbox
package.
Here is the code:
\documentclass[final]{beamer}
\usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}
\usepackage{tcolorbox} %
\tcbuselibrary{skins} % preamble
\usepackage{tikz} %
\usetikzlibrary{shadows,shadings} %
\tikzset{myshadow/.style={ % custom shadow with tikz
opacity=.85,
shadow xshift=0.15,
shadow yshift=-0.15,
shade,
shading=axis,
shading angle=230}
}
\tcbset{ % set a custom tcolorbox
skin=enhanced, % enables use of shadows
frame style={fill=gray,drop shadow={myshadow}}, % sets the frame color and the shadow properties
bottom=7mm, % distance between the body text and the bottom frame
top=14mm, % distance between the body text and the top frame
boxrule=0mm, % frame width
bottomtitle=5mm, % distance between the title text and the bottom title frame
toptitle=5mm, % distance between the title text and the top title frame
lefttitle=1cm % title text left margin
}
\begin{document}
\begin{frame}
\begin{columns}
\begin{column}{.3\textwidth}
\begin{tcolorbox}[title=\large Fontsizes]
\centering
{\tiny tiny}\par
{\scriptsize scriptsize}\par
{\footnotesize footnotesize}\par
{\normalsize normalsize}\par
\end{tcolorbox}
\end{column}
\end{columns}
\end{frame}
\end{document}
the result is this:
for comparison:
I tried to explain everything in the code. If you want all the tcolorboxes to be like this, just put the \tcbset
code in the preamble, otherwise start a group just before the tcolorboxes you want to customize in that way.
The only thing that doesn't really look the same is the shadow (my shadow isn't blurred), but with some tweaks and the shadows.blur
tikzlibrary it should be possible to obtain the exact same result.
You can kill the general shadow
key with general shadows/.style=
and use this on the child, i.e.:
% Preamble:
\tikzset{no shadows/.style={general shadow/.style=}}
% In the tree:
child[no shadows] {node {Winesap}}
which would disable all shadows on that child.
Another option is to empty the macro that stores the preactions, something like
% Preamble:
\makeatletter
\tikzset{no shadows/.code=\let\tikz@preactions\pgfutil@empty}
\makeatother
% In the tree:
child {node[no shadows] {Winesap}}
which would kill all possible preactions but would only affect this node.
Code A
\documentclass{beamer}
\usecolortheme[named=teal]{structure}
\usepackage{tikz}
\usetikzlibrary{shadows,trees}
\tikzset{
edge from parent fork right,
grow'=right,
every node/.style={rectangle,rounded corners,thick,draw=structure,fill=white,drop shadow},
edge from parent/.style={thick,draw=structure},
no shadows/.style={general shadow/.style=},
}
\begin{document}
\begin{frame}
\begin{tikzpicture}[
level 1/.style={level distance=7em,sibling distance=9em},
level 2/.style={level distance=7em,sibling distance=6em},
level 3/.style={level distance=7em,sibling distance=3em}]
\node {food}
child {node {fruit}
child {node {apples}
child {node {Granny Smith}}
child[no shadows] {node {Winesap}}
}
child {node {pears}}
}
child {node {veggies}
child {node {beets}}
child {node {Swiss chard}}
};
\end{tikzpicture}
\end{frame}
\end{document}
Code B
\documentclass{beamer}
\usecolortheme[named=teal]{structure}
\usepackage{tikz}
\usetikzlibrary{shadows,trees}
\makeatletter
\tikzset{no shadows/.code=\let\tikz@preactions\pgfutil@empty}
\makeatother
\tikzset{
edge from parent fork right,
grow'=right,
every node/.style={rectangle,rounded corners,thick,draw=structure,fill=white,drop shadow},
edge from parent/.style={thick,draw=structure},
}
\begin{document}
\begin{frame}
\begin{tikzpicture}[
level 1/.style={level distance=7em,sibling distance=9em},
level 2/.style={level distance=7em,sibling distance=6em},
level 3/.style={level distance=7em,sibling distance=3em}]
\node {food}
child {node {fruit}
child {node {apples}
child {node {Granny Smith}}
child {node[no shadows] {Winesap}}
}
child {node {pears}}
}
child {node {veggies}
child {node {beets}}
child {node {Swiss chard}}
};
\end{tikzpicture}
\end{frame}
\end{document}
Best Answer
While someone provides a only-beamer-solution, you could consider to use
tcolorbox
and its easily customizable boxes.2nd version:
Although I'm don't know what I did, after some tests I've got
from: