13
\documentclass{scrartcl}

\usepackage{fontspec}

\usepackage{mathtools}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}

\begin{document}
$\not\propto$
\end{document}

Results in:

result

How can I solve this?

  • 1
    Yes, it's broken; in this case it uses \mathchar"3236 which is of course the wrong thing to do, because it indeed simply prints a 6 considered as a relation symbol. On the other hand, Unicode defines no symbol that could take place of \not, as far as I can see; there is U+0338, but it doesn't behave, in my experiments. – egreg Sep 16 '15 at 9:39
  • 4
    unicode will never define a symbol that adequately takes the place of \not; the tex "dead key" approach does not fit the unicode model. besides, the shape of the \not symbol is already inadequate in the tex model, as can be seen from the many \nXXXX symbols provided. \nprop isn't one of them. so this is best handled by defining such a composite and using that. – barbara beeton Sep 16 '15 at 14:22
2

unicode-math is already checking to see if \npropto is defined (it is not, in this case) and only falls back to overprinting if it is not defined. It uses the original definition (saved as \__um_oldnot:) which isn't really appropriate here, rather than redefine \not to do something else as a fallback, cheat a bit and redefine the saved \__um_oldnot: to overprint a /.

For any command where the negation combination doesn't look good, simply define \nxxx to do something else, the example below shows a default positioning and then the effect if you define \npropto to use a vertical stroke,

enter image description here

\documentclass{scrartcl}

\usepackage{fontspec}

\usepackage{mathtools}
\usepackage{unicode-math}

\ExplSyntaxOn
\def\__um_oldnot:#1{\mathrel{%
\mathchoice
{\rlap{$\displaystyle\mkern1mu/$}}%
{\rlap{$\textstyle\mkern1mu/$}}%
{\rlap{$\scriptstyle/$}}%
{\rlap{$\scriptscriptstyle/$}}%
{#1}}}
\ExplSyntaxOff


\setmathfont{Latin Modern Math}

\begin{document}

$a \not\propto b$


\newcommand\npropto{\mathrel{|\mkern-12mu\propto}}


$a \not\propto b$

\end{document}

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.