5

Consider the following MWE, typeset by lualatex from TeX Live 2016:

\documentclass[paper=A4, parskip=half]{scrartcl}

%
% Packages
%

% Fonts
\usepackage{fontspec}

% Languages
\usepackage{polyglossia}
\setmainlanguage{english}

% Mathematics
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage[math-style=TeX, bold-style=upright]{unicode-math}
\setmathfont{Latin Modern Math}
\mathtoolsset{mathic=true}

% Microtype
\usepackage{microtype}

%
% Document
%

\begin{document}
Let \(A\) and \(B\) be two sets.  The set difference, denoted
\[
  A \setminus B
\]
consists of all elements of \(A\) except those which are also elements
of \(B\).
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-engine: luatex
%%% TeX-master: t
%%% End:

The corresponding output

MWE

does not include the \setminus sign. Is this a bug in Latin Modern? Changing the math font to XITS Math, for example, fixes the issue.

d125q
  • 875
  • 8
  • 18

1 Answers1

4

This is not a bug, but this symbol is not defined in your font.

See the table in http://mirror.switch.ch/ftp/mirror/tex/macros/latex/contrib/unicode-math/unimath-symbols.pdf and you will notice (most left column) that there is not symbol for U+029F5 in Latin Modern.

enter image description here


If you don't mind changing the font for one symbol only, you can do something like:

% arara: lualatex

\documentclass[parskip=half]{scrartcl}
\usepackage{fontspec}
\usepackage[math-style=TeX, bold-style=upright]{unicode-math}
\setmathfont{Latin Modern Math}
\setmathfont[range=\setminus]{XITS Math}


\begin{document}
    Let \(A\) and \(B\) be two sets.  The set difference, denoted
    \[
    A \setminus B
    \]
    consists of all elements of \(A\) except those which are also elements
    of \(B\).
\end{document} 
LaRiFaRi
  • 43,807
  • 2
    Shouldn't it at least produce an error? I would call silently producing nothing with a standard command like \setminus a bug. – user87690 Jul 29 '18 at 15:45
  • 3
    @user87690 I do not know whether there is something in the logging. You might want to check. I agree that having no feedback on such things is bad. You might want to report this to the maintainers of that package. – LaRiFaRi Jul 30 '18 at 08:42