8

Consider the following beamer frame

\begin{frame}
\frametitle{Foo Bar}
\includegraphics[scale=0.18]{figures/Fig1.pdf}
\includegraphics[scale=0.18]{figures/Fig2.pdf}
\end{frame}

Currently, they are laid out exactly as I want them, with Fig1 on the left, and Fig2 on the right.

I want to add a vertical line right in between them, without modifying the positions of the figures at all.

I tried adding the following in between the two includegraphics lines, but it blew away the positions of both figures.

\rule{1 pt}{300 pt}

What is the simplest way to achieve the desired effect?

1 Answer 1

14

You can use \vrule.

Here's an example with fake images, replace them with yours.

\documentclass{beamer}
\usepackage{graphicx}
\begin{document}
\begin{frame}
\frametitle{Foo Bar}
\includegraphics[scale=0.18]{example-image-a}
\hspace{5pt}\vrule\hspace{5pt}%
\includegraphics[scale=0.18]{example-image-b}
\end{frame}
\end{document} 

Output

enter image description here

If you want to change the thickness of the rule, use something like

\vrule width 1pt

instead of simply \vrule.

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .