Gas state symbol (g) in LaTeX (\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.
\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
- Liquid
\text{(l)} - Solid
\text{(s)} - Aqueous
\text{(aq)} - Electron
e^{-} - Partial Charge
\delta^{+} - Triple Bond
\text{C}\equiv\text{C}
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.
أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf
يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي
- أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
- ارفع صورة وحولها إلى LaTeX بسلاسة
- احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث