2

I was trying to produce a reaction scheme with chemfig, but when I use the \setchemfig command I get the error message:

Undefined control sequence \setchemfig

Here's my code:

\documentclass[12pt,letterpaper]{article}
\usepackage[utf8]{inputenc}
\usepackage{chemfig}

\begin{document}
\setchemfig{arrow angle=15}
\schemestart
  \chemfig{HO-[0]-[:-30](-[:-150]-[4]HO)(-[:30]-[0]OH)-[:-30]-OH}\arrow
\schemestop
\end{document}

Any help/insight is appreciated.

  • 1
    Do you actually have version 1.3 installed? Older version have different commands. – TeXnician Aug 3 '18 at 14:47
  • 1
    On my side it is working without errors. With version 1.31 – BambOo Aug 3 '18 at 14:49
  • 3
    Welcome to TeX.SX! This is a version problem. The command \setchemfig does not yet exist in your version of chemfig. Either upgrade the package (how to do that depends on your TeX environment), or use the commands of your chemfig version; try something like \setarrowdefault{15}. See the docs of your old version of chemfig. – gernot Aug 3 '18 at 15:22
  • @A. Finlay what is the name of your chemical structure HO-[0]-[:-30](-[:-150]-[4]HO)(-[:30]-[0]OH)-[:-30]-OH? – Sebastiano Aug 3 '18 at 19:29
  • I was indeed using an older version. I'm using TexLive and updated from 2017 to 2018, this solved the problem. Thank you! – A. Finlay Aug 4 '18 at 19:47
1

The problem was because I was using an older version. In my case this was solved by updating from TexLive 2017 to 2018.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.