5

I exported a BibTeX file from the journal's website, and in the title, there was a chemical formula written like this

Na<inf>2</inf>Mn<inf>3</inf>(SO<inf>4</inf>)<inf>4</inf>

I copied and pasted the content of BibTeX file to my reference.bib file and executed. The problem is

Na<inf>2</inf>Mn<inf>3</inf>(SO<inf>4</inf>)<inf>4</inf>

appeared in pdf output. I would like to ask which package should I use for a chemical formula written like this?

1
  • 6
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. I don't think this is a standard form for chemical equations, more likely its some issue with HTML. If you use the package mhchem then this chemical formula can be typeset with \ce{Na2Mn3(SO4)4}. There are other packages also used for chemical formulae but I'm not familiar with them. See this question (tex.stackexchange.com/questions/145838/…) for more.
    – Willoughby
    Sep 4, 2021 at 2:31

3 Answers 3

12

Another solution with package chemformula

\documentclass{article}
\usepackage{chemformula}
\begin{document}
\ch{Na2Mn3(SO4)4}
\end{document}

enter image description here

6

Generally, we have for example chemfig package for chemical formulas, however, in such a simple situation, we do not need any. Additionally, it is safer to use for BibTeX entries only basic tools.

\documentclass{article}
\begin{document}

  $\mathrm{Na_2(Mn_3SO_4)_4}$
 
 \end{document}

enter image description here

0

A simple but feature-rich package is mhchem (https://www.ctan.org/pkg/mhchem)

\documentclass[a4paper,12pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage[brazilian]{babel}
\usepackage[version=4]{mhchem}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\begin{document}
    
 \ce{Na2Mn3(SO4)4}

 \ce{CO2 + C -> 2 CO}

 \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}

\end{document}

enter image description here

Not the answer you're looking for? Browse other questions tagged .