Questions tagged [mhchem]

mhchem is a bundle for typesetting chemical formulae and Risk and Safety Phrases.

Filter by
Sorted by
Tagged with
9
votes
3answers
4k views

Number mhchem reactions and create a \listofreactions

Is there a way to create an environment for reactions defined with mhchem that behaves similarly to equation in terms of numbering the reactions (including a \nonumber command)? Can I get a list of ...
11
votes
4answers
3k views

Addition and subtraction of chemical equations

Is there a package that supports the addition or subtraction of chemical equations, perhaps with automatic tabbing and a alignment. Whilst it is obvious I could set up tables or use mathmode's align ...
8
votes
3answers
4k views

Chemical equation with heat of formation

I'm new to Latex and I'm having some trouble with a simple chemical equation. I have the following code: \documentclass{article} \usepackage[version=3]{mhchem} % Package for chemical equation ...
7
votes
3answers
462 views

mhchem vs expl3 bug

Does anybody know how to fix this problem with mhchem package? ! Undefined control sequence. <argument> \l__mhchem_cg_isScript_bool Recently I've found this part of mhchem.sty code: \...
10
votes
1answer
573 views

text figures (old style numbers) and mhchem

How do I achieve lining figures with mhchem while maintaining text figures in the text (lualatex). My MWE is: \documentclass{minimal} \RequirePackage[paperwidth=70mm, paperheight=20mm, left=10pt, ...
6
votes
2answers
188 views

Curved double arrow in tikz?

High all, this is related to a previous question I asked (see here). I would like to make the double arrow between the alcohol and the amine curved (annotated with blue nodes above and below the arrow)...
3
votes
2answers
198 views

Since few days: Trouble with mhchem using \listoftables or \listoffigures

I'm having trouble with the mhchem package. When I have a figure with a separate TOC entry that involves a \ce{} environment, I get error messages saying that the control sequence \aaaa is not defined....
2
votes
1answer
1k views

mhchem ver.4 not working after update! Control sequence undefined

I updated MikTex 2.9 Monday, and now can't compile while loading 'mhchem'. I'm using pdflatex [Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9 64-bit)] to compile the following: \documentclass{article} \...
9
votes
2answers
10k views

\mbox does not draw a box inside align*

\mbox doesn't work inside align*: \begin{document} \usepackage{mhchem} \begin{align*} \ce{K_w} &= \ce{[H3O+][OH^-]} \\ -\log \ce{K_w} &= -\log ( \ce{[H3O+][OH^-]} ) \\ -\log ...
12
votes
4answers
3k views

Oxidation/reduction arrows, overhead and below, with oxidation numbers also

I want oxidation/reduction arrows, overhead and below, with oxidation numbers also. Like the one featured in the watermark background on this very page upper left corner. Unfortunately, chemexec ...
6
votes
1answer
491 views

Hyphenation of terms containing symbols other than letters

I'm trying to hyphenate a chemical name and have come into difficulty. The word I'm trying to hyphenate is poly(ethyeneglycol). I'm using babel and inputenc. I've tried specifying a custom ...
4
votes
0answers
2k views

mhchem wants expl3 [closed]

