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: Sains Komputer

Minimal compilable example

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

∥f∥∞:=sup⁡x∈X∣f(x)∣\|f\|_{\infty} := \sup_{x \in X} |f(x)|
\documentclass{article}
\begin{document}
Defined As: $:=$

\[ \|f\|_{\infty} := \sup_{x \in X} |f(x)| \]
\end{document}

Related symbols

All Hubungan & Perbandingan →

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.
Math poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI

  • Jana diagram TikZ yang cantik menggunakan AI
  • Muat naik imej dan tukar ke LaTeX dengan lancar
  • Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan