I am trying to use newtx
and fontspec
on XeLaTeX, and it looked OK until I used siunitx
.
The problem is negative signs are not printed by \num
etc.
How can I fix this?
Here is MWE:
\documentclass{article}
\usepackage[no-math]{fontspec}
\usepackage{zxjatype} % For printing Japanese. Requires fontspec.
\usepackage[ipaex]{zxjafont} % Set Japanese font.
\usepackage{newtxtext,newtxmath}
\usepackage{siunitx}
\sisetup{
detect-family=true,
detect-weight=true,
detect-mode=true,
detect-inline-family=math,
detect-inline-weight=math,
detect-display-math=true,
output-quotient=\ensuremath{/},
}
\begin{document}
\textminus % OK
\num{-1e-1} % negative sign is not printed
\end{document}
Though my problem can be reproduced without zxjatype
and zxjafont
, I included them in the above example because it may be also affect my problem.
Background
I want to create a plot to include in my pLaTeX (Japanese LaTeX) document with a Python library matplotlib
,
which allows you to typeset text with XeLaTeX but not pLaTeX.
Because XeLaTeX can also typeset Japanese text, I decided to use XeLaTeX to typeset Japanese in matolotlib
.
Because my main document is written in pLaTeX, which has better support on Japanese but does not support fontspec
, I want to use newtxtext
on both engines.
I do not want to use TeX Gyre Termes
or Times
on fontspec
because some glyphs have very different shapes compared to newtx
(e.g. \textmu
).