Gas state symbol (g) in LaTeX (\text{(g)})

(g)\text{(g)}
LaTeX command
\text{(g)}
Package
Add to your preamble:\usepackage{amsmath}
Mode
Text and math mode

Where it is used

State symbol for the gaseous phase, attached to formulas of gases and vapours in equations.

Gas-phase species matter for equilibrium constants in pressure, K_p, and for ideal-gas calculations; marking them with (g) makes those dependencies explicit. Older texts sometimes use an upward arrow to show a gas escaping, but the state symbol is preferred today. A useful habit is labelling every species in a thermochemical equation so enthalpy values are unambiguous. If your document has many formulas, a macro like \newcommand{\gas}{\text{(g)}} prevents typos. \mathrm{(g)} gives the same upright result inside italic text.

Minimal compilable example

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

N2(g)+3H2(g)→2NH3(g)\text{N}_2\text{(g)} + 3\text{H}_2\text{(g)} \to 2\text{NH}_3\text{(g)}
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Gas state symbol (g): $\text{(g)}$

\[ \text{N}_2\text{(g)} + 3\text{H}_2\text{(g)} \to 2\text{NH}_3\text{(g)} \]
\end{document}

Related symbols

All Kimia →

Frequently asked questions

How do I write Gas state symbol (g) in LaTeX?
Type \text{(g)} in math mode, for example $\text{N}_2\text{(g)} + 3\text{H}_2\text{(g)} \to 2\text{NH}_3\text{(g)}$. Load amsmath first with \usepackage{amsmath}.
Which package do I need for \text{(g)}?
\text{(g)} needs amsmath: add \usepackage{amsmath} to your preamble before the document starts.
Can I use \text{(g)} in text mode, or only in math mode?
Both. \text{(g)} 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 peneliti dari 15+ universitas menulis makalah penelitian lebih cepat menggunakan AI

  • Hasilkan diagram TikZ yang indah menggunakan AI
  • Unggah gambar dan konversi ke LaTeX dengan mulus
  • Dapatkan bantuan instan untuk menulis dan memformat makalah penelitian