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.
\documentclass{article}
\usepackage{amssymb}
\begin{document}
Such That (Colon): $:$
\[ \{ n \in \mathbb{Z} : n^2 < 10 \} \]
\end{document}Related symbols
- Set Builder
\{ x \mid P(x) \} - Conditional
\mid - Quantified Statement
\forall x \exists y : P(x, y) - Exists in Set
\exists x \in A - For All in Set
\forall x \in A - Exists x
\exists x
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.
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기