0

I'm using newpx as my document font. However I'm having some problems when compiling with lualatex because the font of math operators does not change to newpx and Computer Modern is shown instead.

Desired output: (compiled using pdflatex)

Desired output

Actual output when using lualatex: Actual output

MWE:

\documentclass[size=a4, 12pt]{scrartcl}

% Fonts
\usepackage{newpxtext,newpxmath}
\usepackage{FiraSans}
\usepackage[T1]{fontenc}

% Math
\usepackage{amsmath}
\usepackage{faktor}

\begin{document}

This is an example. \[\faktor{G}{\operatorname{Ker}(f)} \cong \operatorname{Im}(f).\]

\end{document}
  • 2
    Don't use \usepackage[T1]{fontenc} and newpxtext with lualatex. – Ulrike Fischer Mar 31 at 11:24
  • In unicode-math, Asana Math is a good replacement for newtxmath, and newpxtext is a direct clone of Palatino. So is TeX Gyre Pagella. – Davislor Mar 31 at 13:13
2

Don't use T1 encoding and newpxtext math with luatex.

You can do something like this:

\documentclass[size=a4, 12pt]{scrartcl}

% Math
\usepackage{amsmath}
\usepackage{faktor}

% Fonts
\usepackage{newpxmath}
\usepackage{fontspec}

\setmainfont{TeX Gyre Pagella}

\DeclareSymbolFont{operators}{TU}{\rmdefault}{m}{n}
\SetSymbolFont{operators}{bold}{TU}{\rmdefault}{b}{n}

\usepackage{FiraSans}

\begin{document}

This is an example. \[\faktor{G}{\operatorname{Ker}(f)} \cong \operatorname{Im}(f).\]

\end{document}

enter image description here

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.