MAA 填充模板字体样式问题

MAA 填充模板字体样式问题

我正在使用美国数学协会的“填充模板”写一些东西。但它不能正常工作 - 我无法将文本设为斜体或粗体。 和 都\it不起作用\textit

可能存在什么问题?

%MSC Primary: XXXXX
\documentclass{article}
\usepackage{maa-monthly}% https://www.maa.org/sites/default/files/pdf/pubs/maa-monthly.sty



\raggedbottom
%\flushbottom
%\final

%\setcounter{annual}{XXXX}
%\setcounter{volume}{XXX}
%\setcounter{issue}{X}
%\setcounter{page}{XXX}

\allowdisplaybreaks

%\theoremstyle{theorem}
%\newtheorem{theorem}{Theorem}[section]

\theoremstyle{plain}
\newtheorem*{theorem}{Theorem}


\begin{document}
\begin{filler}
[white]

\noindent {\large \bf \textsf{A Consequence of the Pythagorean Theorem}}\\


\noindent The well known Pythagorean theorem $a^2 + b^2 = c^2$ relates the lengths of the three sides of a right triangle. We present an exciting consequence of this result, namely, that if two of the three sides of a right triangle have lengths that are even integers, then the third side must be of even length as well. 

To see this, suppose that $a$ and $b$ are even; then $a = 2a'$, $b = 2b'$, where $a'$ and $b'$ are positive integers.  Hence
\[   c^2 = (2a')^2 + (2b')^2  = 4(a'^2 + b'^2).     \]
The result when the hypotenuse and one of the legs are of even length is proved similarly.

\begin{thebibliography}{1}
\bibitem{Ing} Ingham, A. E. (1932). \textit{The Distribution of Prime Numbers}. Cambridge: Cambridge University Press.
\end{thebibliography}


\rightline{---Submitted by Carl F.\ Gauss}


\bigskip
\footnoterule
\footnotesize{doi.org/10.XXXX/amer.math.monthly.122.XX.XXX}

\footnotesize{MSC: Primary 00X00, Secondary 11Y11; 22Z22}

\end{filler}

\end{document}

答案1

您在文中没有提到它,但我根据您的标记推测您使用了 xelatex。

您正在使用的软件包非常旧,并且没有为 xelatex 设置,如果您尝试,您会收到有关字体的多个警告,并且输出是

在此处输入图片描述

如果你使用 pdflatex 那么输出是

在此处输入图片描述

但请注意,使用的标记非常奇怪,,,\bf不应在乳胶中使用,并且永远不应在段落末尾使用,否则会产生警告\noindent\rightline\\

 Underfull \hbox (badness 10000) in paragraph at lines 28--29

和糟糕的输出。

答案2

如果您想使用 XeLaTeX 编译它,那么您应该声明合适的字体。

\documentclass{article}
\usepackage{maa-monthly}% https://www.maa.org/sites/default/files/pdf/pubs/maa-monthly.sty

\usepackage{unicode-math}
\setmainfont{STIX Two Text}
\setmathfont{STIX Two Math}
\setsansfont{TeX Gyre Heros}


\raggedbottom
%\flushbottom
%\final

%\setcounter{annual}{XXXX}
%\setcounter{volume}{XXX}
%\setcounter{issue}{X}
%\setcounter{page}{XXX}

\allowdisplaybreaks

%\theoremstyle{theorem}
%\newtheorem{theorem}{Theorem}[section]

\theoremstyle{plain}
\newtheorem*{theorem}{Theorem}


\begin{document}
\begin{filler}
[white]

\noindent {\large \bfseries \textsf{A Consequence of the Pythagorean Theorem}}

\bigskip

\noindent The well known Pythagorean theorem $a^2 + b^2 = c^2$ relates the lengths 
of the three sides of a right triangle. We present an exciting consequence of this 
result, namely, that if two of the three sides of a right triangle have lengths 
that are even integers, then the third side must be of even length as well. 

To see this, suppose that $a$ and $b$ are even; then $a = 2a'$, $b = 2b'$, where 
$a'$ and $b'$ are positive integers.  Hence
\[   c^2 = (2a')^2 + (2b')^2  = 4(a'^2 + b'^2).     \]
The result when the hypotenuse and one of the legs are of even length is proved similarly.

\begin{thebibliography}{1}
\bibitem{Ing} Ingham, A. E. (1932). \textit{The Distribution of Prime Numbers}. 
Cambridge: Cambridge University Press.
\end{thebibliography}


\rightline{---Submitted by Carl F.\ Gauss}


\bigskip
\footnoterule
\footnotesize{doi.org/10.XXXX/amer.math.monthly.122.XX.XXX}

\footnotesize{MSC: Primary 00X00, Secondary 11Y11; 22Z22}

\end{filler}

\end{document}

如果系统中没有安装字体,则可以进行声明(使用最新的 TeX Live 或 MiKTeX 发行版)

\setmainfont{STIXTwoText}[
  Extension=.otf,
  UprightFont=*-Regular,
  BoldFont=*-Bold,
  ItalicFont=*-Italic,
  BoldItalicFont=*-BoldItalic,
]
\setmathfont{STIXTwoMath-Regular.otf}
\setsansfont{texgyreheros}[
  Extension=.otf,
  UprightFont=*-regular,
  BoldFont=*-bold,
  ItalicFont=*-italic,
  BoldItalicFont=*-bolditalic,
]

在此处输入图片描述

相关内容