itemize 环境中混合字体大小的行距

itemize 环境中混合字体大小的行距

我想将脚注大小的文本与正常大小的文本混合在一起beamer。问题是当我使用时\footnotesize行距仍然与\normalsize间距相对应。这是一个演示该问题的最小示例文档:

\documentclass{beamer}
\begin{document}
\begin{frame}{Line spacing for footnote-sized text in itemize environment}
Problem: footnote-sized text still has normal-sized line spacing.
    \begin{itemize}
    \item The problem is below:\\    
 \footnotesize This is some footnote-sized text. When it wraps around it still has normal-sized line spacing.
 \normalsize
    \item Some other items for comparison
    \item I would like the footnote-sized text to have single spacing relative to the footnote size. 
    \end{itemize}
\end{frame}
\end{document}

我希望使用脚注大小的文本来写括号注释,以便在视觉上将它们与列表中的主要项目区分开来。

答案1

\documentclass{beamer}
\begin{document}
\begin{frame}{Line spacing for footnote-sized text in itemize environment}
Problem: footnote-sized text still has normal-sized line spacing.
    \begin{itemize}
    \item The problem is below:

    {\footnotesize This is some footnote-sized text.
When it wraps around it still has normal-sized line spacing.\par}

    \item Some other items for comparison
    \item I would like the footnote-sized text to have single spacing relative to the footnote size.
    \end{itemize}

    {\footnotesize This is some footnote-sized text.
When it wraps around it still has normal-sized line spacing.\par}

\end{frame}
\end{document}

当发出字体大小改变命令时,\par应在文本结束前使用(或空行)。

答案2

我做了一些小改动,但并不满意,但可以分享我的发现。我尝试了以下方法:

\item The problem is below:\\
\begin{spacing}{0}
\footnotesize This is some footnote-sized text. When it wraps around it
still has normal-sized line spacing.
\end{spacing}

这没问题。我以为我只需要摆弄间距环境的数字参数,但大于 0 似乎只会让 footnotesize 段落的紧凑行间距保持不变,同时增加该行与下一个项目之间的间隙。它看起来“不对劲”。我还尝试了以下方法:

\item The problem is below:\\
\linespread{-0.2}
\footnotesize This is some footnote-sized text. When it wraps around it
still has normal-sized line spacing.

这会减少间距,并且可以摆弄数字,但它似乎不想采用连续的参数;一旦设置了线扩展,它就不想将后续项目设置回 1。

很抱歉没能提供更多帮助。我主要在这里挖掘:

更新 1/6 如果斜体可以的话,这对我来说看起来很有利?

\item The problem is below:\\    
\footnotesize \begin{quote}This is some footnote-sized text. 
When it wraps around it still has normal-sized line spacing.\end{quote}

由于某种原因,该quote环境似乎消除了间距问题,并且在我看来,这些行看起来被压缩了。你怎么看?我试图找出如何定义引号环境以删除斜体或缩进,但到目前为止没有成功。

答案3

quote您可以通过在环境中添加来撤消斜体\em。(常规类型是斜体的强调。)要将quote环境更改为全局使用常规类型,请使用\setbeamerfont{quote}{shape=\sf}

相关内容