How to type LaTeX symbols that aren't included: Writing ∌ and ⊄
Explain the commands, required packages, and differences in notation for negated set-inclusion symbols such as ∌, ⊄, and ⊈ in LaTeX, and provide a method for verifying the output after compilation, helping you typeset them correctly in your papers and lecture notes.
When writing formulas in LaTeX, many people suddenly get stuck: using \notin to express"x is not an element of set A"feels natural, but when they need to write"set A does not contain element x"or"A is not a subset of B,"they don’t know which command to use. Those searching for"how to type ‘does not contain’ in LaTeX"are usually working on papers, lecture notes, or problem solutions and have encountered these kinds of symbols.
The common feature of these symbols is that most of them do not have a built-in single command; instead, they are formed by striking through ordinary relation symbols with \not. This article focuses solely on the negated inclusion relation symbols, including ∌ (does not contain an element), ⊄ (is not a subset), ⊈ (is neither a subset nor equal), as well as their corresponding counterparts ⊅ and ⊉. After reading this, you will know which command corresponds to each symbol, which package needs to be loaded, and how to verify after typing it that it renders correctly.
How do you type a symbol that isn't included in LaTeX? One-sentence answer
In LaTeX, negated inclusion relations are typically written by placing \not before the corresponding positive symbol: ∌ is written as \not\ni, and ⊄ as \not\subset; when more standard glyphs are needed, load the amssymb package and use commands such as \nsubseteq.
| Your situation | Recommended practice | Reason |
|---|---|---|
| To indicate that an element does not belong to a set (x ∉ A) | Use \notin | Basic commands, no additional packages required |
| To indicate that an element is not contained in a set (A ∌ x) | Use \not\ni | \ni denotes "contains the element"; adding \not before it negates the statement. |
| To denote that one set is not a subset of another (A ⊄ B) | Use \not\subset | Basic LaTeX is sufficient for compilation. |
| To denote that one set is not a subset of another or that they are not equal (A ⊈ B) | Use \nsubseteq (requires amssymb) or \not\subseteq | The former has a more regular glyph, while the latter does not depend on any packages. |
| To denote the negation of a superset (A ⊅ B, A ⊉ B) | Use \not\supset, \not\supseteq | It is symmetric to the notation for subsets; simply substitute accordingly. |
Before You Begin: First, Confirm These Points
Before you get started, make sure to check the following points to avoid many unnecessary detours.
- The direction of symbols. ∌ means"set on the left, element on the right"; A ∌ x is read as"A does not contain x,"while x ∉ A is read as"x is not an element of A."These two have opposite directions; writing them backward changes their meaning and can easily be spotted by reviewers or instructors.
- Your compilation environment. \not, \notin, and \subset are all basic commands available in any LaTeX environment. However, \nsubseteq requires adding \usepackage{amssymb} in the preamble. If your journal or school template already loads this package, there is no need to add it again.
- The appearance of the slash. \not places the slash over the following symbol; since different symbols have varying widths, the position of the slash may be slightly off. This is a typographical issue, not a mistake, but it’s best to zoom in and check carefully in formal documents.
- Inline vs. display math. Use $……$ for inline formulas and \[……\] for display equations. The symbols themselves are written the same way, but display equations have wider spacing, making the symbols appear clearer.
- Do not use \neg as a substitute. \neg denotes logical negation and applies to propositions rather than set relationships. Using it to express"does not contain"is mathematically imprecise and will likely confuse readers.
Steps for typing ∌ and ⊄ in LaTeX
- Open your LaTeX document and check for the relevant package in the preamble. If you want to use \nsubseteq, add \usepackage{amssymb} after \documentclass; otherwise, skip this step.
- Insert an inline formula where needed in the main text, for example $x \notin A$, to indicate that x does not belong to A.
- When writing a relation stating that a set contains no elements, use $A \not\ni x$, which is read as "A contains no x."
- To write the negation of a subset, use $A \not\subset B$ to express that A is not a subset of B.
- For "not a subset or equal," use $A \nsubseteq B$ (with amssymb loaded) or $A \not\subseteq B$ (without relying on any packages).
- To write the negation of a superset, use $A \not\supset B$ or $A \not\supseteq B$, following the same directional convention as for subsets.
- For standalone formulas, use notation like \[ A \not\ni x \] and, after compilation, verify that the spacing around the formula is appropriate.
- Compile and preview the PDF, checking each symbol individually. If you prefer not to configure a local environment, you can also edit formulas in the UniDoc web editor (app.unidoc.top), which supports conversion to and from LaTeX—ideal for testing first.
Check each item after completion
After writing the formula and compiling it successfully, you should also review it against the items below.
| Check item | How do you see it? | What should I do if there is a problem? |
|---|---|---|
| Symbol shape | Does the slash pass through the correct symbol, or has it been mistakenly used as \neg or another symbol? | Make sure to use the \not notation corresponding to set relation symbols; logical negation is not used for sets. |
| Direction of meaning | Does the left-right positioning of sets and elements match what you intend to convey? | Swap the positions of the element and the set, or alternatively use \notin to indicate that an element does not belong to a set. |
| Package error | Does the compilation log indicate an Undefined control sequence? | Check whether amssymb has been loaded; if not, load it, or alternatively use \not\subseteq. |
| Font size and spacing | Do the symbols in inline formulas align with the surrounding text? | Use separate lines for formulas, or add thin space commands where necessary to fine-tune the layout. |
| Translated formula | When translating a LaTeX source package with OmniDoc, check whether the formulas are preserved. | Important formulas should be checked against the original text item by item, and the text content produced by machine translation also requires manual verification. |
❓ Frequently Asked Questions (FAQ)
1. What is the difference between ∉ and ∌?
∉ means that an element does not belong to a set, written as $x \notin A$; ∌ has the opposite meaning, indicating that a set does not contain a particular element, written as $A \not\ni x$. The two symbols are pronounced differently, so pay attention to the left-right order when writing them.
2. Why does the slash in \not\ni appear slightly off-center?
It is not achieved by superimposing a slash; different symbols have varying glyph widths, so the position of the slash will shift slightly. Simply zoom in after compilation to see it. If this affects readability, you can adjust the notation according to the journal’s formatting guidelines.
3. What should I do if I get the compilation error "Undefined control sequence"?
This usually indicates that the command is undefined; a common cause is using \nsubseteq without loading amssymb. Add \usepackage{amssymb} to the preamble, or use \not\subseteq instead.
4. Can I directly paste Unicode symbols like ∌?
Directly pasting Unicode symbols into pdfLaTeX often results in errors or failure to display due to missing fonts. Direct input is only possible when using XeLaTeX or LuaLaTeX with configured math fonts, but the output still needs to be checked individually. A more reliable approach is to use the command above.
📝 Summary
In LaTeX, negated inclusion relations are mostly formed by placing \not before the corresponding symbol: ∌ is written as \not\ni, ⊄ as \not\subset, and ⊈ can be expressed as \nsubseteq. By remembering the direction, checking the appropriate package, and compiling and previewing once more, you can resolve most issues about how to typeset"not contained in"in LaTeX.
Open OmniDoc to edit, convert, or translate your LaTeX document.


