[Tex/LaTex] How to put a vertical rule between Beamer columns created with the \column command

beamermacrosrules

Note: This question is different from https://tex.stackexchange.com/a/95188/18588 because that question works with the column environment but this one is about the \column command.

My code:

\documentclass{beamer}
\begin{document}

\begin{frame}
\frametitle{Lorem Ipsum}
\begin{columns}[t]
  \column{.5\textwidth}
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
  eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
  ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
  aliquip ex ea commodo consequat.

  \column{.5\textwidth}
  Duis aute irure dolor in reprehenderit in voluptate velit esse
  cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
  cupidatat non proident, sunt in culpa qui officia deserunt mollit
  anim id est laborum.
\end{columns}
\end{frame}

\end{document}

This creates a slide with two columns. I want to now put a divider line between the two columns. I have seen this answer at https://tex.stackexchange.com/a/95188/18588 already and that works fine with \begin{column} and \end{column}. How can I make it work with the \column command only?

Best Answer

Here is a workaround I have arrived at:

\documentclass{beamer}
\begin{document}

\begin{frame}
\frametitle{Lorem Ipsum}
\begin{columns}[T]
  \column{.49\textwidth}
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
  eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
  ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
  aliquip ex ea commodo consequat.

  \column{.01\textwidth}
  \rule{.1mm}{.7\textheight}

  \column{.49\textwidth}
  Duis aute irure dolor in reprehenderit in voluptate velit esse
  cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
  cupidatat non proident, sunt in culpa qui officia deserunt mollit
  anim id est laborum.
\end{columns}
\end{frame}

\end{document}

Here is the output:

Screenshot of the output

Here are the changes done to the original code provided in the question:

  • The option t for the columns environment has been changed to T. Here is a description of this option from the Beamer User Guide (Section 12.7: Splitting a Frame into Multiple Columns):

    T is similar to the t option, but T aligns the tops of the first lines while t aligns the so-called baselines of the first lines. If strange things seem to happen in conjunction with the t option (for example if a graphic suddenly “drops down” with the t option instead of “going up,”), try using this option instead.

  • The width of the two columns containing text has been reduced from .5\textwidth to .49\textwidth to make space for a new column of width .01\textwidth. This new column is placed in between the two existing columns of text. This new column would contain the vertical rule.

  • A vertical rule has been added in the new column with the \rule command. Here is a description of the \rule command from The Not So Short Introduction to LATEX 2ε (Section 6.7: Rules):

    A few pages back you may have noticed the command

    \rule[lift]{width}{height}
    

    In normal use it produces a simple black box.

    \rule{3mm}{.1pt}%
    \rule[-1mm]{5mm}{1cm}%
    \rule{3mm}{.1pt}%
    \rule[1mm]{1cm}{5mm}%
    \rule{3mm}{.1pt}
    

    Screenshot of figure in Section 6.7 of lshort.pdf

    This is useful for drawing vertical and horizontal lines. The line on the title page, for example, has been created with a \rule command.