仅增加数学字体大小

仅增加数学字体大小

我的代码是:

\documentclass[10pt]{book}
\usepackage[no-math]{fontspec}%

\setmainfont[Path = ./Fonts/ ,
UprightFont= TimesNewRomPSPro.otf,
BoldFont= TimesNewRomPSPro-Bol.otf,
ItalicFont= TimesNewRomPSPro-Ita.otf,
BoldItalicFont= TimesNewRomPSPro-BolIta.otf,
]{TimesNewRomPSPro}%
\setsansfont[Path = ./Fonts/ ,
UprightFont= ArialMTPro-Regular.otf,
BoldFont= ArialMTPro-Bold.otf,
ItalicFont= ArialMTPro-Italic.otf,
BoldItalicFont= ArialMTPro-BoldItalic.otf,
]{ArialMTPro}%
\usepackage[]{newtxmath} %
\usepackage{mathspec}

\begin{document}

\makeatletter
\newenvironment{sanstext}{\bgroup%
\mathversion{normal}%
\everymath{\normalsize}%
\sffamily\def\listfont{\fontsize{9.5}{13}\selectfont}%
\fontsize{9.5}{13}\selectfont%
}{\par%
\egroup}%
\makeatother

\begin{sanstext}
For, the less of two unequal numbers $AB$, $CD$ being continually subtracted from the greater, let the number which is left never measure the one before it until a unit is left; I~say that $AB$, $CD$ are prime to one another, that is, that a unit alone measures $AB$, $CD$ [figure~2.1.1].
\end{sanstext}

\end{document}

我需要将所有math术语改为10pt大小,我已经尝试过\everymath{\normalsize},但没有用,请指教,如何实现这一点。

答案1

您宁愿缩放无衬线字体来匹配。

\documentclass[10pt]{book}
\usepackage[no-math]{fontspec}

\setmainfont{Times New Roman}
\setsansfont{Arial}[Scale=MatchLowercase]
\usepackage{newtxmath}
%\usepackage{mathspec}

\newenvironment{sanstext}{\sffamily}{\par}

\begin{document}

For, the less of two unequal numbers $AB$, $CD$ being continually subtracted
from the greater, let the number which is left never measure the one before 
it until a unit is left; I~say that $AB$, $CD$ are prime to one another, 
that is, that a unit alone measures $AB$, $CD$ [figure~2.1.1].

\begin{sanstext}
For, the less of two unequal numbers $AB$, $CD$ being continually subtracted
from the greater, let the number which is left never measure the one before 
it until a unit is left; I~say that $AB$, $CD$ are prime to one another, 
that is, that a unit alone measures $AB$, $CD$ [figure~2.1.1].
\end{sanstext}

X\textsf{X} x\textsf{x}

\end{document}

在此处输入图片描述

这里我改用了一些已有的字体。你应该

\setmainfont{TimesNewRomPSPro}[
  Path = ./Fonts/,
  Extension=.otf,
  UprightFont= *,
  BoldFont= *-Bol,
  ItalicFont= *-Ita,
  BoldItalicFont= *-BolIta,
]

\setsansfont{ArialMTPro}[
  Path = ./Fonts/,
  Extension=.otf,
  UprightFont= *,
  BoldFont= *-Bol,
  ItalicFont= *-Ita,
  BoldItalicFont= *-BolIta,
  Scale=MatchLowercase,
]

我认为您不应该加载,mathspec因为您不使用它的任何功能。

相关内容