我在演示文稿中总是使用 t 选项:
\documentclass[t]{beamer}
如果尝试在一个框架中按压太多内容,我观察到第一行会“跳”上一毫米左右,并且文本会被压缩。有没有办法通过冻结第一行的位置然后让 LaTeX 压缩第一行以下的内容来避免跳转?示例:
\documentclass[t]{beamer}
\begin{document}
\begin{frame}{Hello}
\begin{itemize}
\item Is it me you're looking for?
\end{itemize}
\end{frame}
\begin{frame}[t]{Hello}
\begin{itemize}
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\end{itemize}
\end{frame}
\begin{frame}[t]{Hello}
\begin{itemize}
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item Is it me you're looking for?
\item is it me you're looking for?
\end{itemize}
\end{frame}
\end{document}
此代码在第三张幻灯片的第一行产生了一个小的跳跃。
编辑 v1:我能够使用以下方法使文本行和项目列从同一位置开始:
\usepackage{enumitem}
\begin{frame}[t]\frametitle{Hello}
\begin{itemize}[topsep = 0pt, partopsep = 0pt]
\item Is it me you`re looking for?
\end{itemize}
\end{frame}
尝试使用:
\setlength{\topsep}{0pt}
\setlength{\partopsep}{0pt}
使用常规 itemize,但不起作用。不知道为什么?
编辑 v2:最终让它在不导入包的情况下工作。此行在相同位置启动 itemize 和普通文本:\mbox{}\vspace{-\topsep}\vspace{-\partopsep}\vspace{-\parsep}%
例子:
\begin{frame}
Yo banana boy
\end{frame}
\begin{frame}
\mbox{}\vspace{-\topsep}\vspace{-\partopsep}\vspace{-\parsep}%
\begin{itemize}
\item First item should line up with first line on previous page
\item $\cdots$
\end{itemize}
\end{frame}
\begin{frame}
\begin{itemize}
\item First item does not line up with first line on previous page
\item $\cdots$
\end{itemize}
\end{frame}
答案1
这与 BEAMER 无关。
一些 LaTeX 环境喜欢itemize
在环境前后添加垂直空格。在大多数情况下,它们是可拉伸和收缩的,以实现灵活性。
为了解决这个问题,您可以
- 通过环境来控制空间环境。
- 添加
\vss
在框架中无限地可收缩空间,因此它将禁用其他可收缩空间。