Typing chemical formulas – a mini post with some practical tips for getting those mini numbers easily. 

I’ve been/going to be really busy working on my thesis, so I’m probably going to be reposting a lot, but I also thought I’d try out introducing some “mini posts” on things I learn that I think others might find helpful and/or interesting so want to share, but I don’t have time to make a full post on and/or there’s not enough stuff for a whole post. So, first up – typing chemical formulas (things like H₂O for water)

In general writing, I used a a tiny text generator website – such as  https://www.tinytextgenerator.com/ to create unicode symbol versions of superscript & subscript versions of all the numbers and saved them in a pinned note in Notes for quick copy-and-pasting

₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉    

⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹

I also have some common chemical formulas stored in there too – things like MgCl₂ and PO₄³⁻ and H₂O

But the inspiration for this post was that I’ve been typing up my thesis in a text formatter called LaTeX http://bit.ly/latexlearning 

and I discovered the mchem LaTeX package and it’s awesome – makes writing chemical formulas so much easier! https://ctan.org/pkg/mhchem?lang=en

from Mg\textsuperscript{2\textsuperscript{+}}

to \ce{Mg^2+} 

to get Mg²⁺

and it automatically will do subscripts when there should be them, like

\ce{MgCl2}

to get MgCl₂

and \ce{H2CO3} to get H₂CO₃ !

mhchem can do way more too, but I mainly just need it for the formulas

one last note while I’m on a LaTeX learning kick – Another helpful function of LaTeX is that I can comment out my word-dumps until they’re less dumpy, and draft paragraphs that aren’t ready for prime time, and they won’t show up in the PDF! Beats saving a bazillion draft versions of a Word doc 🙂 

to comment a line, put a % in front of it, and to comment a block easily, just highlight it and press command+/

Hope this can help someone, and, if you feel inclined, let me know what you think of the whole “mini post” idea! 

As always, you can still access all the posts, big and small, on my blog, thebumblingbiochemist.com 

Thanks everyone for your patience and support throughout my PhD journey!

more on topics mentioned (& others) #365DaysOfScience All (with topics listed) 👉 http://bit.ly/2OllAB0

Leave a Reply

Your email address will not be published.