# How do I write \nsupseteq with kpfonts?

\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?

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

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:

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.

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.

• 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. Oct 25 '16 at 5:33
• @daleif That might depend on other factors; a similar issue happens with fourier. Oct 25 '16 at 6:39