Kilogram in LaTeX (\text{kg})
- LaTeX command
\text{kg}- Package
- Add to your preamble:
\usepackage{amsmath} - Mode
- Text and math mode
Where it is used
Kilogram, the SI base unit of mass, now fixed through the Planck constant rather than a physical prototype.
It is the only SI base unit with a prefix built in, so multiples are formed from the gram: write \text{mg}, not \mu\text{kg}. Densities are given in \text{kg}/\text{m}^3 or \text{kg}\,\text{m}^{-3}; water is about 1000\,\text{kg}\,\text{m}^{-3}. Keep the symbol lowercase, since Kg or KG are incorrect. Units go upright, so wrap in \text or \mathrm; and add \, between the number and kg. In derived units like the newton, kg sits first by convention, \text{kg}\,\text{m}\,\text{s}^{-2}. Its symbol and its name stay lowercase even at the start of a sentence.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Kilogram: $\text{kg}$
\[ F = m a = 2\,\text{kg} \times 9.81\,\text{m/s}^2 = 19.62\,\text{N} \]
\end{document}Related symbols
- Second
\text{s} - Meter
\text{m} - Ampere
\text{A} - Kelvin
\text{K} - Volt
\text{V} - Degrees Fahrenheit
^{\circ}\text{F}
Frequently asked questions
- How do I write Kilogram in LaTeX?
- Type \text{kg} in math mode, for example $F = m a = 2\,\text{kg} \times 9.81\,\text{m/s}^2 = 19.62\,\text{N}$. Load amsmath first with \usepackage{amsmath}.
- Which package do I need for \text{kg}?
- \text{kg} needs amsmath: add \usepackage{amsmath} to your preamble before the document starts.
- Can I use \text{kg} in text mode, or only in math mode?
- Both. \text{kg} compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
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