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.

I would like a slide with two columns in which one column is text and the other is a tikz picture. The problem is that when I make one column a tikz picture, it does not allow the text to start at the top of the page but instead pushes the text below the level of the tikz picture. Any advice would be greatly appreciated. The source code that illustrates this is below:

\documentclass[10pt]{beamer}
\title{My title is quite short}
\author[My Team]{My Name}
\date{\today}
\usepackage{tikz}
\begin{document}
\begin{frame}[t]
\frametitle{My slide title -- What I want}
Both columns start from the top of the page, which is what I want.  I
just want one column to be a tikz drawing.
\begin{columns}[t]
\begin{column}{0.5\textwidth}
\begin{itemize}
\item A
\item A
\item A
\end{itemize}
\end{column}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item B
\item B
\item B
\end{itemize}
\end{column}
\end{columns}
\end{frame}
\begin{frame}[t]
\frametitle{My slide title -- Not what I want}
The text column begins vertically where the tikz picture ends.
\begin{columns}[t]
\begin{column}{0.5\textwidth}
\begin{itemize}
\item A
\item A
\item A
\end{itemize}
\end{column}
\begin{column}{0.5\textwidth}
\begin{tikzpicture}
\draw (0,0) circle (1cm);
\draw (0,-2) circle (1cm);
\end{tikzpicture}
\end{column}
\end{columns}
\end{frame}
\end{document}
share|improve this question
    
If you add [baseline] option to the TikZ picture you will get them aligned with the left column. But if you want to avoid the jumps of A's, then it's best to put an overlay area large enough to keep the contents of the right column at fixed heigth. –  percusse Aug 20 '12 at 20:26

3 Answers 3

You can use an a ppropriate value for the baseline option; for example current bounding box.north:

\documentclass[10pt]{beamer}
\usepackage{tikz}

\begin{document}

\begin{frame}[t]
\frametitle{My slide title -- What I want}
Both columns start from the top of the page, which is what I want.  I
just want one column to be a tikz drawing.
\begin{columns}[t]
\begin{column}{0.5\textwidth}
\begin{itemize}
\item A
\item A
\item A
\end{itemize}
\end{column}
\begin{column}{0.5\textwidth}
\begin{tikzpicture}[baseline=(current bounding box.north)]
\draw (0,0) circle (1cm);
\draw (0,-2) circle (1cm);
\end{tikzpicture}
\end{column}
\end{columns}
\end{frame}

\end{document}

enter image description here

share|improve this answer

beamer provides two top modes:

  • t will cause the first lines of the columns to be aligned. Default if global option t is used.

  • 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.

Here your example using T instead of t:

\begin{frame}[t]
  \frametitle{My slide title -- Not what I want}
  The text column begins vertically where the tikz picture ends.
   % T instead of t !!!
  \begin{columns}[T]
    \begin{column}{0.5\textwidth}
      \begin{itemize}
      \item A
      \item A
      \item A
      \end{itemize}
    \end{column}
    \begin{column}{0.5\textwidth}
      \begin{tikzpicture}
        \draw (0,0) circle (1cm);
        \draw (0,-2) circle (1cm);
      \end{tikzpicture}
    \end{column}
  \end{columns}
\end{frame}

enter image description here

share|improve this answer
    
What is the difference between them? –  Sigur Aug 21 '12 at 18:45
    
@Sigur It's better with explanation... See my edit. –  Paul Gaborit Aug 21 '12 at 19:31
    
then we could see the difference if the first lines have different heights. I guess that I understood. Thanks. –  Sigur Aug 21 '12 at 19:43

I have a partial solution. Load \usepackage{multicol} and then you can do:

\begin{multicols}{2}

\begin{itemize}
\item A
\item A
\item A
\vfill 
\end{itemize}

\begin{tikzpicture}
\draw (0,0) circle (1cm);
\draw (0,-2) circle (1cm);
\end{tikzpicture}

\end{multicols}
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.