如果我想突出显示以下框架中的某些单词:
\begin{frame}
\frametitle{Paragraphs of Text}
Sed iaculis dapibus gravida. Morbi sed tortor erat, nec interdum arcu. Sed id lorem lectus. Quisque viverra augue id sem ornare non aliquam nibh tristique. Aenean in ligula nisl. Nulla sed tellus ipsum. Donec vestibulum ligula non lorem vulputate fermentum accumsan neque mollis.\\~\\
Sed diam enim, sagittis nec condimentum sit amet, ullamcorper sit amet libero. Aliquam vel dui orci, a porta odio. Nullam id suscipit ipsum. Aenean lobortis commodo sem, ut commodo leo gravida vitae. Pellentesque vehicula ante iaculis arcu pretium rutrum eget sit amet purus. Integer ornare nulla quis neque ultrices lobortis. Vestibulum ultrices tincidunt libero, quis commodo erat ullamcorper id.
\end{frame}
我应该怎么办?
答案1
您可以使用它\alert{foo}
来突出显示文本的一小部分。对于较长的段落,alertenv
环境更合适(尽管\alert{}
在输入包含新段落的参数时不会抱怨);按如下方式使用它
\begin{alertenv}
foo and indeed bar
\end{alertenv}
数学家协会
\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Quite Some Text}
The following short text will be \alert{highlighted with \texttt{alert}}, while this is not.
\begin{alertenv}
We can highlight entire paragraphs with the \texttt{alertenv} environment.
See, that was a paragraph.
\end{alertenv}
Note though that \alert{\texttt{alert} does not complain when fed a paragraph.
See, a new paragraph.}
\end{frame}
\end{document}
产量