1

I have problems with typesetting math symbols using stix2 fonts. Actually, I want to have \mathbfscr letters, this is the only reason why I need stix2. Simulateously, I need Times New Roman and Arial as main and sans-serif font, respectively, in text mode.

When typesetting the approximately equal sign (\approx), a ù appears instead.

When typesetting square brackets (\left[ and \right]), in a gather environment, everything is fine. In an equation environment, i get ugly round brackets and a minus sign appears as a star.

MWE (MikTex 2.9, up to date as of 14th October 2019)

% !TeX encoding = UTF-8
% !TeX spellcheck = en_GB

\documentclass{article}

\usepackage[notext,notextcomp,lcgreekalpha,not1]{stix2}
\usepackage{mathtools} % this automatically loads amsmath
\usepackage{lualatex-math} % Fixes for mathematics-related LuaLaTeX issues

\usepackage{luatextra} % this loads fontspec automatically
% Font loading & selection
\setmainfont{Times New Roman}
\setsansfont{Arial}

\begin{document}
    Normal Text, Times New Roman. $Re \approx 10^8$.
    \begin{gather}
        Re \approx 10^8 \\
        \mathscr{Re} \approx 10^8 \\
        \mathbf{\mathscr{Re}} \approx 10^8 \\
        \mathbf{Re} \approx 10^8 \\
        \mathbfscr{Re} \approx 10^8 \\
        \mathbfscr{Re} \approx 10^8 \\
        \rho \left[ a^2 + b^2 \right]
    \end{gather}
    \textsf{Sans-serif text, Arial.}
\begin{equation}
    \rho \left[ \frac{\partial u_r}{\partial t} \right] = - \frac{\partial p}{\partial r}
\end{equation}
\begin{equation*}
    Re \approx 10^8
\end{equation*}
\end{document}

Result of MWE

4

Avoid luatextra, it add nothing really useful.

Since you're using legacy math fonts (as opposed to unicode-math), call fontspec with the no-math option.

\documentclass{article}

\usepackage[notext,notextcomp,lcgreekalpha,not1]{stix2}
\usepackage{mathtools} % this automatically loads amsmath
\usepackage{lualatex-math} % Fixes for mathematics-related LuaLaTeX issues

%\usepackage[no-math]{fontspec}
% Font loading & selection
\setmainfont{Times New Roman}
\setsansfont{Arial}

\begin{document}
    Normal Text, Times New Roman. $Re \approx 10^8$.
    \begin{gather}
        Re \approx 10^8 \\
        \mathscr{Re} \approx 10^8 \\
        \mathbf{\mathscr{Re}} \approx 10^8 \\
        \mathbf{Re} \approx 10^8 \\
        \mathbfscr{Re} \approx 10^8 \\
        \mathbfscr{Re} \approx 10^8 \\
        \rho \left[ a^2 + b^2 \right]
    \end{gather}
    \textsf{Sans-serif text, Arial.}
\begin{equation}
    \rho \left[ \frac{\partial u_r}{\partial t} \right] = - \frac{\partial p}{\partial r}
\end{equation}
\begin{equation*}
    Re \approx 10^8
\end{equation*}
\end{document}

enter image description here

  • Thank you, the no-math option did it! You are talking about "legacy math fonts", what would be your non-legacy choice? – Procyon Oct 14 at 14:49
  • 3
    @Procyon \usepackage{unicode-math} and \setmathfont{STIX Two Math}. – egreg Oct 14 at 14:55

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.