chemfig Mechanism Samples: Multi-Step Mechanisms, Curly Arrows and Radical Fish-Hooks
Short answer: below are five complete mechanisms written in chemfig: two radical chain reactions drawn with one-electron fish-hooks and three polar mechanisms drawn with two-electron curly arrows. Each one is a .tex file you can download and compile with pdflatex (run it twice). To change one, paste the file onto the MolDraw canvas, edit it with the mouse, and choose Download → chemfig (.tex).
The five samples
| Radical chlorination of methane | Initiation, two propagation steps and termination, under step headings. Homolysis, fish-hooks that meet in a new bond. radical-chlorination-of-methane.tex |
|---|---|
| Anti-Markovnikov addition of HBr | The peroxide effect in four steps: peroxide homolysis, bromine atom formation, addition to propene and H abstraction. Radical dots on skeletal carbons. anti-markovnikov-hbr-addition.tex |
| Base-catalysed aldol addition | Enolate formation (equilibrium), C–C bond formation and protonation. Arrows from charges and π bonds. base-catalysed-aldol-addition.tex |
| E1 dehydration of tert-butanol | One scheme that wraps over four rows, with conditions over each arrow and a carbocation. e1-dehydration-of-tert-butanol.tex |
| Bromination of benzene | Electrophilic aromatic substitution through the σ-complex, with a catalyst over the arrow. bromination-of-benzene.tex |
Each step below has three parts: its chemfig code (use the Copy button), the PDF that pdflatex makes from that code, and the drawing MolDraw makes when you paste the same code. Both pictures are made from exactly the code shown, so you can check that a paste gives you the layout, spacing and curly arrows of the PDF.
How curly arrows are written in chemfig
chemfig draws arrows between atoms with TikZ, in three parts:
- Name the ends. Put
@{a1}in front of an atom, or inside a bond's options (-[@{b1}:0]), to give it a name. - Draw in
\chemmove. After the scheme,\chemmove{ \draw[…] (a1) to[bend left=50] (a2); }draws the arrow from one name to the other. - Compile twice. chemfig saves the positions of the named atoms in the first run and uses them in the second.
The samples use these rules, which match how the arrows look on the MolDraw canvas:
| Two electrons | A full arrow head: -{Stealth[length=4pt,inset=1.5pt]}. |
|---|---|
| One electron | A fish-hook, which is half an arrow head: -{Straight Barb[left,length=4pt]}. [left] or [right] keeps only the barb on the outside of the curve. |
| Where the tail starts | On the lone pair, the negative charge, the radical dot or the middle of the bond that gives the electrons. [shift={(…em,…em)}] moves the tail from the atom's centre to that spot. |
| Where the head stops | Just short of the atom that receives the electrons, or between two atoms when a new bond forms. |
| Scale | \setchemfig{atom sep=2.5em, …} sets the bond length. Every shift in em is measured against it, so keep the line when you copy code. |
| Curve | bend left / bend right with an angle, plus looseness for deep curves. The angle is relative to the line between the ends, so the curve keeps its shape if chemfig spaces the scheme differently from the canvas. |
All five files load the same two lines, which you also need if you copy the code into your own document:
\usepackage{chemfig}
\usetikzlibrary{arrows.meta,decorations.pathmorphing}
1. Radical chlorination of methane
The standard first example of a radical chain reaction, in four steps:
- Initiation: light breaks the Cl–Cl bond evenly (homolysis). Two fish-hooks leave the bond, one to each chlorine.
- Propagation 1: a chlorine atom takes a hydrogen from methane. One electron from Cl• and one from the C–H bond form the new H–Cl bond; the other C–H electron stays on carbon as the methyl radical.
- Propagation 2: the methyl radical takes a chlorine atom from Cl2 and gives back Cl•, which starts the cycle again.
- Termination: two radicals pair up, here CH3• and Cl•.
Each step is its own \schemestart … \schemestop. The termination step shows the part that is hardest to write by hand: two fish-hooks that meet in the middle of the bond they make.
Initiation
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{@{a1}Cl-[@{b1}:0]@{a2}Cl}
\arrow{->[h$\nu$]}
\chemfig{\charge{90=\.}{Cl}}
\+
\chemfig{\charge{90=\.}{Cl}}
\schemestop
\chemmove{
\draw[-{Straight Barb[left,length=4pt]}]([shift={(0.25em,-0.27em)}]b1) to[bend left=77,looseness=1.4] ([shift={(0.23em,-0.63em)}]a1);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(-0.25em,0.27em)}]b1) to[bend left=77,looseness=1.4] ([shift={(-0.23em,0.63em)}]a2);
}
Propagation 1: hydrogen abstraction
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{@{a1}\charge{90=\.}{Cl}}
\+
\chemfig{@{a2}H-[@{b1}:0]@{a3}CH_3}
\arrow{->}
\chemfig{HCl}
\+
\chemfig{\charge{90=\.}{C}H_3}
\schemestop
\chemmove{
\path (a2) -- (a1) coordinate[pos=0.5] (m1);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(0em,1.71em)}]a1) to[bend left=65,looseness=1.2] ([shift={(0em,1.64em)}]m1);
\path (a2) -- (a1) coordinate[pos=0.5] (m2);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(0em,-0.33em)}]b1) to[bend left=57,looseness=1.1] ([shift={(0em,-1.64em)}]m2);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(-0.45em,0.33em)}]b1) to[bend left=65,looseness=1.2] ([shift={(-0.83em,0.78em)}]a3);
}
Propagation 2: chlorine transfer
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{@{a1}\charge{90=\.}{C}H_3}
\+
\chemfig{@{a2}Cl-[@{b1}:0]@{a3}Cl}
\arrow{->}
\chemfig{H_3C-[:0]Cl}
\+
\chemfig{\charge{90=\.}{Cl}}
\schemestop
\chemmove{
\path (a2) -- (a1) coordinate[pos=0.5] (m1);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(-0.55em,1.36em)}]a1) to[bend left=57,looseness=1.1] ([shift={(0em,0.87em)}]m1);
\path (a2) -- (a1) coordinate[pos=0.5] (m2);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(0em,-0.27em)}]b1) to[bend left=57,looseness=1.1] ([shift={(0em,-0.87em)}]m2);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(-0.45em,0.27em)}]b1) to[bend left=77,looseness=1.4] ([shift={(-0.23em,0.63em)}]a3);
}
Termination
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{@{a1}\charge{90=\.}{C}H_3}
\+
\chemfig{@{a2}\charge{90=\.}{Cl}}
\arrow{->}
\chemfig{H_3C-[:0]Cl}
\schemestop
\chemmove{
\path (a2) -- (a1) coordinate[pos=0.58] (m1);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(-0.55em,1.36em)}]a1) to[bend left=57,looseness=1.1] ([shift={(0em,0em)}]m1);
\path (a1) -- (a2) coordinate[pos=0.5] (m2);
\draw[-{Straight Barb[right,length=4pt]}]([shift={(0em,1.37em)}]a2) to[bend right=57,looseness=1.1] ([shift={(0em,1.31em)}]m2);
}
In the termination code, the \path … coordinate lines make a point between the two radicals. Because it is a fraction of the distance between them, the fish-hooks still meet in the gap if you change + sep left or the bond length. A fixed offset from one atom would miss the gap as soon as the spacing changes.
The radical dots are written with \charge{90=\.}{Cl}: a single electron at 90°, above the atom. For CH3• the dot goes on the carbon, \charge{90=\.}{C}H_3, not on the whole group.
2. Anti-Markovnikov addition of HBr (peroxide effect)
With a peroxide present, HBr adds to propene the "wrong" way round: bromine ends up on the end carbon. The reason is that the chain is carried by Br•, which adds where it leaves the more stable secondary radical.
- Initiation 1: di-tert-butyl peroxide splits at the weak O–O bond.
- Initiation 2: the tert-butoxyl radical takes H from HBr and frees Br•.
- Propagation 1: Br• adds to the CH2 end of the C=C. One π electron goes to the new C–Br bond and the other stays on the middle carbon.
- Propagation 2: that secondary radical takes H from HBr, gives 1-bromopropane and makes Br• again.
Initiation: peroxide homolysis
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{-[:23](-[:-69]@{a2}O-[@{b1}:-3]@{a1}O-[:-52](-[:43])(-[:-75])-[:-161])(-[:47])-[:133]}
\arrow{->[h$\nu$ or $\Delta$]}[,1.3]
\chemfig{\charge{90=\.}{O}-[:-12](-[:-36])(-[:82])-[:-122]}
\+
\chemfig{\charge{90=\.}{O}-[:-12](-[:-36])(-[:82])-[:-122]}
\schemestop
\chemmove{
\draw[-{Straight Barb[left,length=4pt]}]([shift={(-0.24em,0.28em)}]b1) to[bend left=77,looseness=1.4] ([shift={(-0.23em,0.62em)}]a1);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(0.24em,-0.28em)}]b1) to[bend left=77,looseness=1.4] ([shift={(0.23em,-0.62em)}]a2);
}
Initiation: bromine atom formation
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{@{a1}\charge{90=\.}{O}-[:-12](-[:-36])(-[:82]@{a3})-[:-122]}
\+
\chemfig{@{a2}H-[@{b1}:0,0.8]@{a4}Br}
\arrow{->}
\chemfig{HO-[:-12](-[:-36])(-[:82])-[:-122]}
\+
\chemfig{\charge{90=\.}{Br}}
\schemestop
\chemmove{
\path (a2) -- (a3) coordinate[pos=0.7] (m1);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(0em,1.36em)}]a1) to[bend left=65,looseness=1.2] ([shift={(-0.08em,-0.19em)}]m1);
\path (a2) -- (a1) coordinate[pos=0.5] (m2);
\draw[-{Straight Barb[right,length=4pt]}]([shift={(0em,0.27em)}]b1) to[bend right=57,looseness=1.1] ([shift={(0em,0em)}]m2);
\draw[-{Straight Barb[right,length=4pt]}]([shift={(-0.36em,-0.27em)}]b1) to[bend right=77,looseness=1.4] ([shift={(-0.11em,-0.63em)}]a4);
}
Propagation 1: Br• adds to the less substituted carbon
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{@{a1}\charge{90=\.}{Br}}
\+
\chemfig{@{a2}=[@{b1}:0]@{a3}-[:-60]}
\arrow{->}
\chemfig{-[:0]\charge{90=\.}{}-[:-60]-[:0]Br}
\schemestop
\chemmove{
\path (a2) -- (a1) coordinate[pos=0.5] (m1);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(0em,1.37em)}]a1) to[bend left=65,looseness=1.2] ([shift={(-0.12em,0.87em)}]m1);
\path (a2) -- (a1) coordinate[pos=0.5] (m2);
\draw[-{Straight Barb[right,length=4pt]}]([shift={(0em,0.48em)}]b1) to[bend right=57,looseness=1.1] ([shift={(-0.12em,0.87em)}]m2);
\draw[-{Straight Barb[right,length=4pt]}]([shift={(-0.45em,-0.48em)}]b1) to[bend right=65,looseness=1.2] ([shift={(-0.44em,-0.53em)}]a3);
}
Propagation 2: hydrogen abstraction from HBr
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{-[:0]@{a1}\charge{90=\.}{}-[:-60]-[:0]Br}
\+
\chemfig{@{a2}H-[@{b1}:0,0.8]@{a3}Br}
\arrow{->}
\chemfig{-[:0]-[:-60]-[:0]Br}
\+
\chemfig{\charge{90=\.}{Br}}
\schemestop
\chemmove{
\path (a2) -- (a1) coordinate[pos=0.58] (m1);
\draw[-{Straight Barb[left,length=4pt]}]([shift={(0em,1.36em)}]a1) to[bend left=57,looseness=1.1] ([shift={(0em,0em)}]m1);
\path (a2) -- (a1) coordinate[pos=0.5] (m2);
\draw[-{Straight Barb[right,length=4pt]}]([shift={(0em,0.27em)}]b1) to[bend right=57,looseness=1.1] ([shift={(0.05em,0.43em)}]m2);
\draw[-{Straight Barb[right,length=4pt]}]([shift={(-0.36em,-0.27em)}]b1) to[bend right=77,looseness=1.4] ([shift={(-0.11em,-0.63em)}]a3);
}
The radical in propagation 2 sits on a skeletal carbon, which has no letter to hang a dot on. chemfig handles this with \charge{90=\.}{}: \charge on an empty atom, so the bonds still meet at the vertex.
A fish-hook can start on a bond as well as on a dot. In propagation 1 the arrows start on the C=C bond, named with =[@{b3}:0].
3. Base-catalysed aldol addition
A polar mechanism with two-electron arrows, in three steps:
- Hydroxide removes an α-hydrogen from acetone to give the enolate. This step is an equilibrium (
\arrow{<=>}). - The enolate carbon attacks the carbonyl carbon of acetaldehyde, and the C=O π electrons move onto oxygen.
- The alkoxide takes a proton from water, giving the β-hydroxy ketone and hydroxide again.
1. Enolate formation
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{@{a1}HO^{-}}
\+
\chemfig{-[:0](-[:-60]@{a3}-[@{b1}:0,0.8]@{a2}H)=[:60]O}
\arrow{<=>}
\chemfig{-[:0](-[:-60]\charge{300:4pt=$\scriptstyle-$}{})=[:60]O}
\+
\chemfig{H_2O}
\schemestop
\chemmove{
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(1.88em,0em)}]a1) to[bend right=47] ([shift={(-0.69em,-0.4em)}]a2);
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(0.2em,0.27em)}]b1) to[bend right=65,looseness=1.2] ([shift={(0.17em,0.47em)}]a3);
}
2. Nucleophilic addition to the aldehyde
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{-[:0](-[:-60]@{a1}\charge{300:4pt=$\scriptstyle-$}{})=[:60]O}
\+
\chemfig{@{a3}O=[@{b1}:60]@{a2}-[:0]}
\arrow{->}
\chemfig{O=[:0](-[:-60])-[:60]-[:0](-[:60])-[:-60]O^{-}}
\schemestop
\chemmove{
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(0.39em,1.07em)}]a1) to[bend left=57,looseness=1.1] ([shift={(-0.65em,0.38em)}]a2);
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(0.64em,0.15em)}]b1) to[bend left=77,looseness=1.4] ([shift={(0.64em,0em)}]a3);
}
3. Protonation of the alkoxide
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{O=[:0](-[:-60])-[:60]-[:0](-[:60])-[:-60]@{a1}O^{-}}
\+
\chemfig{@{a3}HO-[@{b1}:90,0.8,2]@{a2}H}
\arrow{->}
\chemfig{O=[:0](-[:-60])-[:60]-[:0](-[:60])-[:-60]OH}
\+
\chemfig{HO^{-}}
\schemestop
\chemmove{
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(0.62em,1.07em)}]a1) to[bend left=40] ([shift={(-0.72em,0.26em)}]a2);
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(0.27em,0.36em)}]b1) to[bend left=77,looseness=1.4] ([shift={(1.01em,0.11em)}]a3);
}
Every arrow here has a full head. Each step has two arrows: one makes a bond, and one breaks a bond and takes its electrons onto an atom. The second kind starts on the bond (b1) and ends on the atom.
The enolate's negative charge sits on a skeletal carbon. It is written the same way as the radical in sample 2, with \charge on an empty atom, so the bond is not cut short around a "−" label.
4. E1 dehydration of tert-butanol: one scheme over several rows
The first three samples put each step under its own heading. You can also draw the whole mechanism as one continuous scheme that wraps onto new rows, as in many textbooks:
- The OH group takes a proton from H3O+.
- Water leaves and gives the tert-butyl cation. This is the slow step.
- Water removes a proton from the carbon next to C+, and the C–H electrons form the C=C bond of 2-methylpropene.
In chemfig each row is a separate scheme that begins with its arrow, so the conditions stay with the arrow they belong to:
The whole scheme
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
{\centering \textbf{Acid-catalysed dehydration of tert-butanol (E1)}\par}
\par\bigskip
\vspace{0.9em}
\schemestart
\chemfig{@{a1}H\charge{90=\:,-90=\:}{O}-[:-12](-[:-36])(-[:82])-[:-122]}
\+
\chemfig{@{a3}H_2O^{+}-[@{b1}:90,0.8,2]@{a2}H}
\schemestop
\par\bigskip
\schemestart
\arrow{->[protonation]}[,1.6]
\chemfig{@{a4}H_2O^{+}-[@{b2}:-12](-[:-36])(-[:82])-[:-122]}
\+
\chemfig{H_2O}
\schemestop
\par\bigskip
\schemestart
\arrow{->[$-$H$_{2}$O][slow]}
\chemfig{-[:0]\charge{120:4pt=$\scriptstyle+$}{}(-[@{b4}:-60]-[@{b3}:0,0.8]@{a6}H)-[:60]}
\+
\chemfig{@{a5}H_2\charge{90=\:,-90=\:}{O}}
\schemestop
\par\vspace{1.2em}
\par\bigskip
\schemestart
\arrow{->[$-$H$^{+}$]}
\chemfig{-[:0](=[:-60])-[:60]}
\+
\chemfig{H_3O^{+}}
\schemestop
\chemmove{
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(0.37em,1.21em)}]a1) to[bend left=40] ([shift={(-0.67em,0.56em)}]a2);
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(0.27em,0.36em)}]b1) to[bend left=77,looseness=1.4] ([shift={(1.19em,0.11em)}]a3);
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(0.19em,-0.31em)}]b2) to[bend left=77,looseness=1.4] ([shift={(0.66em,-0.63em)}]a4);
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(0.55em,-1.21em)}]a5) to[bend left=47] ([shift={(0.69em,-0.4em)}]a6);
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(0em,0.27em)}]b3) to[bend right=77,looseness=1.4] ([shift={(0.08em,0.33em)}]b4);
}
Two details worth copying:
[,1.6]makes the arrow 1.6 times its normal length, so the word protonation fits above it instead of running into the next structure.- The carbocation is
\charge{120:4pt=$\scriptstyle+$}{}: a small "+" 4 pt from the vertex, in the widest gap between the bonds.
5. Electrophilic bromination of benzene
Benzene's π electrons attack bromine (activated by FeBr3) to give the σ-complex. Bromide then removes the proton from the sp3 carbon, and the C–H electrons restore the aromatic ring.
Download bromination-of-benzene.tex1. Attack on bromine (σ-complex)
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{?[a]-[:90]=_[@{b1}:30]-[:-30]=_[:-90]-[:-150]?[a,{=_}]}
\+
\chemfig{@{a1}Br-[@{b2}:0]@{a2}Br}
\arrow{->[FeBr$_{3}$]}[,1.1]
\chemfig{?[a]=_[:90]-[:30](-[:90]Br)-[:-30]\charge{30:4pt=$\scriptstyle+$}{}-[:-90]=_[:-150]?[a]}
\+
\chemfig{Br^{-}}
\schemestop
\chemmove{
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(-0.13em,0.23em)}]b1) to[bend left=74,looseness=1.34] ([shift={(-0.13em,0.73em)}]a1);
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(-0.25em,-0.27em)}]b2) to[bend right=77,looseness=1.4] ([shift={(-0.23em,-0.63em)}]a2);
}
2. Loss of H⁺ restores the ring
\setchemfig{atom sep=2.5em, + sep left=0.7em, + sep right=0.7em, compound sep=4em, arrow offset=6pt}
\schemestart
\chemfig{?[a]=_[:90]-[:30](-[:90]Br)(-[@{b2}:-30]\charge{30:4pt=$\scriptstyle+$}{}-[:-90]=_[:-150]?[a])-[@{b1}:30,0.8]@{a2}H}
\+
\chemfig{@{a1}Br^{-}}
\arrow{->}
\chemfig{?[a]-[:90]=_[:30](-[:90]Br)-[:-30]=_[:-90]-[:-150]?[a,{=_}]}
\+
\chemfig{HBr}
\schemestop
\chemmove{
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(-1.55em,0em)}]a1) to[bend right=51] ([shift={(0.73em,0.13em)}]a2);
\draw[-{Stealth[length=4pt,inset=1.5pt]}]([shift={(-0.04em,-0.33em)}]b1) to[bend left=51] ([shift={(0.51em,-0.02em)}]b2);
}
Rings are written with absolute bond angles and hooks (?[a]) rather than *6(…), so each ring has exactly the orientation it has on the canvas and every ring bond can carry an @{…} name for an arrow. The subscript in FeBr3 is typed as FeBr₃ in MolDraw and exported as FeBr$_{3}$.
Make your own mechanism
- Draw the species and reaction arrows in the MolDraw editor, or start from one of these files: open it, copy everything and paste it onto the canvas with Ctrl+V.
- Pick the curly arrow tool. Drag from a lone pair, charge, radical dot or bond to the atom or bond that receives the electrons. For one-electron steps choose Fishhook (1e⁻) in the arrow options.
- Add step headings with the text tool, above each row.
- Choose Download → chemfig (.tex), or Copy as chemfig (LaTeX) to paste the code into your own document.
- Compile twice.
You can also ask the AI assistant in the editor, for example: “Draw the radical bromination of toluene at the benzylic position with fish-hook arrows, initiation, propagation and termination under headings.” It draws the steps on the canvas, and you can export them the same way.
When you paste chemfig back in, MolDraw reads which atom or bond each \chemmove arrow starts and ends on, whether it has a full head or a fish-hook, the side its bend curves to and how deep the curve is. A head that ends on a \path … coordinate point between two atoms becomes a bond-forming arrow, so fish-hooks meet in the gap again. The spacing comes from \setchemfig (atom sep, compound sep, + sep left/right, arrow offset), and text and lines are drawn in a LaTeX-like serif at chemfig's thin line width. MolDraw still fits each arrow to its own rules, so a hand-written \draw does not have to be perfect.
Adjusting the exported code by hand
- Flatter or deeper curve: change the bend angle (
bend left=40instead of57), or removelooseness. - Curve on the other side: swap
bend leftandbend right. For a fish-hook, swap[left]and[right]in the tip as well, so the barb stays outside. - Move a tail or head: edit the
shiftin em.(0em,1em)is 1 em above the atom's centre. - Where fish-hooks meet: change
pos=0.58.0.5is exactly half-way between the two atoms. - Room above a row: the
\vspace{…em}before each scheme leaves space for arrows that bow upward. Make it larger if an arrow touches the heading.
Questions and answers
How do I draw a fish-hook arrow in chemfig?
Name the two ends with @{…} and draw the arrow in \chemmove with a half arrow tip: \draw[-{Straight Barb[left,length=4pt]}] (a1) to[bend left=50] (a2); Use [left] or [right] so the barb sits on the outside of the curve. Load the TikZ library arrows.meta.
How do I make two fish-hooks meet in the middle of a new bond?
Make a point between the two atoms with \path (a1) -- (a2) coordinate[pos=0.5] (m1); inside \chemmove, then end both fish-hooks at (m1). The point moves with the atoms however chemfig spaces the scheme.
How do I put a radical dot on a skeletal carbon in chemfig?
Use \charge on an empty atom: \charge{90=\.}{}. The bonds still meet at the vertex and the dot sits above it. For a labelled atom write \charge{90=\.}{Cl}.
Why are the curly arrows in the wrong place in my PDF?
\chemmove uses positions saved in the first LaTeX run. Compile the file a second time.
Can I edit these samples?
Yes. Open the .tex file, copy its contents and paste them onto the MolDraw canvas. Change the structures or arrows with the mouse, then download chemfig (.tex) again.
Are the samples free to use?
Yes. Use them in notes, problem sets, theses and papers.