在投影仪框架中,我希望内容在框架上均匀分布。
使用选项 \documentclass[slidestop]{beamer} 我可以轻松地将内容指定为顶部/中心对齐,但是当幻灯片上只有几个项目符号时,它们会在顶部聚集在一起,我希望 beamer 自动确定它们之间的间距使它们均匀分布。
如果不通过反复试验来放置 vspace,这是否可能?
我认为使用 \vfill 会减少试错部分。每个项目符号之间的一个 \vfill 应该保证均匀的间距。在项目符号之前和/或之后尝试 \vfill 以与前面的文本或页面底部分开。我不使用也不知道 Beamer,但我怀疑有一种方法可以将 \vfill 命令放入 Beamer 模板中。
\documentclass{article}
\begin{document}
\begin{itemize}
\vfill\item This is text of first item
\vfill\item This is text of second item
\vfill\item This is text of third item
\end{itemize}
\end{document}
根据您的评论,这是您可以将 vfill 定义为在主列表项中自动使用但在子项中没有 vfill 的一种方法。这种方式让您可以使用相同的 \item 命令,无论您是在主列表中还是在嵌套列表中,但需要您定义或重新定义环境,并注意何时添加主(即 vfilled)列表当您添加一个非填充(即嵌套)列表时:
\documentclass{article}
\newenvironment{novfillenum}{\begin{enumerate}\let\item\olditem}%
{\end{enumerate}}
\newenvironment{vfilleditems}{\begin{itemize} \let\olditem\item \renewcommand\item{\vfill\olditem}}%
{\end{itemize}}
\begin{document}
\begin{vfilleditems}
\item Item One
\begin{novfillenum}
\item subitem1
\item s2
\item s3
\end{novfillenum}
\item Item Two
\begin{novfillenum}
\item subitem1
\item s2
\item s3
\end{novfillenum}
\item item three
\begin{novfillenum}
\item subitem1
\item s2
\item s3
\end{novfillenum}
\end{vfilleditems}
\end{document}
在此处添加另一个示例,因为第一个答案太拥挤了。测试了更改标签命令,你知道吗,它似乎有点工作。但是,它给出了错误,我确信这与将 \vfill 作为标签构造的一部分有关。我很惊讶它似乎确实创建了所需的输出,但是该方法需要一些调整才能使其正常工作而不会出现错误:
\begin{document}
\let\oldlabelitemi\labelitemi
\renewcommand{\labelitemi}{\vfill\oldlabelitemi{\hspace{1ex}}}
\begin{itemize}
\item Item One
\begin{itemize}
\item subone
\item subtwo
\item subthree
\end{itemize}
\item Item Two
\begin{itemize}
\item subitem1
\item s2
\item s3
\end{itemize}
\item item three
\begin{itemize}
\item subitem1
\item s2
\item s3
\end{itemize}
\end{itemize}
\end{document}