Defined As in LaTeX (:=)
- LaTeX command
:=- Package
- No package needed: built into LaTeX
- Mode
- Text and math mode
Where it is used
Colon-equals, the definition assignment: the left side is defined to equal the right side.
Writing f(x) := x^2 + 1 marks a definition rather than a claim of equality, and the colon sits on the side of the thing being defined (=: reverses the direction). Typed directly, the colon and equals sign are both relations, so TeX sets them without space between them, but the colon is not vertically centered on the equals sign, which bothers some typographers. The \coloneqq command from a math tools package fixes that alignment. In pseudocode it also denotes assignment, x := x + 1. Alternatives include \triangleq and \stackrel{\text{def}}{=}.
Also listed under: 컴퓨터 과학
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Defined As: $:=$
\[ \|f\|_{\infty} := \sup_{x \in X} |f(x)| \]
\end{document}Related symbols
- Triangle Equal
\triangleq - Asymptotic
\asymp - Succeeds or Equal
\succeq - Precedes or Equal
\preceq - Succeeds
\succ - Precedes
\prec
Frequently asked questions
- How do I write Defined As in LaTeX?
- Type := in math mode, for example $\|f\|_{\infty} := \sup_{x \in X} |f(x)|$. 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로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기