# Latin Modern Math and \setminus [duplicate]

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

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.

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.

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}

• Shouldn't it at least produce an error? I would call silently producing nothing with a standard command like \setminus a bug. Jul 29 '18 at 15:45
• @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. Jul 30 '18 at 8:42