chemfig
Reaction schemes
4 Compounds names¶
Automatic naming of compounds (“c1”, “c2”, etc.) can be overridden. For this, the \arrow command must be immediately followed by an argument in parentheses. The argument is of the form: (n1--n2). The compounds located at the beginning and at the end of the arrow are named “n1” and “n2”, respectively. Any alphanumeric string can be used. The numbering of the names "c<n>" continues internally, so if a compound has a different name than the default one, it does not affect the default name of the subsequent compounds.
Names are optional, and the argument can be either (n1--) and (--n2).
\setchemfig{scheme debug=true}
\schemestart
A\arrow(aa--bb)B\arrow(--cc)C\arrow(--dd)D\arrow E
\schemestop
\bigskip
\schemestart
A\arrow(aa--)B\arrow(bb--)C\arrow(cc--dd)D\arrow E
\schemestop
Note that both methods are equivalent. Therefore, compounds can either be named by arrows preceding or following them. However, when a compound is surrounded by two arrows specifying its name, the first name is ignored and a warning message is generated:
\setchemfig{scheme debug=true}
\schemestart
A\arrow(--foo)B\arrow(bar--)C
\schemestop
Here compound “B” is called “foo” by the arrow pointing at it, and “bar” by the arrowing leaving from it. Thus chemfig generates a warning mentioning that the name "foo" will be ignored:
Package chemfig Warning: two names for the same node, first name "foo" ignored