Latex:文本应自动填充Beamer幻灯片中的框架

the*_*ark 4 latex beamer

在投影仪框架中,我希望内容在框架上均匀分布.

使用option\documentclass [slidestop] {beamer}我可以很容易地指定内容为顶部/中心对齐但是当我在幻灯片上只有几个子弹时它们在顶部聚集在一起,我希望beamer自动决定它们之间的间距均匀地涂抹它们.

如果不通过反复试验来设置vspace,这是否可行?

Her*_*itz 7

我认为使用\ 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}
Run Code Online (Sandbox Code Playgroud)

根据您的评论,这里有一种方法可以定义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}
Run Code Online (Sandbox Code Playgroud)