2

How to left-align text into the second column?

\documentclass{beamer}

\begin{document}

\begin{frame}
\begin{columns}
\column{4.7cm}
\hspace{0.6cm}
\includegraphics[width=2.3cm,height=1.7cm]{images/t}
\column{\dimexpr\textwidth-4.7cm\relax}
\hspace*{-20pt}\parbox{\dimexpr\linewidth+20pt\relax}{%
\begin{itemize}
\item C.
\begin{itemize}
\item B.
\item A.
\end{itemize}
\end{itemize}
}
\end{columns}
\end{center}
\end{frame}

\end{document}

I've tried to surround the content of the second column using this \begin{flushleft}...\end{flushleft}. But nothing has changed.

Thanks!

  • The text in the second column is a list. Do you want the items to be flush-left with the column boundary? Or do you want the list to be right next to the image, but still indented the way a list is supposed to be? – Werner May 15 '14 at 16:17
  • I want the list to be left next to the image, but still indented the way a list without changing the use of columns. – dgs May 15 '14 at 16:19
2

The \column command (or column environment) takes a mandatory argument specifying the width of the column. You've specified 4.7cm, yet the contents of the column is only 2.9cm (plus some spurious space) wide. So you're left with 1.8cm on the right of the image (at most). If you want the contents of the second column to be flush with the image, I'd suggest

  1. making the first column less wide,
  2. boxing the list content in the second column, and
  3. moving the boxed list left using an \hspace*.

The above suggestions are incorporated in the following MWE:

enter image description here

\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/q/58087/5764
\begin{document}

\begin{frame}
  \begin{columns}
    \begin{column}{2.9cm}
      \hspace*{0.6cm}%
      \includegraphics[width=2.3cm,height=1.7cm]{example-image}%
    \end{column}
    \begin{column}{\dimexpr\textwidth-2.9cm\relax}
      \hspace*{-25pt}\parbox{\linewidth}{%
        \begin{itemize}
          \item C.
          \begin{itemize}
            \item B.
            \item A.
          \end{itemize}
        \end{itemize}
      }
    \end{column}
  \end{columns}
\end{frame}

\end{document}

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.