2

I need to put a quote between itemize items in a beamer frame. If I stop and restart itemize around the quote the result's not indented at all:

\documentclass{beamer}

\usetheme{CambridgeUS}
\usefonttheme{serif}
\setbeamerfont{quote}{shape=\upshape,family=\rmfamily}

\beamerdefaultoverlayspecification{<+->}

\begin{document}

\begin{frame}{Frame}

\begin{itemize}

\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. 

\end{itemize}

\begin{quote}Sed vitae purus facilisis, blandit odio eget, tincidunt nisi. Aliquam pulvinar, ipsum ac aliquet facilisis, neque quam tincidunt lacus, at eleifend ante lorem quis neque. Suspendisse potenti. \end{quote}

\begin{itemize}

\item Nulla vel bibendum ligula. Sed imperdiet felis lacus, a vulputate urna egestas at.

\end{itemize}

\end{frame}

\end{document}

But if I don't restart the quote is indented too much:

\documentclass{beamer}

\usetheme{CambridgeUS} \usefonttheme{serif} \setbeamerfont{quote}{shape=\upshape,family=\rmfamily}

\beamerdefaultoverlayspecification{<+->}

\begin{document}

\begin{frame}{Frame}

\begin{itemize}

\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. \smallskip{}

\begin{quote}Sed vitae purus facilisis, blandit odio eget, tincidunt nisi. Aliquam pulvinar, ipsum ac aliquet facilisis, neque quam tincidunt lacus, at eleifend ante lorem quis neque. Suspendisse potenti. \end{quote}

\item Nulla vel bibendum ligula. Sed imperdiet felis lacus, a vulputate urna egestas at.

\end{itemize}

\end{frame}

\end{document}

I'm guessing that I will have to redefine the quote environment from beamerbaselocalstructure.sty. How would that go? It's probably in the beamer user guide, but I couldn't find it.

3

Use changepage's adjustwidth environment to adjust the margins around your quote:

enter image description here

\documentclass{beamer}

\let\Tiny\tiny% http://tex.stackexchange.com/a/94159/5764

\usepackage{changepage}

\usetheme{CambridgeUS}
\usefonttheme{serif}
\setbeamerfont{quote}{shape=\upshape,family=\rmfamily}

\beamerdefaultoverlayspecification{<+->}

\begin{document}

\begin{frame}{Frame}

\begin{itemize}

\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. \smallskip{}

\begin{quote}
Sed vitae purus facilisis, blandit odio eget, tincidunt nisi. Aliquam pulvinar, ipsum ac aliquet facilisis, neque quam tincidunt lacus, at eleifend ante lorem quis neque. Suspendisse potenti.
\end{quote}

\begin{adjustwidth}{1em}{1em}
Sed vitae purus facilisis, blandit odio eget, tincidunt nisi. Aliquam pulvinar, ipsum ac aliquet facilisis, neque quam tincidunt lacus, at eleifend ante lorem quis neque. Suspendisse potenti.
\end{adjustwidth}

\item Nulla vel bibendum ligula. Sed imperdiet felis lacus, a vulputate urna egestas at.

\end{itemize}

\end{frame}

\end{document}

You can perform a complete replacement of the quote environment with that of an adjustwidth one using (say)

\renewenvironment{quote}[1][1em]
  {\begin{adjustwidth}{#1}{#1}}
  {\end{adjustwidth}}

The above redefinition provides

\begin{quote}[<margin>]
  <quote>
\end{quote}

with an optional <margin> argument that are used for the left and right margin adjustments.

  • This works great, but has to be done for every occurrence of quote. Is it possible to make the change for all quotes in a Beamer file? – ss1789 Jan 8 '17 at 2:07
  • @ss1789: See the updated answer. – Werner Jan 8 '17 at 3:45

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.