6
\documentclass[9pt, a4paper]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{a4paper, total={170mm,257mm}, left=20mm, top=20mm,}
\usepackage{amsmath,amsfonts,amssymb} 

\usepackage{kpfonts}

\begin{document}

$\nsupseteq \, \nsubseteq$

\end{document}

If I try to run this (in ShareLaTeX), then the symbol for \nsupseteq would look weird, but \nsubseteq wouldn't.

I found out the problem is the package kpfonts. But I do like the font.

How do I fix this?

1
  • I filed a bug report to Christophe Caignaert.
    – egreg
    Oct 25 '16 at 14:35
7

It's a bug in the font jkpsyb; in slot 0x2B there's the same symbol as in slot 0x29, instead of the analog of the symbol in slot 0x2A. Here's the relevant part of the font table:

enter image description here

The bottom line shows the problem.

Workaround:

\documentclass[9pt, a4paper]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{a4paper, total={170mm,257mm}, left=20mm, top=20mm,}
\usepackage{amsmath}

\usepackage{kpfonts}
\renewcommand{\nsupseteq}{\not\mathrel{}\supseteq}
\renewcommand{\nsubseteq}{\not\mathrel{}\subseteq}

\begin{document}

$\nsupseteq \, \nsubseteq$

\end{document}

This changes both symbols to use \not for the negation; only changing the faulty one would make them dissimilar.

enter image description here

Why the strange \mathrel{}? Because the kpfonts package tries to outsmart: it redefines \not to look forward in order to see whether a symbol that can be negated follows. So with \not\supseteq we would end with an infinite loop, because it would be translated into \nsupseteq and this into \not\supseteq

Since neither \notmathrel not \nmathrel is defined, no substitution is performed. Consecutive relation atoms get no space between them, so the effect of \not\mathrel{}<relation> is the same as \not<relation>.

Note that you should not load amssymb together with kpfonts.

2
  • Regarding amssymb isn't either enough to just load kpfonts last? This is yet another bug in kpfonts. IMO there is also a bug in the size of \big(, the jump compared to ( is too large.
    – daleif
    Oct 25 '16 at 5:33
  • @daleif That might depend on other factors; a similar issue happens with fourier.
    – egreg
    Oct 25 '16 at 6:39

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.