当我们在环境中更改字体系列时,方程式字体不会改变。这使得整个环境是异步的。 请告诉我如何在此环境中更改方程式的系列字体。提前谢谢。这是我的 MWE
\documentclass[12pt]{article}
\usepackage[utf8]{vietnam}
%\usepackage{cmbright}
\newenvironment{note}{\par\noindent\fontfamily{pag}\selectfont}{}
\begin{document}
\noindent Normal text heigth equals to equations text $ \sqrt{x^2+y^2}=z $.
\begin{note}
Normal text heigth does not equal to equations text $ \sqrt{x^2+y^2}=z $.
\end{note}
\end{document}
答案1
您可以使用以下mathastext
方式定义数学字体\MTDeclareVersion[it]{pag}{T1}{pag}{m}{n}
\documentclass[12pt]{article}
\usepackage[margin=2.8cm]{geometry}
\newenvironment{note}{%
\par\noindent\MTversion{pag}% changes both math font and text font as well
}{}
\usepackage[defaultmathsizes, subdued, italic, LGRgreek, symbolre, symbolmisc]{mathastext}
\MTDeclareVersion[it]{pag}{T1}{pag}{m}{n} % declares a font version
\begin{document}
\noindent Normal text height is equal to math text $ \sqrt{x^2+y^2}=z$.
\begin{note}
Normal text height is equal to math text inside \verb|note| as well $ \sqrt{x^2+y^2}=z$.
\end{note}
\end{document}
答案2
根据@Davislor先生的建议,我编辑了MWE。代码如下,与越南包配合良好。谢谢大家的帮助!
\documentclass[12pt]{article}
\usepackage[utf8]{vietnam}
\usepackage{sansmath}
\usepackage[margin=2.8cm]{geometry}
\newenvironment{note}{\par\noindent\usefont{T5}{cmbr}{m}{n}\begin{sansmath}\ignorespaces}{\end{sansmath}\ignorespacesafterend}
\begin{document}
\noindent Normal text heigth equals to equations text $ \sqrt{x^2+y^2}=z $.
\begin{note}
Nội dung tiếng Việt $ \sqrt{x^2+y^2}=z$.
\end{note}
\end{document}