How I make the default font in math mode has nothing to do with \setmainfont{some font}
.
Why is the character specified by \it
Times New Roman and the others are Computer Modern?
Now I want to change \it font which in math mode to Computer Roman.
Code:
\documentclass{book}
\usepackage{fontspec}
\usepackage[T1]{fontenc}
\setmainfont{Times New Roman}
\begin{document}
${v}_v={\it v}_0$,$x={\textit v} _0t$\par
$v_x=v_0$
\end{document}
Patch Code:
\documentclass{book}
\usepackage[no-math]{fontspec}
\showoutput
\setmainfont{Times New Roman}
\RequirePackage{unicode-math}
\setmathfont{TeX Gyre Termes Math}
\setmathfont{XITSMath-Regular}
[
Extension = .otf,
BoldFont = XITSMath-Bold,
range={"1D70B, "2605, "2ACB, "2AFD, "23DC}
]
\setmathfont{STIX Two Math}[range={"221A, "221B, "221C}]
\setmathfont{Times New Roman}[range={"03C0}]
\setmathfont{XITSMath-Regular}
[
Extension = .otf,
BoldFont = XITSMath-Bold,
range={"2A00-"2AFF}
]
\begin{document}
${v}_v=\mathit{v}_0$,$x=\textit{v} _0t$\par
$v_x=v_0$
\end{document}
\setmainfont{some font}
does not change the main math fonts, however the[no-math]
option tofontspec
stops it changing math at all\usepackage[T1]{fontenc}
with luatex (b) don't use\it
with latex (although\mathit{v}
would be the same (c) use[no-math]
as noted above