Math & ScienceIons

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Robyn
Posts: 1
Joined: Wed Dec 03, 2014 1:43 pm

Ions

Post by Robyn »

I'm using Texworks on a mac to write a report on negative ions. I was told to use \ion to write in my ions (rather than using eg. $H^{-}$) but it doesn't seem to be working. Is there any other way to include ions in my text?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Ions

Post by Johannes_B »

Use package chemformula.

Code: Select all

\documentclass{article}
\usepackage{chemformula}
\usepackage{chemmacros}
\begin{document}
\ch{H+} is a hydogen ion


This is in text \ch{2 H+ + O^{2-} <> H2O}, but you can use it
similar to maths equations:
\begin{reaction}2 H+ + O^{2-} <> H2O\end{reaction}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Ions

Post by cgnieder »

Robyn wrote:I was told to use \ion to write in my ions (rather than using eg. $H^{-}$) but it doesn't seem to be working.
Who told you that? As far as I know there is no package providing an \ion macro…

Regards
site moderator & package author
Post Reply