I am on Ubuntu using TexLive and I cannot compile this .tex file: \documentclass[ letter, 12pt %% set default font size to 12 point ]{scrartcl} %% article, see KOMA documentation (scrguide....
2
votes
1answer
1k views

How to write reactions spanning more lines?

I would like to insert a few reactions in my latex document which need to be on more lines, similarly to the reactions shown below. What is the easiest way to achieve this? Up to now I only wrote ...
2
votes
1answer
185 views

Strange interaction between fontspec and mhchem

I use the mhchem package for chemical formulas (with XeTeX). For one year or so, I’ve been experiencing some really strange bugs, seemingly without reason. Some characters in the chemical formulas, ...
10
votes
1answer
8k views

Command already defined - IOP publication with mhchem

I am using iopart class for IOP publication, and I want use the mhchem package for writing chemical equations. I ran into the same problem as here and there, old topics without answer. I compile with ...
7
votes
3answers
3k views

Unequal equilibrium arrows with overhead text

\documentclass[12pt]{article} \usepackage[version=3]{mhchem} \begin{document} \ce{CH2OH + ATP <=>>[\text{Hexokinase}] + \text{glucose 6-phosphate} + ADP + H+} \\ \ce{CH2OH + ATP <=&...
6
votes
1answer
1k views

Why does mhchem complain about this?

Alright, I'm trying to make a command to insert a proton. This code works fine: \documentclass[12pt,letterpaper]{article} \usepackage{amssymb,mathtools} \usepackage[version=3]{mhchem} \newcommand{\...
5
votes
3answers
1k views

Drawing chemical reactions

I am trying to draw reactions like this I tried it like this \documentclass[11pt]{article} \usepackage[version=4]{mhchem} \usepackage{chemfig} \begin{document} \ce{ \chemfig{CH_3-CH (-[2]OH)-...
5
votes
3answers
118 views

Difficulties obtaining math (italic) style in mhchem aligned equations with unicode-math

This looks like a unicode-math bug to me, but perhaps an expert here can confirm this. I am presently using the Libertinus math font family with luatex for my PhD thesis. For chemical equations, I am ...
5
votes
2answers
345 views

Macro's in mhchem?

I want to write hydroxyl radicals quite frequently, so I thought of making a small macro. But with the macro, the text is not processed as chemical compounds in the mhchem package. Consider the ...
5
votes
2answers
365 views

How to use `MathJax mhchem \pu{}` command in LaTex?

As title says I would like to use MathJax mhchem \pu{} command in my LaTeX document. FYI it is widely used in chemistry stackexchange for putting units. But when used I get the error: Undefined ...
4
votes
2answers
223 views

mhchem/amsmath seems to change the @eqnnum macro so I can't change equation number colors globally. How would I fix this issue?

Thanks to cfr How would I get custom-colored equation numbers as simply as possible? for providing a hint on how to do this without the mhchem/amsmath packages installed. To see what I mean, Here is a ...
4
votes
1answer
285 views

Clash between mhchem and breqn. Any way to dodge or fix?

The use of breqn causes the subscript numbers in chemical expressions, formatted by mhchem, to be exlargened and perhaps moved slightly making it look ugly. Is there a way to avoid this or should I ...
4
votes
3answers
2k views

How to make the equilibrium double arrow longer?

\documentclass{article} \usepackage{mhchem} \begin{document} \ce{H^+ (\textit{aq}) + HCO3^- <=> H2CO3 (\textit{aq}) <=> H2O (\textit{l}) + CO2 (\textit{g})} \ce{2H2(\textit{g}) + O2(\...
3
votes
1answer
131 views

mhchem macro in subscript

Consider the following MWE \documentclass{article} \usepackage[version=3]{mhchem} \begin{document} \begin{equation*} % c_\ce{CO2} not working c_{\ce{CO2}} \quad c_\text{working} \end{equation*} ...
3
votes
2answers
261 views

chemformula: reaction arrows not displayed

lately I've been having trouble with chemical equations in the reaction-environment. To be specific, neither reaction arrows nor hyphens are displayed after compiling the pdf. Instead, a blank space ...
3
votes
2answers
432 views

mhchem reaction arrows seem to break when using a command in the \ce environment

I've tried making the command \newcommand{\aq}{_{(aq)}} to make the subscript to show that an ion is aqueous, but when used in the \ce command it breaks the reaction arrows \ce{2Cu(OH2)^{2+}_{6} + ...
3
votes
2answers
108 views

Using mhchem with array

I would like to use the array package to format a column filled with chemical formula in order to avoid writing \ce{X} on each line. I don't know if it is even possible. I started from the trick used ...
3
votes
1answer
133 views

Drawing a Chemical Reactions Flow Chart

I know I should probably separate the questions into multiple stems but I don't want to spam. I am attempting to recreate this diagram but there are a few parts I am unsure of: Here is my code for ...
2
votes
1answer
668 views

Create New Type of Align Environment with Unique Counter

I am trying to typeset some chemical equations in my thesis, and I would like to have the chemical equations have a unique counter from regular equations. I also need to have some of them align over ...
1
vote
0answers
117 views

Lowercase gamma in mhchem environment with fontspec [closed]

I'm trying to use \gamma inside the mhchem environment, and it refuses to render the correct glyph. Alpha and beta work, as does Uppercase \Gamma. I have tried this with other fonts e.g. Roboto and ...