I have a figure which is coming out of the block environment in a beamer presentation:
I found this thread and defined a varblock environment, where I set the width to be a little larger. But the resulting block grows only to the right and therefore is not centered in the frame. I would like to center this block, or shift it and its contents to the left.
I tried using \hspace
and \begin{center}\begin{minipage}{blockwidth} <new block environment> \end{minipage}\end{center}
, but in both cases the varblock environment rescaled (shifted?) and went bigger than the frame.
Also, when using the varblock, my images are for some reason shifted to the right (see the intersection of right-most circle with frame end). This effect is reduced if \setbeamertemplate{blocks}[rounded]
is removed from the code, but I need it.
How to center the varblock and prevent it from shifting my images to the right? Alternatively, how to shift the varblock and its contents to the letf?
MWE with usual block and varblock follows:
\documentclass{beamer}
\usepackage{tikz}
\newenvironment<>{varblock}[2][.9\textwidth]{%
\setlength{\textwidth}{#1}
\begin{actionenv}#3%
\def\insertblocktitle{#2}%
\par%
\usebeamertemplate{block begin}}
{\par%
\usebeamertemplate{block end}%
\end{actionenv}}
\usecolortheme{orchid}
\setbeamertemplate{blocks}[rounded]
\begin{document}
%%%%%%%% Usual Block Environment
\begin{frame}{Title}
\begin{block}{Proof}
\begin{minipage}[b]{0.55\linewidth}
\begin{itemize}
\item some text
\end{itemize}
\end{minipage}
\begin{minipage}[b]{0.35\linewidth}
\begin{figure}
\centering
\begin{tikzpicture}
%draw first slide circles
\only<1>{
\draw (95:1.5) circle (1cm);
\draw (0:1.5) circle (1cm);
\draw (-180:1.5) circle (1cm);
}
%draw second slide circles
\only<2>{
\draw[red] (0,0) circle (1cm);
\draw (95:2) circle (1cm);
\draw (0:2) circle (1cm);
\draw (-180:2) circle (1cm);
}
\end{tikzpicture}
\end{figure}
\end{minipage}
\end{block}
\end{frame}
%%%%%%%% Adjustable Block Environment
\begin{frame}{Title}
\begin{varblock}[1.05\linewidth]{Proof}
\begin{minipage}[b]{0.55\linewidth}
\begin{itemize}
\item some text
\end{itemize}
\end{minipage}
\begin{minipage}[b]{0.35\linewidth}
\begin{figure}
\centering
\begin{tikzpicture}
%draw first slide circles
\only<1>{
\draw (95:1.5) circle (1cm);
\draw (0:1.5) circle (1cm);
\draw (-180:1.5) circle (1cm);
}
%draw second slide circles
\only<2>{
\draw[red] (0,0) circle (1cm);
\draw (95:2) circle (1cm);
\draw (0:2) circle (1cm);
\draw (-180:2) circle (1cm);
}
\end{tikzpicture}
\end{figure}
\end{minipage}
\end{varblock}
\end{frame}
\end{document}
Thanks in advance!