I'm not sure if what I want is possible at all, but asking doesn't hurt…
I've adjusted the itemize
environment so that the item text is aligned with the text outside the environment. This might look strange, but since I never use itemized and non-itemized text on the same slide, it's not a problem.
A problem arises if I use itemize
inside a block
environment. In this case, the bullets are positioned outside of the box — which is definitely not what I want.
Can I somehow distinguish between itemize
environments inside a block and the ones outside a block and set the \leftmargini
accordingly?
\documentclass{beamer}
\usetheme{default}
\usecolortheme{crane}
\setbeamertemplate{itemize/enumerate body begin}{\setlength{\leftmargini}{0pt}}
\begin{document}
\begin{frame}
This is a text.
\begin{itemize}
\item This is an item.
\item This is another item
\begin{itemize}
\item with a subitem
\item and another subitem
\end{itemize}
\end{itemize}
\begin{alertblock}{Just A Block}
This is a text in a block.
\begin{itemize}
\item This is an item in a block.
\item Another item.
\end{itemize}
\end{alertblock}
\end{frame}
\end{document}
Best Answer
Does the following do what you want? My solution redefines the
alertblock
environment so that\leftmargini
be reset to its original value at the beginning of the environment; outside of analertblock
's scope,\leftmargini
reverts to its global value. You can of course adapt the method to other environments, if you want.