0

I set main font as Times New Roman for the whole document, and I've tried using newtxtext, newtxmath, pslatex, tgtermes, txfonts for those parts concerned with math equation presenting in Times New Roman, but I found that each way would leave sometimes the text, sometimes the Greek in the math equation, sometimes the number in the math equation, sometimes the text next to the math equation not prensenting in Times New Roman. Which means I didn't find a way to make all parts of my document present in Times New Roman perfectly. Hope someone can help me. Thanks a lot.

\documentclass{article}
%\usepackage{amsfonts}
%\usepackage{amsthm}
%\usepackage{amsmath, amssymb}
%\usepackage{tgtermes}
%\usepackage{pslatex}
\usepackage{newtxtext, newtxmath}
\usepackage{polyglossia}
    \setdefaultlanguage{english}
    \setotherlanguages{greek,russian}
\usepackage{fontspec}
    \setmainfont{Times New Roman}

\begin{document}
\textgreek{χ}\textsuperscript{2} distribution
\begin{align*}
&\chi^2\text{\ distribution}\\
&f(x)=\frac{1}{\beta^{\alpha} \Gamma(\alpha)} x^{\alpha-1} e^{-\frac{x}{\beta}} \qquad \alpha>0, \beta>0\\
&\text{for\ } \ \alpha=\frac{\nu}{2}, \beta=2 \qquad f(x)=\frac{1}{2^{\frac{\nu}{2}} \Gamma\left(\frac{\nu}{2}\right)} x^{\frac{\nu}{2}-1} e^{-\frac{x}{2}} \qquad x>0
\end{align*}
\end{document}
1
  • 2
    Sorry, but it is much easier to see some code. Also note that neither of the packages mentioned provide Times New Roman
    – daleif
    Dec 23, 2021 at 13:46

1 Answer 1

1

This worked for me.

\documentclass{article}
%\usepackage{amsfonts}
%\usepackage{amsthm}
%\usepackage{amsmath, amssymb}
%\usepackage{tgtermes}
%\usepackage{pslatex}
\usepackage{unicode-math}
\usepackage{polyglossia}
    \setdefaultlanguage{english}
    \setotherlanguages{greek,russian}
 
\setmainfont{Times New Roman}
\setmathfont{TeX Gyre Termes Math}[Scale = MatchLowercase]
\newfontfamily\greekfont{Times New Roman}[Script=Greek, Language=Greek]
\newfontfamily\russianfont{Times New Roman}[Script=Cyrillic, Language=Russian]


\begin{document}
\textgreek{χ}\textsuperscript{2} distribution
\begin{align*}
&\chi^2\text{\ distribution}\\
&f(x)=\frac{1}{\beta^{\alpha} \Gamma(\alpha)} x^{\alpha-1} e^{-\frac{x}{\beta}} \qquad \alpha>0, \beta>0\\
&\text{for\ } \ \alpha=\frac{\nu}{2}, \beta=2 \qquad f(x)=\frac{1}{2^{\frac{\nu}{2}} \Gamma\left(\frac{\nu}{2}\right)} x^{\frac{\nu}{2}-1} e^{-\frac{x}{2}} \qquad x>0
\end{align*}
\end{document}

The unicode-math package lets you cut the gordian knot of legacy 8-bit font packages.

If you don't like TeX Gyre Termes Math’s letters, you could add these lines to replace them with Times New Roman:

\setmathfont{Times New Roman Italic}[range=it]
\setmathfont{Times New Roman}[range=up]
\setmathfont{Times New Roman Bold Italic}[range=bfit]
\setmathfont{Times New Roman Bold}[range=bfup]

In pdftex, you might load \usepackage{tempora,newtxmath} and \usepackage[greek, russian, english]{babel}.

1
  • Thank you so much !
    – noki hiro
    Dec 24, 2021 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.