在 XeLaTeX 下加载顺序 polyglossia & newtx

在 XeLaTeX 下加载顺序 polyglossia & newtx

为什么polyglosssia先加载会导致选项与newtxtext以下示例冲突?有没有办法在先加载的同时避免该选项polyglossia?(后加载可以正常工作。)

% !TEX TS-program = XeLaTeX    
\documentclass{article}

% This load order --> option clash for \usepackage{newtxtext}:
\usepackage{polyglossia}
\setdefaultlanguage[variant=american]{english}
\setotherlanguages{french,german,polish,russian}

\renewcommand{\rmdefault}{ntxtlf}
\usepackage[T1,T2A]{fontenc}
\usepackage[vvarbb]{newtxmath}
\usepackage[no-math]{fontspec} % only if you want to load other opentype fonts.
\usepackage{newtxtext}

% This load order OK:
%\usepackage{polyglossia}
%\setdefaultlanguage[variant=american]{english}
%\setotherlanguages{french,german,polish,russian}

\newfontfamily{\cyrillicfont}{PT Serif}

\usepackage{amsmath}
\usepackage[math]{blindtext}

\begin{document}

Their names in Cyrillic are \textrussian{Алекс\'{а}ндров}, \textrussian{Т\'{и}хонов}, and \textrussian{Урыс\'{o}н}.

\blindmathpaper

\end{document}

有关的:https://tex.stackexchange.com/a/448589/13492https://tex.stackexchange.com/a/210276/13492

答案1

设置非常简单。只需记住重新声明operators字体即可。

\documentclass{article}

%\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{amsmath}
\usepackage[vvarbb]{newtxmath}

\setdefaultlanguage[variant=american]{english}
\setotherlanguages{french,german,polish,russian}

\setmainfont{Tempora}[
  NFSSFamily=tempora,
  Extension=.otf,
  UprightFont=*-Regular,
  ItalicFont=*-Italic,
  BoldFont=*-Bold,
  BoldItalicFont=*-BoldItalic,
]

\DeclareSymbolFont{operators}{TU}{tempora}{m}{n}

\begin{document}

Their names in Cyrillic are \textrussian{Алекс\'{а}ндров}, 
\textrussian{Т\'{и}хонов}, and \textrussian{Урыс\'{o}н}.

Some in text formula $a+b=c-\sqrt[3]{2}$
\[
\int_{-\infty}^\infty e^{-x^2}\,dx=\sqrt{\pi}
\qquad
\sin^2x+\cos^2x=1
\]

\end{document}

Tempora 字体在 TeX Live 中可用,是支持西里尔文的 Times 的克隆版。

在此处输入图片描述

相关内容