6

Given the following MWE:

\documentclass{beamer}

\begin{document}

\begin{frame}
\frametitle{Some title}
\setlength{\leftmargini}{0.5em}
\begin{columns}[c, onlytextwidth]%EVEN SPECIFYING THE c OPTION
    \begin{column}{.5\textwidth}%
        \setlength{\partopsep}{0pt}%AND EVEN REMOVING EXTRA itemize SPACE
        \begin{itemize}
        \itemsep 1.5em
            \item First item bla bla bla bla some more text
            \item second item bla bla bla bla some more text bla bla
            \item third item bla bla bla bla some more text bla bla bla bla bla bla
        \end{itemize}
    \end{column}%
    \begin{column}{.45\textwidth}
        \includegraphics[width=\textwidth, height=5.5cm]{example-image}
    \end{column}%
\end{columns}

\end{frame}

\end{document}

Is it me or the two columns do not align properly? It seems there are more space left on the top of the image (noted in red) than on the bottom (in black)... Note as well that I added the following line, as indicated here...

\setlength{\partopsep}{0pt}%

fig

Any idea?

7
+100

It seems itemize inserts some spacing above the environment, just as center does. A fix for the example you've provided is to put the figure in a center environment.

\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Some title}
\setlength{\leftmargini}{0.5em}
\begin{columns}[c, onlytextwidth]%EVEN SPECIFYING THE c OPTION
    \begin{column}{.5\textwidth}%
        \setlength{\partopsep}{0pt}%AND EVEN REMOVING EXTRA itemize SPACE
        \begin{itemize}
        \itemsep 1.5em
            \item First item bla bla bla bla some more text
            \item second item bla bla bla bla some more text bla bla
            \item third item bla bla bla bla some more text bla bla bla bla bla bla
        \end{itemize}
    \end{column}%
    \begin{column}{.45\textwidth}
    \begin{center}
        \includegraphics[width=\textwidth, height=5.5cm]{example-image}
    \end{center}
    \end{column}%
\end{columns}
\end{frame}
\end{document}

enter image description here

  • I was already embedding the images in "figure" environments to try, so I will give the bounty to your answer cause conceptually makes more sense to me. Thanks! – DaniCee Feb 5 '17 at 3:51
4

Here is the workflow:

  1. Insert \hrule at the places you want to investigate.

  1. Extra spaces gone! Great! Now replace \hrule by \hrule height0pt.

  1. Problem solved.

Explanation

\hrule is one of the simplest objects in TeX and it does not produce extra spaces. By inserting \hrule, it is easier to see the spaces. (For example, setting \partopsep to zero seems to make no change. But with \hrules you will see the difference.)

Sometimes \hrule absorbs unwanted spaces. In this case, just keep those \hrules and turn your attention to something more important.

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.