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 화학 →

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 poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기