我有以下 MWE 并且我想将两列顶部对齐,我这样做:
\documentclass{beamer}
\usepackage{multicol}
\usepackage{enumitem}
\setitemize{label=\usebeamerfont*{itemize item}%
\usebeamercolor[fg]{itemize item}
\usebeamertemplate{itemize item}}
\begin{document}
\begin{frame}
\frametitle{Some title}
\begin{columns}
\begin{column}[T]{.475\textwidth}
\begin{itemize}[leftmargin=2.25em]
\itemsep 1.25em
\item first item bla bla bla bla some more text bla bla and more and more text here
\item second item bla bla bla bla some more text bla bla
\item third item bla bla bla bla some more text bla
\end{itemize}
\end{column}%
\hfill%
\begin{column}[T]{.5\textwidth}
\includegraphics[width=\linewidth, height=5cm]{example-image}
\end{column}%
\end{columns}
\bigskip
\begin{itemize}[leftmargin=*]
\item And yet another item here with some long long long long long long text and some more text bla bla bla
\end{itemize}
\end{frame}
\end{document}
这让我明白了:
我根本没看到顶部对齐发生...我做错了什么?谢谢!
答案1
正如您在评论中已经知道的那样:没有必要
multicols
与 beamer 一起使用——它有自己的column
环境。enumitem
与 配合不好beamer
。据我所知,您只是用它来控制项目的左边距,而这可以通过\leftmargini
\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Some title}
\setlength{\leftmargini}{0.5em}
\begin{columns}
\begin{column}[T, onlytextwidth]{.45\textwidth}%
\setlength{\partopsep}{0pt}%
\begin{itemize}
\itemsep 1.5em
\item First item bla bla bla bla some more text bla bla and more and more text here
\item second item bla bla bla bla some more text bla bla
\item third item bla bla bla bla some more text bla
\end{itemize}
\end{column}%
\begin{column}[T]{.45\textwidth}
\includegraphics[width=\textwidth, height=5cm]{example-image}
\end{column}%
\end{columns}
\begin{itemize}
\item And yet another item here with some long long long long long long text and some more text bla bla bla
\end{itemize}
\end{frame}
\end{document}
答案2
作为伊格纳西他在上面的评论中指出,enumitem
并不总是与 Beamer 兼容。看看以下粗鲁的解决方案是否 enumitem
适合您:
\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Some title}
\hrule\bigskip% only for test purpose, delete in real document
\begin{columns}[onlytextwidth]
\begin{column}[T]{.48\textwidth}\vspace*{-1ex}
\begin{itemize}
\itemsep 1.25em
\item first item bla bla bla bla some more text bla bla and more and more text here
\item second item bla bla bla bla some more text bla bla
\item third item bla bla bla bla some more text bla
\end{itemize}
\end{column}%
\begin{column}[T]{.48\textwidth}
\includegraphics[width=\linewidth, height=5cm]{example-image}
\end{column}%
\end{columns}
\bigskip
\begin{itemize}
\item And yet another item here with some long long long long long long text and some more text bla bla bla
\end{itemize}
\end{frame}
\end{document}