我嘗試在beamer
演示文稿中製作兩欄,但顯然itemize
.由於某種我不明白的原因,列的起始高度不同。
這是代碼:
\documentclass[%
hyperref={colorlinks=true,urlcolor=blue},%
t,%
aspectratio=169%
]{beamer}
\begin{document}
\begin{frame}
\frametitle{Introduction}
\fbox{\begin{minipage}[t]{.5\textwidth}
\begin{itemize}
\item hallo
\end{itemize}
\end{minipage}}%
\fbox{\begin{minipage}[t]{.5\textwidth}
hallo
\end{minipage}}
\end{frame}
\end{document}
和結果
那麼問題是我要如何迫使他們在同一高度開始呢?
答案1
快速修復;使用T
選項代替minipage
。
\documentclass[%
hyperref={colorlinks=true,urlcolor=blue},%
t,%
aspectratio=169%
]{beamer}
\begin{document}
\begin{frame}
\frametitle{Introduction}
\fbox{\begin{minipage}[T]{.5\textwidth}
\begin{itemize}
\item hallo
\end{itemize}
\end{minipage}}%
\fbox{\begin{minipage}[T]{.5\textwidth}
hallo
\end{minipage}}
\end{frame}
\end{document}
編輯:
投影機解決方案正在使用中columns
:
\documentclass[%
hyperref={colorlinks=true,urlcolor=blue},%
t,%
aspectratio=169%
]{beamer}
\begin{document}
\begin{frame}{Introduction}
\begin{columns}
\begin{column}[T]{0.5\textwidth}
\fbox{\begin{minipage}{\textwidth}%
\begin{itemize}
\item hallo
\item hallo
\end{itemize}
\end{minipage}}%
\end{column}
\begin{column}[T]{0.5\textwidth}
\fbox{\begin{minipage}{\textwidth}
hallo
\end{minipage}}
\end{column}
\end{columns}
\end{frame}
\end{document}
答案2
和tabularx
小的手動調整?
\documentclass[ hyperref={colorlinks=true,urlcolor=blue},%
t,%
aspectratio=169%
]{beamer}
\usepackage{tabularx}
\makeatletter
\newcommand*{\compress}{\@minipagetrue}
\makeatother
\newcolumntype{I}{ >{\compress\itemize}X<{\enditemize}}
\begin{document}
\begin{frame}
\frametitle{Introduction}
\begin{tabularx}{\linewidth}{|I|X|}
\hline
\item hallo
\item hallo
& \vspace*{-2pt}
hallo \\
\hline
\end{tabularx}
\end{frame}
\end{document}