Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I`m trying to make an itemized list, where only one of the items has an image to the right. I tried this

\documentclass{beamer}
\usetheme{Dresden}
\begin{document}
\begin{frame}{Problem}
  \begin{itemize}
     \item 
     \begin{columns}
        \column{.7\linewidth}
        Here I want some text with an image to the right, all in the same item
        \column{.3\linewidth}
        \rule{.2\linewidth}{.2\linewidth}
     \end{columns}
     \item Some more text here that is long enough to continue bellow the image
 \end{itemize}
\end{frame}
\end{document}

But this is what I get instead

columns not inside item

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You can use columns only for first item and close it before the second item.

Next code shows the solution. I has a little problem, columns don't use the complete \linewidth, first one is .65\linewidth and second .25\linewidth in order to align first and second item symbols. I think I've read something about this problem somewhere but I don't remember where now. If I find it I'll explain the solution.

\documentclass{beamer}
\usetheme{Dresden}
\begin{document}
\begin{frame}{Solution}
\begin{columns}
\column{.65\linewidth}
\begin{itemize}
\item Here I want some text with an image to the right, all in the same item
\end{itemize}
\column{.25\linewidth}
\rule{.2\linewidth}{.2\linewidth}
\end{columns}
\begin{itemize}
\item Some more text here that is long enough to continue bellow the image
\end{itemize}
\end{frame}
\end{document}

enter image description here

Update

The reference I was looking for is provide more usable columns environment, an issue discussion in beamer's bitbucket place.

My conclusion is: it's safer to use totalwidth option to columns environment if you want to avoid problems with intercolumns spaces and margins. And more important: don't confuse \linewidth with \textwidth as I did in previous example.

\documentclass{beamer}
\usetheme{Dresden}
\begin{document}
\begin{frame}{Solution}
\begin{columns}[onlytextwidth] %<---
\column{.7\textwidth} %<---
\begin{itemize}
\item Here I want some text with an image to the right, all in the same item
\end{itemize}
\column{.3\textwidth} %<---
\rule{.2\linewidth}{.2\linewidth}
\end{columns}
\begin{itemize}
\item Some more text here that is long enough to continue bellow the image
\end{itemize}
\end{frame}
\end{document}
share|improve this answer

You can do this with minipages too:

\documentclass{beamer}
\usetheme{Dresden}
\begin{document}
\begin{frame}{Problem}
  \begin{itemize}
     \item
     \begin{minipage}[t]{0.7\linewidth}
        Here I want some text with an image to the right, all in the same item
     \end{minipage}%
     \begin{minipage}{.3\linewidth}
        \centering
        \rule{.2\linewidth}{.2\linewidth}
     \end{minipage}
     \item Some more text here that is long enough to continue bellow the image
 \end{itemize}
\end{frame}
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.