列内の tikz 画像が他の列の邪魔になる

列内の tikz 画像が他の列の邪魔になる

2 つの列があるスライドを作成したいのですが、1 つの列はテキストで、もう 1 つの列は tikz 画像です。問題は、1 つの列を tikz 画像にすると、テキストがページの上部から開始されず、テキストが tikz 画像のレベルより下に押し出されてしまうことです。アドバイスをいただければ幸いです。これを説明するソース コードは次のとおりです。

\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}

答え1

オプションには適切な値を使用できますbaseline。例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}

ここに画像の説明を入力してください

答え2

beamer提供する2つのトップモード:

  • t列の最初の行が揃えられます。グローバル オプションtが使用されている場合のデフォルトです。

  • Tは オプションに似ていますtが、T最初の行の上部を揃えるのに対し、t最初の行のいわゆるベースラインを揃えます。tオプションと組み合わせて奇妙なことが起こると思われる場合 (たとえば、オプションでグラフィックが「上がる」のではなく突然「下がる」場合t)、代わりにこのオプションを使用してみてください。

Tここでは、の代わりにを使用する例を示します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}

ここに画像の説明を入力してください

答え3

部分的な解決策があります。ロードして\usepackage{multicol}、次のようにします。

\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}

関連情報