我正在使用没有指定字体大小的书籍文档类,所以它应该是默认的 10pt。
在 \begin{document} 之后,我有行 \fontsize{9}{10.8} 将所有字体更改为 9pt。
\documentclass{book}
\usepackage{bookman}
\usepackage{amsthm}
\newtheoremstyle{break}
%{\topsep}{\topsep}%
{8pt}
{8pt}
{}{}%
{\bfseries}{}%
{\newline}{}%
\theoremstyle{break}
\newtheorem{test}{Test}
\counterwithin*{test}{subsection}
\begin{document}
\fontsize{9}{10.8}
The quick brown fox jumps over the lazy dog. This font looks to be 9pt.
\begin{test}
This is the test. This seems to come out smaller.
\end{test}
\end{document}
标题“测试”和正文小于 \fontsize 中指定的 9pt。
这是多小的字体大小?我可以用 \fontsize 让整个文档以这种较小的字体大小输出吗?还是 \fontsize 导致这两种字体大小?
答案1
声明\fontsize{9}{10.8}
直到发布后才生效\selectfont
。这在定理中发生,但在上面的文本中没有发生。
\documentclass{book}
\usepackage{bookman}
\usepackage{amsthm}
\newtheoremstyle{break}
%{\topsep}{\topsep}%
{8pt}
{8pt}
{}{}%
{\bfseries}{}%
{\newline}{}%
\theoremstyle{break}
\newtheorem{test}{Test}
\counterwithin*{test}{subsection}
\begin{document}
\fontsize{9}{10.8}\selectfont
The quick brown fox jumps over the lazy dog. This font looks to be 9pt.
\begin{test}
This is the test. This seems to come out smaller.
\end{test}
\end{document}
另一方面,使用专门的类来实现这一点似乎更好。
\documentclass[9pt]{extbook}
\usepackage{bookman}
\usepackage{amsthm}
\newtheoremstyle{break}
%{\topsep}{\topsep}%
{8pt}
{8pt}
{}{}%
{\bfseries}{}%
{\newline}{}%
\theoremstyle{break}
\newtheorem{test}{Test}
\counterwithin*{test}{subsection}
\begin{document}
The quick brown fox jumps over the lazy dog. This font looks to be 9pt.
\begin{test}
This is the test. This seems to come out smaller.
\end{test}
\end{document}