# How to insert the "X is a subset of Y, but is not equal to Y" symbol? [duplicate]

How can I insert the "X is a subset of Y, but is not equal to Y" symbol? I have tried using $\subsetneq$, as in $X \subsetneq Y$, but this yields the error message:

Undefined control sequence.


There is no problem using $\subseteq$.

Code:

\title{Subset-Not-Equal-To}
\author{}
\date{}

\documentclass[8pt]{article}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}

\begin{document}
\maketitle

$X \subsetneq Y$
\end{document}

• Could you provide a minimal example from \documentclass to \end{document}. I think that may be amssymb is the package that provides that symbol, but there is no option to see what you actually loaded. Jun 16, 2014 at 16:31
• A tip: You can use backticks  to mark your inline code as I did in my edit. Jun 16, 2014 at 17:45

You have to load the amssymb package. Here is a possible solution:

\documentclass{article}

\usepackage{amssymb}

\begin{document}

Type \verb|$A \subsetneq B$|'' to get $A \subsetneq B$''.

Type \verb|$A \subsetneqq B$|'' to get $A \subsetneqq B$''.

\end{document}
`