我正在处理一些有大量校样的笔记。我想减小校样的字体大小,同时保持其余文本的大小不变。
以下是通过手动更改每个校样中的字体大小来实现此目的的一些代码。但文档中有许多校样;我正在寻找一种方法,可以将此更改应用于所有校样,而不必手动更改每个校样中的大小。
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
This is my theorem.
\end{theorem}
\footnotesize
\begin{proof}
Here is a small proof.
\end{proof}
\normalsize
\begin{theorem}
This is a second theorem.
\end{theorem}
\footnotesize
\begin{proof}
And another proof.
\end{proof}
\end{document}
答案1
欢迎!\AtBeginEnvironment
在序言中使用:
\documentclass{article}
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}
\AtBeginEnvironment{proof}{\footnotesize}
\begin{document}
\begin{theorem}
This is my theorem.
\end{theorem}
\begin{proof}
Here is a small proof.
\end{proof}
\begin{theorem}
This is a second theorem.
\end{theorem}
\begin{proof}
And another proof.
\end{proof}
\end{document}