我正在进行投影仪演示,我想在定理环境中更改文本的格式。
定理中的文本默认情况下以\textit{}
或\textsl{}
格式设置,但是我希望将其设置为“正常”格式,即我想将格式更改为“纯文本”。我该怎么办?
根据上一个问题的答案,您可以在定理块的定义中添加\normalfont
:
\documentclass{beamer}
\usetheme{Aalborg}
\uselanguage{danish}
\languagepath{danish}
\deftranslation[to=danish]{Theorem}{Saetning}
\makeatletter
\setbeamertemplate{theorem begin}{%
\setbeamercolor{block title}{bg=cyan!100!white}%
\setbeamercolor{itemize item}{fg=cyan!100!white}%
\setbeamercolor{itemize subitem}{fg=cyan!100!white}%
\setbeamercolor{itemize subsubitem}{fg=cyan!100!white}%
\setbeamercolor{enumerate item}{fg=cyan!100!black}%
\setbeamercolor{enumerate subitem}{fg=cyan!100!black}%
\setbeamercolor{enumerate subsubitem}{fg=cyan!100!black}%
\begin{\inserttheoremblockenv}
{%
\inserttheoremname
\inserttheoremnumber
\ifx\inserttheoremaddition\@empty\else\ \inserttheoremaddition\fi%
}%
\normalfont%
}
\setbeamertemplate{theorem end}{%
\end{\inserttheoremblockenv}%
}
\makeatother
\begin{document}
\begin{frame}
\begin{theorem}[Pythagoras]
text
$a^2+b^2=c^2$
\begin{itemize}
\item test
\end{itemize}
\label{pytagoras}
\end{theorem}
Theorem \ref{pytagoras}
\begin{block}{Title Pythagoras}
content...
\begin{itemize}
\item test
\end{itemize}
\end{block}
\end{frame}
\end{document}