Such That (Colon) in LaTeX (:)

::
LaTeX command
:
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

Colon read as 'such that' in quantified statements and set-builder notation, separating a variable from its condition.

In math mode a plain colon is treated as a relation, getting equal thick space on both sides, which suits \{x : x > 0\} and \forall x : P(x). For a function signature use \colon instead, since it has punctuation spacing: f\colon A \to B looks right, whereas f : A \to B leaves a gap before the colon. For definitions, := built from two characters can look misaligned vertically; a dedicated definition symbol from an extension package fixes that. Some authors prefer \mid or a vertical bar in set-builder notation; choose one and stay consistent.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

{n∈Z:n2<10}\{ n \in \mathbb{Z} : n^2 < 10 \}
\documentclass{article}
\usepackage{amssymb}
\begin{document}
Such That (Colon): $:$

\[ \{ n \in \mathbb{Z} : n^2 < 10 \} \]
\end{document}

Related symbols

All 量化子 →

Frequently asked questions

How do I write Such That (Colon) in LaTeX?
Type : in math mode, for example $\{ n \in \mathbb{Z} : n^2 < 10 \}$. It works in plain LaTeX without loading any package.
Which package do I need for :?
None. : is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use : in text mode, or only in math mode?
Both. : compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredAIでLaTeXを書く

最高のAI LaTeXエディタ、Overleaf代替

Octreeは15以上の大学の研究者がAIを使って論文をより速く書くのを支援

  • AIで美しいTikZダイアグラムを生成
  • 画像をアップロードしてシームレスにLaTeXに変換
  • 論文の執筆とフォーマットに即座にサポートを取得