TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When compiling the following piece of LaTeX code, the ∖ symbol does not show up.

\setmainfont{Latin Modern Roman}
\setmathfont{Latin Modern Math}
This will not show: $\setminus$ \\
This will show: $\smallsetminus$

I know why this happens: \setminus translates to unicode character 0x29F5, and this character is not part of Latin Modern Math. What I would like to do is to use Unicode character for \smallsetminus, 0x2216, instead. So what I am really looking for is a way to remap the \smallsetminus command to another Unicode value than the one defined by the unicode-math package. I know a possible way to get a value for \setminus would be to use another math font that does have Unicode character 0x29F5. Adding the line

\setmathfont[range={"29F5}]{XITS Math}

gives me a ∖ symbol, but I don’t want to use another font for this character.

share|improve this question
up vote 10 down vote accepted

The following makes \setminus equivalent to \smallsetminus:

\setmathfont{Latin Modern Math}


  \[ A \setminus B \qquad A \smallsetminus B \]

The \AtBeginDocument is necessary because unicode-math defines its commands only at \begin{document}. So a simple \let\setminus\smallsetminus in the preamble would get overwritten. Alternatively, you could put \let\setminus\smallsetminus after \begin{document}, but this is a less “clean” solution as it violates the separation of content and styling.

If you want to use a completely different symbol, you can do something like



share|improve this answer
Thanks! This works perfectly. I already tried \let\setminus\smallsetminus, but I didn't know that it was overwritten. – Semafoor May 10 '12 at 2:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.