我正在使用美国数学协会的“填充模板”写一些东西。但它不能正常工作 - 我无法将文本设为斜体或粗体。 和 都\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
答案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,
]