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 Kimika →

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 poweredSumulat ng LaTeX gamit ang AI

Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf

Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI

  • Gumawa ng magagandang TikZ diagrams gamit ang AI
  • Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
  • Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers