How do I write chemical formulae?

The Authorea Team

The best way to type chemical formulae in your document is by using LaTeX syntax. You can use our powerful equation editor if you write in HTML mode, or if you already use LaTeX or Markdown, here’s how to do it. First, make a macro in your header file. Access header.tex via ”Quick Edit” or via the Folder view and add the following line in it:


Then, go back to the article view and type some chemical formulae, for example:

$\chem{H_2} + (1/2)\,\chem{O_2} = \chem{H_2O}$
$2\,\chem{H_2} + \chem{O_2} \to 2\,\chem{H_2O}$

They will render as:



\(2\,\mathrm{H_{2}}+\mathrm{O_{2}}\to 2\,\mathrm{H_{2}O}\)

[Someone else is editing this]

You are editing this file