0

I just tried to use the default math font as given by unicode-math, but somehow the symbols for \sum, \prod and (some) greek letters are missing when using \setmathfont{latinmodern-math.otf} (as is suggested by the unicode-math package). Without explicitly setting the font it works perfectly well.

The trouble is just that I need to set fonts for some explicit characters (to be able to display them) but the remaining characters should not change (since the defaults just work well).

PS: This is some kind of a followup from Switching from LaTeX to XeLaTeX - fontspec and unicode-math defaults

What fonts are used in addition to latinmodern-math.otf in the default settings of unicode-math?

EDIT: M(not)WE

\documentclass[a4paper, 12pt]{scrartcl}

% ----- Packages -----
% XeTeX
\usepackage{unicode-math-xetex}
\usepackage{fontspec-xetex}[Ligatures=TeX]
\usepackage{xunicode} % for the inputfile encoding and unicode macros

% ----- Settings -----
\KOMAoptions{
        paper=a4,           % set papersize
        fontsize=12pt,      % set fontsize to 12pt
        parskip=half,       % half a line will seperate paragraphs
}

\setmainfont{lmroman10-regular.otf}
\setmathfont{latinmodern-math.otf}
\setmathfont{STIX2Math.otf}[range="27D5]
% \setmathfont{STIX2Math.otf}[range="27D6]
% \setmathfont{STIX2Math.otf}[range="27D7]
% \setmathfont{STIX2Math.otf}[range="2A1D]
% \setmathfont{STIX2Math.otf}[range="2A1E] % bigtriangleleft -> antijoin
% \setmathfont{STIX2Math.otf}[range="22C9] % ltimes -> leftsemijoin
% \setmathfont{STIX2Math.otf}[range="22CA] % rtimes -> rightsemijoin

\begin{document}
\[
        \prod_{k=1}^{n} c \cdot a_k = c^n \cdot \sum_{k=1}^na_k % this is not right ;)
\]

$\alpha \leftouterjoin \beta$

\end{document}

Produces this: result

15
  • 1
    that is the default. As always if you want someone to debug some code it helps if you show the complete test document and the log file that you get. – David Carlisle Jan 2 at 13:51
  • 1
    \sum and \prod works fine. Something must be wrong in your document or your installation. Show a small but complete example along with the log-file. – Ulrike Fischer Jan 2 at 13:53
  • 1
    in comments on your oder question you clarified unicode-math was failing as your local font paths were incorrect and you were picking up Many (24) Paths like this /usr/share/fonts/mathjax2/HTML-CSS/Latin-Modern/woff/LatinModernMathJax_Shapes-Regular.woff is that still the case? – David Carlisle Jan 2 at 13:55
  • 1
    unrelated but don't load xunicode, and use fontspec, not fontspec-xetex. – Ulrike Fischer Jan 2 at 14:00
  • 1
    \usepackage{unicode-math-xetex} \usepackage{fontspec-xetex}[Ligatures=TeX] \usepackage{xunicode} % for the inputfile encoding and unicode macros is not the correct way to load either package, don't use xunicode (unless you know you need it for compatibility with something) and j specify fontspec and unicode-math` – David Carlisle Jan 2 at 14:00
2

If I remove the spurious or commented out lines from your example, it works without error

\documentclass[a4paper, 12pt]{scrartcl}

% ----- Packages -----
% XeTeX
\usepackage{unicode-math}


\setmainfont{lmroman10-regular.otf}
\setmathfont{latinmodern-math.otf}
\setmathfont{STIX2Math.otf}[range="27D5]


\begin{document}

\[
        \prod_{k=1}^{n} c \cdot a_k = c^n \cdot \sum_{k=1}^na_k % this is not right ;)
\]
$\alpha \leftouterjoin \beta$
\end{document}

enter image description here

Taking the Greek from latin modern and the outer join from stix2.

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.