Questions tagged [chemformula]

The chemformula package provides means for typesetting chemical formulas and reaction equations following IUPAC's recommendations with comprehensive support for customization.

Filter by
Sorted by
Tagged with
1 vote
1 answer
45 views

LuaLaTeX: Numito doesn't print Greek characters in chemformula (chemmacro)

In my migration of my documents from PDFLatex to LuaLatex I came across an odd behaviour of chemgreek when used with the font packages Numito and XITS. When I set the font format in chemformula to \...
  • 1,047
1 vote
1 answer
29 views

Left align reaction conditions above reaction arrow in chemformula

Is it possible to write two or more left-aligned reaction conditions above or below the arrow in a non-hacky way? The chemformula manual explicitly mentions the case of having a line break in the text ...
0 votes
2 answers
69 views

How do I align a set of chemical formulae

Here's the image I want to recreate - Here's my attempt at recreating it - \documentclass{12pt}{book} \usepackage{amsmath, amssymb} \usepackage{mhchem} \usepackage{graphicx} \usepackage{tikz} \begin{...
1 vote
1 answer
42 views

LaTeX chemformula in header

For my thesis, I'd like to add a mchem formula to the title of a chapter. However, I cannot manage LaTeX to print it in bold. Here is the package I am using \documentclass[a4paper,12pt,openright]{...
4 votes
4 answers
460 views

Is there a way to write a parallel chemical reaction like this one?

Im using the package chemformula, but I can't find a way to write something like this:
0 votes
0 answers
78 views

Chemformula giving Missing number, treated as zero error

I've recently installed TeXstudio and MiKteX on a new Windows 11 machine and have been trying to compile some of my old .tex files which uses chemformula: \documentclass[answers, 12pt]{exam} \...
  • 113
2 votes
2 answers
60 views

Breaking lines/linebreaks in chemformula names

In the process of writing an inorganic nomenclature lecture, I would like to put centered multi-line text in the name function of chemformula. As far as I've tried, creating a new line with \\ does ...
  • 305
2 votes
2 answers
68 views

colored coefficients using package chemformula

For a beamer presentation I want to apply the nice chemformula package. I now wish to have only the coefficients colored individually, for example marking the first coefficient in blue: \ch{\color{...
1 vote
1 answer
39 views

I can use \refcmpd{a} in \ch{} environment, but not \refcmpd{a.one}?

I'm trying to show a reaction with chemformula involving a compound I've named using chemnum. If I use \cmpd{a} or \refcmpd{a} it works fine. However, if I use a sublabel, such as \refcmpd{a.one} then ...
  • 17.6k
4 votes
1 answer
144 views

Chemformula: The negative charges are barely visible

While writing a chemistry document I've noticed that the negative charges in chemformula are barely visible. I've included my whole preambule just in case there's a problem between packages: \...
1 vote
1 answer
139 views

Reaction annotation with math using chemformula and chemmacros packages

In the following MWE, I attempt to use the chemformula and chemmacros packages to typeset a reaction annotated with some math. Why does Reaction 1 compile but Reaction 2 does not? \documentclass[...
  • 1,177
2 votes
2 answers
117 views

Annotating chemical reactions typeset using the chemmacros package's reactions environment

I'm using the reactions environment in the chemmacros package to typeset some chemical reactions. I would like to annotate each reaction with text. Here is my MWE: \documentclass[oneside,11pt]{book} \...
  • 1,177
1 vote
2 answers
125 views

Enumeration of equation array with only one reference label

I am trying to create an array of chemical equations with the equations enumerated from (1) - (7) aligned left but only one reference enumeration on the right. The enumeration (1) - (7) should be ...
  • 13
2 votes
1 answer
643 views

`mhchem` vs `chemformula`

Can you explain the main differences/advantages/disadvantages between package mhchem and chemformula? I don't mean the exact usage but the main aspects to choose between them (e.g. one of them is ...
  • 807
5 votes
1 answer
176 views

Unable to set the representation option of the "to" (range-phrase) while using SIrange within a chemformula (chemmacros) command

EDIT (supplement): the behaviour is the same within all use-cases (environment as well as \ch command) provided by the chemmacros package. In a chemmacros reactions environment I tried to switch from ...
  • 63
0 votes
1 answer
74 views

What to do if a new package uses a command I already use as a personal macro?

In my documents, I use \ch as a shorthand for "ch." or "chap." or "chapter" (depending on the desired output style), as in see \ch 3 (output: "see ch. 3" or "see chap. 3" or "see chapter 3"). I would ...
  • 1,387
1 vote
1 answer
148 views

chemformula radical in pgfplots title

I want to typeset a radical in a pgfplots title using chemmacros or more specifically chemformula. However, chemformula uses tikz to typeset radicals and the pgfplot interferes with the coordinates so ...
  • 217
3 votes
2 answers
70 views

Unwanted line height increase with chemformula

I'm getting an unwanted line skip between tabular lines when one of the the lines contains a bond in a \ch formula, e.g. \documentclass{article} \usepackage{chemformula} \lineskiplimit=-1em \begin{...
  • 3,161
2 votes
2 answers
136 views

Package conflict between chemmacros and Russian [duplicate]

I'm trying to set up my document with chemmacros package and it seems like it has a conflict with babel Here is MWE: \documentclass[12pt, a4paper, final]{extarticle} \usepackage{fontspec} \...
2 votes
1 answer
146 views

Using \acs* within \ch (acro + chemformula)

When calling an acronym, it might a) have been used somewhere in the document before or b) be used for the first time. In case b, one would require the acro package to print the long form. Sometimes, ...
  • 457
0 votes
1 answer
319 views

Reaction numbering using chemformula [duplicate]

Can anyone please guide me to number the reactions separately from equation numbering, while using chemformula package.
1 vote
3 answers
221 views

Cross reference reaction using cleveref in chemformula package

I want to cross-refer a chemical reaction and to write chemical reactions I am using \usepackage{chemformula} to cite I am using \usepackage{cleveref} I want to cross-refer reactions using \cref{...
8 votes
1 answer
585 views

Coloring part of an equation in chemmacros

For a chemistry lecture handout, I would like to emphasize specific parts of a chemical equation written with chemmacros with colors; however, I have not been able to use common symbols such as +, -, ...
  • 305
4 votes
2 answers
940 views

Triple bond inside escaped chemfig formula within chemformula's reaction

I'm trying to include a molecular structure drawn with chemfig inside chemformula's reaction environment by escaping it with "…". It all worked fine until I stumbled upon a structure with a triple ...
  • 2,615
6 votes
1 answer
152 views

chemformula kröger-vink + pgfplots: Error when using dot notation

\documentclass{scrartcl} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{chemformula} \setchemformula{kroeger-vink} \begin{document} \begin{tikzpicture} ...
  • 350
2 votes
1 answer
1k views

How to write organic chemical equation of the following form

I need to write this transesterification reaction and give it an equation number. How can I do so?
2 votes
1 answer
157 views

Chemmacros reaction(s) environment doesn't display the first reactant if enclosed in square brackets

When typing reactions starting with coordinating compounds, I noticed that when the first reactant starts with "[" in both reaction and reactions environments the part enclosed in square brackets isn'...
  • 2,615
2 votes
2 answers
133 views

Nested Chemformula exceeds TeX Capacity

Here is an MWE of the problem at hand: \documentclass{article} \usepackage{chemformula} \begin{document} $\varphi_{\ch{N2}}$%chemformula as index works \ch{C + O2 + N2 -> CO2 + N2}%...
4 votes
1 answer
864 views

Chemformula doesnt display arrows (not using dvips)

I've been trying a simple reaction with chemformula but it doesnt display the arrows. There is a similar problem here but the solution doesn't work for me (I'm not using dvips). Here is a MWE \...
user avatar
1 vote
1 answer
523 views

Drawing both bonds and valence electrons

Is there any package for drawing valence electrons? MWE \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{chemformula} \begin{document} \begin{frame}{Lewis ...
user avatar
2 votes
0 answers
51 views

Texstudio version 2.10.12: How to stop \ch autocomplete to \chapter [closed]

I would like texstudio to stop autocompleting my \ch command to \chapter.Can you please suggest what to do ? I have already made the changes suggested in previous posts (image attached) Thanks a lot ...
  • 209
1 vote
1 answer
722 views

How do I write chemical reaction-diffusion formula in LaTex?

How can I write the following chemical reaction-diffusion formula (see figure) in LaTex? My main objective is, how do I produce the two way arrows with single letters above and below?
2 votes
1 answer
605 views

Figure with a caption and formulas

I need to place a figure on the left, and formulas on the right, but I also need to add a caption to the figure. I have a mistake if I add \caption, and wrong location if I add \begin{figure}. How can ...
  • 25
2 votes
1 answer
40 views

Superior label in chemfomula's arrow doesn't accept a word after an element

I have to write a simple reaction using chemformula with a double arrow (\ch{<=>}) and a label above the arrow. Here's a MWE: \documentclass{article} \usepackage{chemformula} \begin{document} ...
0 votes
1 answer
412 views

error update bibliography Unicode char ″ (U+2033) (inputenc)

I have a severe problem with Latex :). Right now I am writing my thesis (Texmaker), and since yesterday an unknown problem occured. If I wanna actualize the bibliography, I get the following error: ...
4 votes
1 answer
139 views

Automatically resize equilibrium constants in superscripts with chemmacros

Using the chemmacros commands \K... and \p..., equilibrium constants and p functions don't get resized when written as superscripts. For instance, \documentclass{article} \usepackage{chemmacros} \...
  • 1,467
2 votes
0 answers
102 views

Conflict between package chemformula and cellspace? [closed]

When the package chemformula is used I can't have a vertical space between the line and text as cellspace should do. If I don't use chemformula there is no problem. Because I also use siunitx in the ...
1 vote
1 answer
62 views

Chemical formula inside pgfplot rendered wrong---labels overlap

Under normal circumstances \ch{AB_2} is rendered as $AB_2$, but not inside the pgfplot. I am getting the error message Package PGF Math Error: Could not parse input '' as a floating point number and ...
  • 260
3 votes
1 answer
406 views

Use of mhchem and chemformula inside a glossary entry

The following MWE where a glossary entry with a chemical formula defined with mhchem renders as expected with 0 errors: \documentclass{article} \usepackage[modules={all}]{chemmacros} \usepackage[...
  • 2,615
2 votes
2 answers
499 views

chemformula and common organic chemistry groups

What would be the proper (and efficient) way to type common organic groups/radicals/substituents like i-Pr, n-Bu or t-Bu with chemformula (the main concern is the prefixes)? So far I tried the ...
  • 2,615
2 votes
1 answer
315 views

How to adjust the parentheses size in acro package?

I'm using the acro package for my acronyms. Some of these acronyms are mathematics and chemical formulas. The acro package put the acronym in the text using first the long form and then, between ...
4 votes
1 answer
259 views

Label containing siunitx syntax below an arrow in chemformula gives an error

When using the following code everything works just fine: \documentclass{article} \usepackage{siunitx} \usepackage[modules=all]{chemmacros} \begin{document} \ch{!(colorless)( VO3- ) ->[\SI{-0....
  • 2,615
3 votes
2 answers
294 views

How can I write bond labels with chemformula?

I want to reproduce this scheme in P. J. Flory's first book, p. 319: for which I need to typeset labels under the bonds. I tried to make bonds accept labels like arrows do, first with the pretty ...
  • 1,467
3 votes
2 answers
701 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 ...
  • 31
4 votes
1 answer
321 views

Non-stoichiometric equations using chemformula (chemmacros)

Upon trying to do this non-stoichiometric reaction using chemmacros; \documentclass[a4paper,12pt]{article} \usepackage{chemmacros} \chemsetup{modules=all} \usepackage{chemgreek} \usepackage{siunitx}...
4 votes
1 answer
1k views

Problem with chemistry packages

I have been using \usepackage{mhchem} to write chemical equations. Now I want to use also \usepackage{chemformula}. But when I use the second package it appears that LaTeX doesn't understand the ...
user avatar
3 votes
1 answer
247 views

Enable hyphenation only for chemmacros

I am writing my thesis with XeLaTex. Since hyphenation is uncommon/discouraged in our theses I switched it off by using the hyphenat package. Unfortunately, this also prevents line breaks in very long ...
  • 403
6 votes
2 answers
683 views

Math mode in chemformula

How do i use math mode in chemformula? The first example works, including the sub- and superscript. In the second example the subscripts don't work. \documentclass[12pt,a4paper]{scrartcl} \usepackage{...
  • 537
2 votes
0 answers
82 views

Overful hbox with chemformula

Chemical formulae often give overful hboxes. How do I prevent that, and I mean something more automatic than just adding a \linebreak everywhere where this is an issue? Should not Latex put a box (...
  • 537
2 votes
2 answers
972 views

Writing an equation without italic font - chemistry packages

I am dealing with two issues: First i need to write chemistry expressions like the one shown below not with italic but with upright font. Second i want to know if there is any useful chemistry ...
user avatar