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.

How can I get the indentation to be the same for normal itemize and itemize in columns? Like in the example code below, the itemize in a column is less indented.

\documentclass{beamer}

\begin{document}

\frame {
  \begin{itemize}
    \item foo
    \item bar
    \item baz
  \end{itemize}
}

\frame {
  \begin{columns}
    \column{.5\textwidth}
      \begin{itemize}
        \item foo
        \item bar
        \item baz
      \end{itemize}
    \column{.5\textwidth}
      A picture
  \end{columns}
}

\end{document}

code preview

Is there a simple solution?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

The problem lies indeed in the fact that 0.5\textwidth + \beamer@rightmargin + \beamer@leftmargin + 0.5\textwidth > \textwidth...

You can either set those margins to 0, as pointed by Peter (but that will cause the columns to glued together, which is not always want you want), or you can use smaller columns.

See the following question for a very similar problem : margins in beamer columns

In your case, the following "magic number" .455 should be working approximately (at least for this MWE...)

\documentclass{beamer}

\begin{document}

\frame{
  \begin{itemize}
    \item foo     
    \item \rule{\linewidth}{1mm}
    \item baz
  \end{itemize}
    \rule{\linewidth}{1mm}
  \begin{columns}
    \column{.455\textwidth}
      \begin{itemize}
        \item foo
        \item \rule{\linewidth}{1mm}
        \item baz
      \end{itemize}
      \rule{\linewidth}{1mm}
    \column{.455\textwidth}
      \begin{itemize}
        \item foo
        \item \rule{\linewidth}{1mm}
        \item baz
      \end{itemize}
        \rule{\linewidth}{1mm}
  \end{columns}
}

\end{document}
share|improve this answer

Not sure if there is an official way to do this, but adding the following to the preamble fixes the alignment it for me:

\makeatletter
\setlength{\beamer@rightmargin}{0em}
\setlength{\beamer@leftmargin}{0em}
\makeatother

To limit the effect of this it is best to only use this where needed. Below I defined a command \AdjustMargins which needs to be executed at the beginning of the \frame so that those changes are only to that frame.

\documentclass{beamer}

\makeatletter
\newcommand*{\AdjustMargins}{%
    \setlength{\beamer@rightmargin}{0em}%
    \setlength{\beamer@leftmargin}{0em}%
}
\makeatother

\begin{document}
\frame {
  \begin{itemize}
    \item foo
    \item bar
    \item baz
  \end{itemize}
}

\frame {\AdjustMargins% Ensure changes are local
  \begin{columns}[r]
    \column{.5\textwidth}
      \begin{itemize}
        \item foo
        \item bar
        \item baz
      \end{itemize}
    \column{.5\textwidth}
      A picture
  \end{columns}
}
\end{document}
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.