
한 열은 텍스트이고 다른 열은 tikz 그림인 두 개의 열이 있는 슬라이드를 원합니다. 문제는 한 열을 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
제공한다두 가지 상위 모드:
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}