summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mychemistry/mychemistry_en.tex
blob: 1036d2039242d07f0c182f9e0dae056add3e6faf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ------------------------------------------------------------------------------------- %
% - myChemistry - mychemistry_en.tex -------------------------------------------------- %
% - Creating reaction schemes with LaTeX and ChemFig ---------------------------------- %
% ------------------------------------------------------------------------------------- %
% - Clemens Niederberger -------------------------------------------------------------- %
% - 2011/04/15 ------------------------------------------------------------------------ %
% ------------------------------------------------------------------------------------- %
% - http://www.niederberger-berlin.net/2011/02/latex-mychemistry/ --------------------- %
% - kontakt@niederberger-berlin.net --------------------------------------------------- %
% ------------------------------------------------------------------------------------- %
% - If you have any ideas, questions, suggestions or bugs to report, please feel free - %
% - to contact me. -------------------------------------------------------------------- %
% ------------------------------------------------------------------------------------- %
% - Copyright 2011 Clemens Niederberger                                               - %
% -                                                                                   - %
% - This work may be distributed and/or modified under the                            - %
% - conditions of the LaTeX Project Public License, either version 1.3                - %
% - of this license or (at your option) any later version.                            - %
% - The latest version of this license is in                                          - %
% -   http://www.latex-project.org/lppl.txt                                           - %
% - and version 1.3 or later is part of all distributions of LaTeX                    - %
% - version 2005/12/01 or later.                                                      - %
% -                                                                                   - %
% - This work has the LPPL maintenance status `maintained'.                           - %
% -                                                                                   - %
% - The Current Maintainer of this work is Clemens Niederberger.                      - %
% -                                                                                   - %
% - This work consists of the files mychemistry.sty, mychemistry_de.tex,              - %
% - mychemistry_en.tex and bondwidth.tex                                              - %
% ------------------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[DIV10,titlepage,toc=index]{scrartcl}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Pakete ---------------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{etoolbox}
\usepackage{scrhack}                             % verbessert KOMAs Zusammenspiel mit floats
\usepackage{emerald}                             % chemfig-Schrift
\usepackage[utf8x]{inputenc}                     % Zeichenkodierung: Eingabe
\usepackage[T1]{fontenc}                         % Text-Ausgabe-Codierung
\usepackage{textcomp,mathcomp}
\usepackage[makeindex]{splitidx}                 % Index; Kompilieren: makeindex -sl index.ist *.idx
\usepackage[english]{babel}                      % Sprache
\usepackage{xspace,paralist}                     % xspace und Listen
\usepackage{siunitx}
  \DeclareSIUnit{\emlength}{em}
  \DeclareSIUnit{\pt}{pt}
\usepackage{listings,fancyvrb}                   % wortwörtliche Anzeige
  \newcommand{\vitem}[1][]{\SaveVerb[aftersave={\item[\textnormal{\UseVerb[#1]{vsave}}]}]{vsave}}
\usepackage[perpage,multiple]{footmisc}          % Fußnoten
\usepackage[ngerman]{varioref}                   % flexibles Referenzieren
  \labelformat{section}{section #1}
  \labelformat{subsection}{section #1}
  \labelformat{subsubsection}{section #1}
\usepackage[dvipsnames]{xcolor}                  % Farbe
  \colorlet{code}{RawSienna}
  \xdefinecolor{MyDarkRed}{rgb}{0.4392,0.0627,0.0627}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Anzeige des Inhaltsverzeichnisses ------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{titletoc}
\titlecontents{section} [6.5pc]                                      % SECTION-ANZEIGE
   {\renewcommand\familydefault{ppl}\addvspace{2pc}\bfseries
    \color{MyDarkRed}\titlerule[2pt]\filright\normalcolor\nobreak}     % davor
   {\contentslabel
      [\textsc{Section}\
       \thecontentslabel]{6.5pc}}                                    % nummerierter Eintrag
   {\hspace{-6.5pc}\scshape\thecontentslabel}                        % unnummerierter Eintrag
   {\hfill\contentspage}
   [\addvspace{3pt}\renewcommand\familydefault{ppl}]                 % danach
%%
\newcommand{\xquad}{\hspace{1em plus.4em minus.4em}}
\titlecontents*{subsubsection}[6pc]                                  % SUBSUBSECTION-ANZEIGE
   {\footnotesize\itshape}
   {}
   {}
   {,~\thecontentspage}
   [\xquad\textbullet\xquad]
   {}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Hyperlinks ------------------------------------------------------------------------ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}
  \hypersetup{colorlinks=true,                   % Setup der Hyperlinks und des pdf
              linkcolor=green!50!black,
              urlcolor=blue!70,
              plainpages=false,
              bookmarksopen=true,
              bookmarksopenlevel=2,
              bookmarksnumbered=true,
              pdfstartview=FitH,
              pdfauthor={Clemens Niederberger},
              pdftitle={myChemistry - english documentation},
              pdfsubject={Creating reactionschemes with LaTeX},
              pdfkeywords={myChemistry},
              pdfcreator={LaTeX}
  }
\usepackage[english,color=MyDarkRed]{mychemistry} % myChemistry
  \renewcommand\thebeispiel{\arabic{beispiel}}   % chemexec angepasst
  \labelformat{beispiel}{example #1}
  \labelformat{rxnfloat}{scheme #1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Listings anpassen ----------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fvset{numbers=left,numbersep=3pt,xleftmargin=20pt,gobble=0,numberblanklines=true}
\lstset{literate={ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 {ß}{{\ss}}1}
\lstset{
   language=[LaTeX]TeX,
   basicstyle={\ttfamily},                       % Grundstil
   extendedchars=true,
   numbers=left,                                 % Zeilennummern
   numberstyle=\tiny,                            % Größe des Zeilennummern
   numberblanklines=true,                        % Leerzeilen nummerieren
   gobble=0,                                     % das erste Leerzeichen abschneiden
   xleftmargin=20pt,                             % Einrückung links
   breaklines=true,                              % Zeilenumbruch
   moredelim=[is][\color{red!25!purple}]{!!}{!!},% Hervorhebung
   commentstyle={\color[named]{Gray}},
   emph={begin,end},                             % Umgebungen hervorheben
   emphstyle=\color{red},
   keywordstyle=\color{code},
   keywordstyle=[20]\color{blue},
   morekeywords=[20]{rxn,rxnfloat,rxnscheme,tikzpicture},
   texcsstyle=[30]\color{code},
   moretexcs=[30]{anywhere,arrow,branch,chemabove,chemand,chembelow,chemfig,chemmove,chemname,chemrel,chemsign,ce,color,compound,declarecompound,draw,dummy,elmove,floatplacement,floatstyle,Hpl,Hyd,lewis,listof,makeinvisible,makevisible,marrow,mCsetup,merge,mesomeric,node,nu,om,op,ox,pgfpositionnodelater,reactant,restylefloat,setarrowlength,setarrowline,setatomsep,setatomsize,setbondlength,setbondshape,setbondwidth,setcrambond,setmergelength,setrcndist,setrxnalign,setschemealign,setschemename,si,SI,textcolor,transition},
   fancyvrb=true
   }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Kopf- und Fußzeile ---------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{scrpage2}
\pagestyle{scrheadings}
\setheadwidth{textwithmarginpar}
\automark{section}
\ihead{\mC v\mCversion}
\ifoot{\small\color{gray}-~page~\thepage~-}
\cfoot{}
\ofoot{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Komascript ------------------------------------------------------------------------ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setkomafont{disposition}{\rmfamily\bfseries}    % Gewicht fett und Schriftart roman

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - neue Befehle ---------------------------------------------------------------------- %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Hyperlinks in Listings ------------------------------------------------------------ %
% - auf Basis von Code usenet: comp.text.tex ------------------------------------------ %
\makeatletter
\AtBeginEnvironment{VerbatimOut}{\let\lsthk@OutputBox\lsthk@OutputBox@H@@k\let\lstbasicfont\footnotesize}
\AtBeginEnvironment{Verbatim}{\let\lsthk@OutputBox\lsthk@OutputBox@H@@k\let\lstbasicfont\footnotesize}
\AtBeginEnvironment{SideBySideExample}{\let\lsthk@OutputBox\lsthk@OutputBox@H@@k\let\lstbasicfont\footnotesize}
\AtBeginDocument{\preto\FV@VerbatimBegin{\let\lsthk@OutputBox\lsthk@OutputBox@H@@k\let\lstbasicfont\footnotesize}}
\AtBeginDocument{\preto\FV@VerbatimBegin{\let\lsthk@OutputBox\lsthk@OutputBox@H@@k\let\lstbasicfont\footnotesize}}
\providerobustcmd*\ifrefundefined [1]{%
  \begingroup%
    \csname @safe@activestrue\endcsname%
    \expandafter\endgroup\csname @\ifcsname r@#1\endcsname second\else first\fi oftwo\endcsname
}% \ifrefundefined
\def\lsthk@OutputBox@H@@k{%
    \begingroup%
      \let\lst@UM\@empty%
      \edef\@tempc{ssec:\detokenize\expandafter{\the\lst@token }}%\edef
      \ifrefundefined{\@tempc}%
    \endgroup%
    \sethyperlistings%
}% \lsthk@OutputBox@fcltxH@@k
\def\sethyperlistings {\global\let \hyperlistingsreference =\@tempc
     \endgroup \aftergroup \dohyperlistings }% after \hbox
\def\dohyperlistings {\def\lst@alloverstyle ##1{\hyperlistings ##1}}
\def\hyperlistings{%
    \setbox\@tempboxa\hbox%
    \bgroup%
      \rlap{\hypersetup {linkcolor=.}\relax\fboxrule\z@%
      \hyperref[\hyperlistingsreference]{\boxframe{\wd\@tempboxa}{\ht\@tempboxa}{\dp\@tempboxa}}}%
      \unhbox\@tempboxa%
    \egroup%
}% \hyperlistings
\let\lsthk@OutputBox\lsthk@OutputBox@H@@k
% - Beispiele ------------------------------------------------------------------------- %
% - auf Basis der Beispiele in der fancyvrb-Dokumentation ----------------------------- %
\newcommand{\BeginExample}{%
 \VerbatimEnvironment
 \begin{VerbatimOut}[gobble=1]{\jobname.tmp}}

 \newcommand{\BelowExample}[1]{%
 \VerbatimInput[numbersep=3pt,fontsize=\footnotesize,
                  numbers=left,xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp}
#1}
% - Code, Ergebnis rechts ------------------------------------------------------------- %
\newcommand{\SideBySide@Example}[1]{%
\setlength{\parindent}{0pt}%
\begin{minipage}[c]{.48\textwidth}
 \VerbatimInput[numbersep=3pt,fontsize=\footnotesize,
                numbers=left,xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp}
\end{minipage}%
\hspace*{2mm}
\begin{minipage}[c]{.48\textwidth}
 #1
\end{minipage}
}

\def\SideBySideExample{%
 \catcode`\^^M=\active
 \@ifnextchar[{\catcode`\^^M=5\beispiel\vspace*{1mm}\SideBySideExample@}%
              {\catcode`\^^M=5\beispiel\vspace*{1mm}\SideBySideExample@@}}
\def\SideBySideExample@[#1]{#1\SideBySideExample@@}
\def\SideBySideExample@@{\BeginExample}
\def\endSideBySideExample{%
 \end{VerbatimOut}%
 \SideBySide@Example{\input{\jobname.tmp}}\vspace*{1mm}\endbeispiel}
% - Code, Ergebnis danach ------------------------------------------------------------- %
\newcommand{\@Example}[1]{%
\setlength{\parindent}{0pt}%
\begin{minipage}{\textwidth}
 \VerbatimInput[numbersep=3pt,fontsize=\footnotesize,
                numbers=left,xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp}
\end{minipage}%

\smallskip
\begin{minipage}{\textwidth}
 #1
\end{minipage}
}

\def\Example{%
 \catcode`\^^M=\active
 \@ifnextchar[{\catcode`\^^M=5\beispiel\vspace*{1mm}\Example@}%
              {\catcode`\^^M=5\beispiel\vspace*{1mm}\Example@@}}
\def\Example@[#1]{#1\Example@@}
\def\Example@@{\BeginExample}
\def\endExample{%
 \end{VerbatimOut}%
 \@Example{\input{\jobname.tmp}}\vspace*{1mm}\endbeispiel}
\makeatother

% - weitere Makros -------------------------------------------------------------------- %
\newcommand{\mC}{{\color{MyDarkRed}\sffamily my\-Chemis\-try}\xspace} % Paketname
\newcommand{\CF}{{\ECFAugie ChemFig}\xspace}     % ChemFig in der originalen Schrift
\newcommand{\eg}{\mbox{e.\,g.}\xspace}
\newcommand{\TikZ}{\mbox{Ti{\bfseries\itshape k}Z}\xspace}
\newcommand\NEU[1][0pt]{\leavevmode\llap{\footnotesize\ECFTeenSpirit\color{red}New\kern\dimexpr20pt+#1\relax}}
\newlength{\tmplength}
% - für Beispiele --------------------------------------------------------------------- %
\newcommand{\abovearrow}{\tikz\node[draw,minimum width=3em,minimum height=1.5em,blue]{\footnotesize above};}
\newcommand{\belowarrow}{\tikz\node[draw,minimum width=3em,minimum height=1.5em,red]{\footnotesize below};}
\newcommand{\substance}{\tikz\node[draw,minimum width=5em,minimum height=3em]{};}

\begin{document}
\begin{titlepage}
  % inspired by the titlepage of chemfig's documentation
  \begin{tikzpicture}[remember picture,overlay]
    \shade [color=MyDarkRed,right color=white](current page.south west) rectangle ([yshift=3cm,xshift=-3cm]current page.center);
    \shade[top color=black,bottom color=MyDarkRed]([yshift=7cm]current page.east)rectangle([yshift=2.5cm]current page.west);
    \node[text width=\textwidth,opacity=.15,yshift=-5.3cm] at (current page.center) {%
\begin{verbatim}
 \begin{rxn}[,.7]
   \setatomsep{1.5em}\footnotesize
   \reactant[,a]{
     \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
       (-[6]OH)-CH_3}
   }
   \branch[above right=of a]{
     \arrow[above right,,.7]{}{}
     \reactant[above right]{
       \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}
         \chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}
         {10:4mm}{e2}{-10:4mm}
     }
     \arrow{$-\ce{H2O}$}{}
     \reactant{
       \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C
         (-[2]CH_3)(-[6]OH)-CH_3}
     }
   }
   \branch[below right=of a]{
     \arrow[below right,-|>,.7]{}{}
     \reactant[below right]{
       \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)
         (-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}
         {170:4mm}{e4}{-170:4mm}
     }
     \arrow{$-\ce{H2O}$}{}
     \reactant{
       \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-
         \chembelow{C}{\oplus}(-[2]CH_3)-CH_3}
     }
   }
 \end{rxn}
\end{verbatim}%
};
  \end{tikzpicture}
  \begin{center}
    \scalebox{4}{\mC}\par
    \Large v\mCversion\par\bigskip
    \footnotesize\mCdate{en}\par
    \normalsize Clemens Niederberger\par\vskip1.5cm
    \color{white}\huge Creating reaction schemes with \LaTeX\ and \CF%
  \end{center}
  \vskip3cm
  \begin{rxn}[,.7]
    \setatomsep{1.5em}\footnotesize
    \reactant[,a]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[6]OH)-CH_3} }
    \branch[above right=of a]{
      \arrow[above right,,.7]{}{}
      \reactant[above right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[@{e1}6,,,2]H_2@{e2}\chembelow{O}{\oplus})-C(-[2]CH_3)(-[6]OH)-CH_3}\elmove{e1}{10:4mm}{e2}{-10:4mm} }
      \arrow{$-\ce{H2O}$}{}
      \reactant{ \chemfig{\chembelow{C}{\oplus}(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))-C(-[2]CH_3)(-[6]OH)-CH_3} }{}
    }
    \branch[below right=of a]{
      \arrow[below right,-|>,.7]{}{}
      \reactant[below right]{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-C(-[2]CH_3)(-[@{e3}6]@{e4}\chembelow{O}{\oplus}H_2)-CH_3}\elmove{e3}{170:4mm}{e4}{-170:4mm} }
      \arrow{$-\ce{H2O}$}{}
      \reactant{ \chemfig{C(-[4]*6(=-=-=-))(-[2]*6(=-=-=-))(-[6,,,2]HO)-\chembelow{C}{\oplus}(-[2]CH_3)-CH_3} }
    }
  \end{rxn}
\end{titlepage}

\tableofcontents

\section{About}
\subsection{Changes}
The most recent changes are marked with {\ECFTeenSpirit\color{red}New}.

\subsubsection{Version 1.2}
Since v1.2 there are some new features. The main part plays behind the scenes: the wrong arrow- and branch-alignments have been corrected. \textbf{Due to these changes \mC now needs Version 2.10 of \TikZ (or pgf, actually}, see \ref{ssec:voraussetzungen}).

There are some new "frontend" features as well. For one thing there are some new package options (see \ref{ssec:paketoptionen}). Additionally the arrows have got two new keys (see \ref{ssec:arrow}).

The environments have gained a few features, with which they can be customized, too (see \ref{sssec:rxn_optionen}, \ref{sssec:rxnscheme_optionen} and \ref{ssec:setrcndist}).

Last but not least since v1.2 \mC underlies LPPL version 1.3 or later.

\subsubsection{Version 1.3}
The commands \lstinline+\branch+, \lstinline+\mesomeric+, \lstinline+\reactant+ and \lstinline+\transition+ now cannot only accept alignment as optional argument but \TikZ keys as well. Also the second mandatory Argument \lstinline+<anchor>+ now is an optional one. So the first argument still is alignment, the second is the anchor name and in the third you can use arbitrary \TikZ keys.
\begin{lstlisting}
 \command[<alignment>,<anchor>,<tikz>]{}
\end{lstlisting}
Version 1.2 explicitly needed a given alignment, if one wanted to use \TikZ keys, even with default alignment. Since v\mCversion\ this isn't required any more.
\begin{lstlisting}
  % up to version 1.2:
  \reactant{\ce{Br2}}{}\arrow{$h\nu$}{}\reactant!![right,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}{}
  % since version 1.3:
  \reactant{\ce{Br2}}\arrow{$h\nu$}{}\reactant!![,,draw,inner sep=5pt]!!{\ce{2 \lewis{0.,Br}}}
\end{lstlisting}
The commands to customize \mC have been renamed and the command\linebreak\lstinline+\mCsetup+ has been added. Now you can customize \mC using only one command. See \ref{ssec:setarrowlength}, \ref{ssec:setatomsize}, \ref{ssec:setbondlength}, \ref{ssec:setbondshape} and \ref{ssec:mCsetup}.

There is the new command \lstinline+\chemand+, which produces a $+$, see \ref{ssec:chemand}.

If you're using \CF v0.4 or v0.4a, \mC inputs the file \lstinline+bondwith.tex+ which provides the command \lstinline+\setbondwidth{<width>}+ with which you can change the line thickness of bonds.

And you might find this one nice: every \mC command in a listing in this do\-cu\-mentation is a hyperlink referring to the corresponding entry in the command reference.

\subsubsection{Version \mCversion}
\NEU%
The command \lstinline+\merge+ has been rewritten. Now the arrow can be labeled.

The main purpose of the command \lstinline+\dummy+ now is obsolete. The command still exists, though.

Both environments \lstinline+rxn+ and \lstinline+rxnscheme+ have changed regarding the usage of their options, see \ref{sssec:rxn_optionen} and \ref{sssec:rxnscheme_optionen}.

The keys of the \lstinline+\arrow+ command now are options, so the syntax of the command now is consistent with the syntax of the other commands. Then there is a new arrow type, see \ref{ssec:arrow}. Also new is the appearance of the arrows and the possibility of customizing the line thickness of the arrows, see \ref{ssec:setarrowline}.

There is another new command \lstinline+\anywhere+ (\ref{ssec:anywhere}), with which text or formul\ae\ can be placed off the chain.

\subsection{Licence}
\mC v\mCversion\ underlies the The \LaTeX\ project public license\\(\url{http://www.latex-project.org/lppl.txt}).

\subsection{Requirements}\label{ssec:voraussetzungen}\index{requirements|(}
In order to function properly \mC needs some packages to be available.
\begin{description}
 \item[\CF]\index{requirements!ChemFig@\CF} without it why would you use \mC?
 \item[ifthen]\index{requirements!ifthen} for internal queries;
 \item[calc]\index{requirements!calc} for internal calculations;
 \item[xkeyval]\index{requirements!xkeyval} package options and command keys are created with this package;
 \item[float]\index{requirements!float} the \lstinline=rxnscheme= environment is defined with this package;
 \item[pgf/\TikZ]\index{requirements!pgf}\index{requirements!TikZ@\TikZ} pgf actually isn't just one package but a whole bundle. They are the basis layer for \TikZ. \mC needs at least the version from 09/08/2010\footnote{\url{http://sourceforge.net/projects/pgf/files/}}. More precisely: the command \lstinline=\pgfpositionnodelater= must exist. Even more precisely: only the \lstinline+\arrow+ key \lstinline+both+ (see \ref{ssec:arrow}) needs \lstinline=\pgfpositionnodelater=. If you don't use this option, \mC should work nicely with pgf v2.00. Older versions have not been tested.
\end{description}
\index{requirements|)}

\subsection{The Idea}
Since \CF was published August 2010, there is a flexible solution for creating organic structures. With \CF and `mhchem' one is able to create nearly all structural and molecular formulars that a chemist needs. There is one thing, though, in which `ochem' still beats \CF: creating reaction mechanisms. This is where \mC comes in.

\mC loads the packages
\begin{itemize}
 \item \CF\footnote{by Christian Tellechea, \url{http://www.ctan.org/tex-archive/macros/generic/chemfig/}}\index{ChemFig@\CF},
 \item `mhchem'\footnote{by Martin Hensel, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/mhchem/}}\index{mhchem} in version 3, when ist exists,
 \item `chemexec'\footnote{by me, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemexec/}}\index{chemexec}, when it exists, and
 \item `chemcompounds'\footnote{by Stephan Schenk, \url{http://www.ctan.org/tex-archive/macros/latex/contrib/chemcompounds/}}\index{chemcompounds}, when ist exists.
\end{itemize}
How these packages work, you can read in their documentations. Commands provided by these packages are for example
\begin{itemize}
 \item \lstinline=\ce{}= (mhchem)\index{mhchem}
 \item \lstinline=\ox{}{}=, \lstinline=\om[]=, \lstinline=\op[]=, \lstinline=\Hyd=, \lstinline=\Hpl= (chemexec)\index{chemexec}
 \item \lstinline=\chemfig[][]{}=, \lstinline=\chemrel[]{}=, \lstinline=\chemsign[]{}=, \lstinline=\lewis{}= (\CF)\index{ChemFig@\CF}
 \item \lstinline=\declarecompound[]{}=, \lstinline=\compound{}= (chemcompounds)\index{chemcompounds}.
\end{itemize}
Some of these commands are used in the examples of this documentation \textit{without being mentioned explicitly}.

Above all, \mC provides commands for creating reaction mechanisms.

\section{Usage}
\subsection{Background}
\mC provides two environments within which the mechanisms are created. Both environments basically are \lstinline+tikzpicture+ environments. One might ask oneself: why? You can do loads of stuff with \CF already. And \TikZ provides all the possibilities one could ask for. But since I'm a lazy guy I wrote several macros providing \TikZ commands, I often used. They got so many and got more and more possibilities to adjust, that I bundled them into this package. Of course you can still use \TikZ and stay more flexible with it, if you like.

\subsection{Basic Principle}
Within the \lstinline+tikzpicture+ reactants and arrows are placed as nodes on a \lstinline+chain+\footnote{Provided by the tikzlibrary `chains'}.
\begin{SideBySideExample}
 \begin{tikzpicture}[start chain]
 \node [on chain] {A};
 \node [on chain] {B};
 \node [on chain] {C};
 \end{tikzpicture}
\end{SideBySideExample}
This way there are several possibilities to place the nodes relative to the others.
\begin{SideBySideExample}
 \begin{tikzpicture}[start chain=going right,node distance=5mm]
 \node [draw,on chain] {Hello};
 \node [draw,on chain] {World};
 \node [draw,continue chain=going below,on chain] {,};
 \node [draw,on chain] {this};
 \node [draw,on chain] {is};
 \end{tikzpicture}
\end{SideBySideExample}
Above all \mC uses the possibility of creating branches to the chain.
\begin{SideBySideExample}
 \begin{tikzpicture}[start chain=going right,node distance=5mm]
  \node [draw,on chain] {A};
  \node [draw,on chain] {B};
 { [start branch]
  \node [on chain=going below] {1};
  \node [on chain=going below] {2};
 }
 { [start branch]
  \node [on chain=going above] {$\alpha$};
  \node [on chain=going above] {$\beta$};
 }
  \node [draw,on chain] {C};
 \end{tikzpicture}
\end{SideBySideExample}
You don't have to understand that mechanism in detail, but you should remember the placement commands in the last example, because \mC uses them in the same way.

In some of the examples in this documentation the nodes are boxed with a coloured frame (see \ref{ssec:makevisible}). This is done so one can see, which size they have and which impact changes of the alignment have on them.

\subsection{How does it work?}
\subsubsection{Basic Commands}
Let's take a look at an example first:
\begin{SideBySideExample}
 \begin{rxn}
  \reactant{ \chemfig{-[::30]-[::-60]OH} }
  \arrow{Ox.}{}
  \reactant{ \chemfig{-[::30]=_[::-60]O} }
 \end{rxn}
\end{SideBySideExample}
In this example you see the most important commands of \mC:\index{rxn}
\begin{lstlisting}
 \begin{rxn}[<align>,<scalefactor>]
\end{lstlisting}
The first of two environments. It creates a centered reaction scheme between two paragraphs (see \ref{ssec:rxn}).\index{reactant}
\begin{lstlisting}
 \reactant[<alignment>,<anchor>,<tikz>]{<formula>}
\end{lstlisting} 
places a \lstinline+node+ on the \lstinline+chain+, in which the chemical formul\ae\ are written. The default alignment is to the \lstinline=right= (see \ref{ssec:reactant}).\index{arrow}
\begin{lstlisting}
 \arrow[<direction>,<type>,<length factor>,<anchor>,both]{<above>}{<below>}
\end{lstlisting}
creates an arrow, which by default has a length of \SI{5}{\emlength} pointing to the right (see \ref{ssec:arrow}).
\begin{SideBySideExample}
 \begin{rxn}
  \reactant{ \chemfig{-[::30]=_[::-60]O} }
  \arrow[below]{}{Ox.}
  \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
 \end{rxn}
\end{SideBySideExample}
As you can see one can align the reaction scheme vertical as well. By giving \lstinline=\reactant= the option \lstinline=below=, the carbonic acid is placed below the arrow. With \lstinline+below+ the arrow points down instead to the right.

\subsubsection{Branches}
With what we saw until now it is not yet clear, why one would use \mC. the horizontal reaction schemes can be realized with \CF and `mhchem' just as well. And why would anyone need a vertical reaction scheme? But what could make \mC interesting is the possibility of branched reaction schemes.\index{branch}
\begin{Example}
 \begin{rxn}
  \reactant{ \chemfig{-[::30]-[::-60]OH} }
  \arrow{}{}
  \reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
  \arrow[below]{}{}
  \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
  \branch[right=of carbonyl]{
    \arrow[,<=>]{\ce{NH2R}}{}
    \reactant{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
  }
 \end{rxn}
\end{Example}
In the last example you've got to know another important command (see \ref{ssec:branch})\index{branch}:
\begin{lstlisting}
 \branch[<alignment>,<anchor>,<tikz>]{<branch commands>}
\end{lstlisting}
The branch was placed right of the first reactant with the anchor \lstinline=carbonyl= by using the option \lstinline+right=of carbonyl+. Inside the branch we used an arrow with the key \lstinline+type={<=>}+ so we would get an equilibrium arrow. Other types would for example be \lstinline=->= (default), \lstinline=<-= or \lstinline=<->=.

Extensive reaction schemes can be realized through multiple usage of \lstinline=\branch=\index{branch}:
\begin{Example}
 \begin{rxn}
  \reactant{ \chemfig{-[::30]-[::-60]OH} }
  \arrow{}{}
  \reactant[,carbonyl]{ \chemfig{-[::30]=_[::-60]O} }
  \arrow[below]{}{}
  \reactant[below]{ \chemfig{-[::30](-[::60]OH)=_[::-60]O} }
  \branch[right=of carbonyl,imin]{
    \arrow[,<=>,1.12]{\ce{NH2R}}{}
    \reactant{ \chemfig{-[::30]=_[::-60]N(-[6]H)-[::60]R} }
  }
  \branch[below right=of carbonyl,halbacetal,yshift=-2pt,xshift=3pt]{
    \arrow[below right,<=>,1.12]{ \chemfig{[,.75]-[::30]-[::-60]OH} }{}
    \reactant[below right]{ \chemfig{-[::30](-[::60]O-[::-60]-[::-60])-[::-60]OH} }
  }
  \branch[above=of carbonyl,aldol,xshift=5.2em]{
    \arrow[above]{ \chemfig{[,.75]-[::30]=_[::-60]O}/\Hpl }{}
    \reactant[above]{ \chemfig{-[::30](-[::60]OH)-[::-60]-[::60]=[::60]O} }
    \arrow{$-\ce{H2O}$}{}
    \reactant{ \chemfig{-[::30]=[::-60]-[::60]=[::60]O} }
  }
 \end{rxn}
\end{Example}

\subsubsection{Numbered Schemes}
The second environment provided by \mC works just as the first one. This time the scheme is placed within a numbered floating environment and is given a caption.\index{rxnscheme}
\begin{Example}
 \begin{rxnscheme}{Keto-enol tautomerization}
  \reactant{ \chemfig{=[::30]-[::-60]OH} }
  \arrow[,<=>]{}{}
  \reactant{ \chemfig{-[::30]=[::-60]O} }
 \end{rxnscheme}
\end{Example}
Here we use the environment
\begin{lstlisting}
 \begin{rxnscheme}[<label>,<placement>,<align>,<scalefactor>,<name>]{<caption>}
  ...
 \end{rxnscheme}
\end{lstlisting}
In the command reference (\ref{ssec:rxnscheme}) you can read how to customize the scheme.

\subsection{Predefined Values}\index{default values|(}
There are some predefined values, that are basically due to my personal taste. But of course you can change them according to your requirements. For \CF-formul\ae\ \emph{inside of \mC environments} some values are predefined as follows:
\begin{lstlisting}
 \setatomsep{1.8em}
 \setcrambond{3pt}{0.5pt}{1pt}
\end{lstlisting}
Outside the \mC environments the defaults of \CF still are set.
\begin{SideBySideExample}
 \begin{rxn}
  \reactant{\chemfig{**6(------)}}
 \end{rxn}
 \chemfig{**6(------)}
\end{SideBySideExample}
\mC's defaults can be changed with these commands:\index{setbondlength}\index{setbondshape}\index{setatomsize}
\begin{lstlisting}
 \setbondlength{<length>}
 \setbondshape{<base length>}{<dash thickness>}{<dash spacing>}
 \setatomsize{<font size>}
\end{lstlisting}
With these commands, the parameters are changed \emph{for all following} \mC environments. If you leave the arguments empty, default values are restored. Default for  \lstinline=\setatomsize= is  \lstinline=\small=.
\begin{Example}
 \setbondlength{2.1em}\setbondshape{5pt}{1pt}{2pt}\setatomsize{\Large}
 \begin{rxn}
  \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
 \end{rxn}
 \setbondlength{}\setbondshape{}{}{}\setatomsize{}
 \begin{rxn}
  \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
 \end{rxn}
\end{Example}
If you only want to change the parameters of a single environment you can use \CF's commands and \LaTeX's fontsize commands \emph{inside the environment}.
\begin{Example}
 \begin{rxn}
  \setatomsep{2.1em}\setcrambond{5pt}{1pt}{2pt}\Large
  \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
 \end{rxn}
 \begin{rxn}
  \reactant{\chemfig{-[::30](<[::60])-[::-60](<:[::-60])-[::60]}}
 \end{rxn}
\end{Example}
The default length of an arrow is \SI{5}{\emlength} or $5\sqrt2\,\si{\emlength}$ if it's a diagonal one. You can change that by using the following command:\index{setarrowlength}
\begin{lstlisting}
 \setarrowlength{<length>}
\end{lstlisting}
\SaveVerb{arrowlength}=<length>=%
Then the values are \UseVerb{arrowlength} or $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$ respectively.
\index{default values|)}

\subsection{Package options}\label{ssec:paketoptionen}\index{options|(}
\mC has a number of package options.
\begin{description}
 \vitem+chemstyle+\index{options!chemstyle}load the `chemstyle' package, without conflicts with \mC.
 \vitem+color=<colour>+\index{options!color} This loads `chemexec' with the options \lstinline=color<colour>= \&\ \lstinline+shade=true+.
 \vitem+english+\index{options!english} With this option, \mC loads the english version of `chemexec', if the package isn't loaded separately before. The name of the \lstinline=rxnscheme= environment (see \ref{ssec:rxnscheme}) is changed into "Reaction scheme".
 \vitem+nochemexec+\index{options!nochemexec} prevent \mC from loading `chemexec'.
 \vitem+nocolor+\index{options!nocolor} `chemexec' is loaded without colour and with the option \lstinline+shade=false+ (default behaviour of \mC).
 \vitem+nocompounds+\index{options!nocompounds}prevent \mC from loading `chemcompounds'.
 \vitem+nomhchem+\index{options!nomhchem}prevent \mC from loading `mhchem' lädt, if `chemexec' isn't loaded either.
 \vitem+nopackages+\index{options!nopackages}prevent \mC from loading \emph{any} package (except \CF)\footnote{apart from the ones \mC needs to function (like \TikZ etc.).}.
 \vitem+placement=<position>+\index{options!placement} The default placement behaviour of the \lstinline=rxnscheme= environment is changed to \lstinline=<position>=.
 \vitem+shade+\index{options!shade} loads `chemexec' with the \lstinline+shade=true+ option.
\end{description}
\index{options|)}

\section{Advanced Usage, Usage with \TikZ}
The biggest problem with \mC usually is the correct positioning of reactants and arrows. \ref{ssec:ausrichtungsfrage} looks a little bit into this topic.

Some of the commands can be given \TikZ code as third optional argument. More precisely you can use the same \TikZ keys there as you would with a \lstinline+\node+ inside a \lstinline+tikzpicture+. If a node is placed with \lstinline+\node[<tikz>](<placement>){<anything>};+, then \lstinline+<tikz>+ is about the same in \eg \lstinline+\reactant[,,<tikz>]{}+\index{reactant!tikz}. With this you can customize your scheme in many ways.

\subsection{The Alignment Question}\label{ssec:ausrichtungsfrage}\index{alignment|(}
Since reactants, arrows and branches are aligned centered to the referred object, the default alignment not always produces nice results.
\begin{Example}
 \makevisible
 \begin{rxn}
  \reactant{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
  \arrow{}{}
  \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
 \end{rxn}
\end{Example}
As you can see, both reactants are not aligned equally to the arrow, as far as the benzene ring is concerned. The first reactant seems to be shifted up. Trying to solve this with \TikZ code fails:
\begin{Example}
 \makevisible
 \begin{rxn}
  \reactant[,,yshift=-1em]{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
  \arrow{}{}
  \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
 \end{rxn}
\end{Example}
This is, because the first reactant is shifted with the respect to the object it refers to. Since it is the first object on the chain itself, it isn't shifted at all. The following arrow always is centered to the object before.
\begin{SideBySideExample}
 \makevisible
 \begin{rxn}
  \reactant{A}
  \chemand
  \reactant[,,yshift=1em]{B}
  \arrow{}{}
 \end{rxn}
\end{SideBySideExample}
Since there is no possibility to change the alignment of the arrow itself (yet), what you can do is put it inside a branch.
\begin{Example}
 \makevisible
 \begin{rxn}
  \reactant{A}
  \chemand
  \reactant[,,yshift=1em]{B}
  \branch[,,yshift=-1em]{\arrow{}{}}
 \end{rxn}
 \begin{rxn}
  \reactant{ \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}} }
  \branch[,,yshift=1em]{\arrow{}{}}
  \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
 \end{rxn}
\end{Example}
For the last example this isn't the best solution, though, because exact alignment needs lots of tries until you get the required result. There is another solution: an invisible bromine to the first benzene.
\begin{Example}
 \makevisible
 \begin{rxn}
  \reactant{ \chemname{\chemfig{*6(-=-=(-[,,,,draw=none]\phantom{Br})-=)}}{benzene \compound{benzene}} }
  \arrow{}{}
  \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
 \end{rxn}
\end{Example}
In other cases, too, an invisible substituent should be preferred over \TikZ code, since it's easier and more precise:
\begin{Example}
 \makevisible
 default:
 \begin{rxn}
  \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
  \chemand
  \reactant{\chemfig{HO-[:30]-[:-30]-[:30]}}
  \arrow{[\Hpl]}{\SI{200}{\celsius}}
  \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
 \end{rxn}
 hydroxy groups at the same height through TikZ:
 \begin{rxn}
  \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
  \chemand[,,yshift=-1.2em]
  \reactant[,,yshift=.12em]{\chemfig{HO-[:30]-[:-30]-[:30]}}
  \branch[,,yshift=1.08em]{\arrow{[\Hpl]}{\SI{200}{\celsius}}}
  \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
 \end{rxn}
 hydroxy groups at the same height through an invisible substituent:
 \begin{rxn}
  \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]OH}}
  \chemand
  \reactant{\chemfig{HO-[:30](=[2,,,,draw=none]\phantom{O})-[:-30]-[:30]}}
  \arrow{[\Hpl]}{\SI{200}{\celsius}}
  \reactant{\chemfig{-[:-30]-[:30](=[2]O)-[:-30]O-[:30]-[:-30]-[:30]}}
 \end{rxn}
\end{Example}
I'm afraid that in many other cases you'll have to play with \lstinline+xshift+\index{xshift} and \lstinline+yshift+\index{yshift}, though, until the scheme looks the way you want. Maybe further versions of \mC will provide a more user friendly alignment syntax.
\index{alignment|)}

\subsection{Using \TikZ to Achieve Other Results}
You could, just for fun?, change the looks of a molecule with \TikZ.
\begin{SideBySideExample}
 \begin{rxn}
  \reactant[,,->,green!45!blue!55]{ \chemfig{*6(---(-)---)} }
 \end{rxn}
 \chemfig[->,green!45!blue!55]{*6(---(-)---)}
\end{SideBySideExample}
The last example is not very good, of course, since you can achieve the same result using \CF's own possibilities. But other cases are imaginable:
\begin{Example}
 \newcommand{\emptyreactant}{\reactant[,minimum width=5em]{ \rule[-1em]{1em}{.5pt}\;\rule[-1em]{3em}{.5pt} }{}}
 \newcommand{\stoich}{\rule[-3pt]{1em}{.5pt}}
 \begin{rxn}
  \reactant{\bf\Large Ionic compounds (I)}
  \reactant[below,a,yshift=1em]{Fill in the missing parts}
  \branch[below=of a,b]{ \reactant[,,minimum width=5em]{ \stoich\ Na }\chemand \emptyreactant \arrow{}{} \emptyreactant \chemand \emptyreactant }
  \branch[below=of b,,draw,inner sep=3pt]{\reactant[,,minimum width=5em]{}\chemand\reactant[,,minimum width=5em]{}\arrow{}{}\reactant[,,minimum width=5em]{Sodium chloride $+$ Hydrogen}}
 \end{rxn}
\end{Example}

\section{Alphabetical Command Reference}
In the following section every command is explained.

\subsection{anywhere}\label{ssec:anywhere}\index{anywhere|(}\index{Befehle!anywhere}
\NEU%
Sometimes it is useful to be able to place a reactant outside of the chain, \eg see \ref{rs:hydratisation}.
\begin{lstlisting}
 \anywhere[<anchor>]{<tikz>}{<formula>}
\end{lstlisting}
The command \lstinline+\anywhere+ makes that possible. It is placed through \lstinline+<tikz>+ in a similar way as \lstinline+\branch+.
\begin{SideBySideExample}
 \begin{rxn}
  \reactant[,carbonyl_A]{\chemfig{R_2C=O}}
  \anywhere{above=of carbonyl_A}{\chemfig{H-[:-30]O-[:30]H}};
 \end{rxn}
\end{SideBySideExample}
This command can be used for naming reaction partners.
\begin{Example}
 \begin{rxn}
  \reactant[,ketone]{\chemfig{H-\chemabove{C}{\hspace*{5mm}\scriptstyle\alpha}(-[2]H)(-[6,,,2]{}|{\textcolor{blue}H})-C(=[:60]\lewis{02,O})-[:-60]C|H_3}}
  \anywhere{below=of ketone}{$+$\color{blue}\Hyd}
  \arrow[,<=>]{\tiny slow}{}
  \mesomeric[,mesomer]{
    \reactant[,carbanion]{\chemfig{H_2|\chemabove[3pt]{\lewis{2,C}}{\scriptstyle\ominus}-C(=[:60]\lewis{02,O})-[:-60]C|H_3}}
    \marrow
    \reactant[,enolate]{\chemfig{H_2C=C(-[:60]\chemabove{\lewis{024,O}}{\hspace*{5mm}\scriptstyle\ominus})-[:-60]C|H_3}}
  }
  \anywhere{above=of enolate}{\tiny enolate ion}
  \anywhere{above=of carbanion}{\tiny carbanion}
  \anywhere{below=of mesomer}{$+$\color{blue}\ce{H2O}}
 \end{rxn}
\end{Example}
\index{anywhere|)}

\subsection{arrow}\label{ssec:arrow}\index{arrow|(}\index{commands!arrow}
Reaction arrows are created with \lstinline=\arrow=.
\begin{lstlisting}
 \arrow[<direction>,<type>,<length factor>,<anchor>,both]{<above>}{<below>}
\end{lstlisting}

\subsubsection{Options}\index{arrow!options|(}
There are five options to customize the arrows. You've got to use them in the right order, separated by commas.
\begin{enumerate}
\item\lstinline+<direction>+\index{arrow!options!direction} -- possible values are:
 \begin{rxn}
  \setarrowlength{2.5em}
  \dummy[a]
  \arrow{}{}\reactant{right}
  \branch[above right=of a]{\arrow[above right]{}{}\reactant[above right]{above right}}
  \branch[above=of a]{\arrow[above]{}{}\reactant[above]{above}}
  \branch[above left=of a]{\arrow[above left]{}{}\reactant[above left]{above left}}
  \branch[left=of a]{\arrow[left]{}{}\reactant[left]{left}}
  \branch[below left=of a]{\arrow[below left]{}{}\reactant[below left]{below left}}
  \branch[below=of a]{\arrow[below]{}{}\reactant[below]{below}}
  \branch[below right=of a]{\arrow[below right]{}{}\reactant[below right]{below right}}
 \end{rxn}
\item\lstinline+<type>+\index{arrow!options!type} -- possible values are:
 \begin{rxn}
  \dummy[a]
  \branch[below=of a,b,yshift=1em]{\arrow{}{}\reactant{\ttfamily -\textgreater}}
  \branch[below=of b,c,yshift=1em]{\arrow[,<-]{}{}\reactant{\ttfamily \textless-}}
  \branch[below=of c,d,xshift=.25em,yshift=1em]{\arrow[,<->]{}{}\reactant{\ttfamily \textless-\textgreater}}
  \branch[below=of d,e,yshift=1em]{\arrow[,<=>]{}{}\reactant{\ttfamily \textless=\textgreater}}
  \branch[below=of e,f,yshift=1em]{\arrow[,-|>]{}{}\reactant{\ttfamily -\textbar\textgreater}}
  \branch[below=of f,,yshift=1em]{\arrow[,-+>]{}{}\reactant{\ttfamily -+\textgreater}}
 \end{rxn}
\item\lstinline+<length factor>+\index{arrow!options!length} -- the length (\SI{5.0}{\emlength}, factor = $1.0$, default) is multiplied with this factor.
\item\lstinline+<anchor>+\index{arrow!options!anchor} -- this anchor can be used to refer to the arrow, \eg with a branch.
\item\lstinline+both+\index{arrow!options!both}-- this gives both arrow argument nodes the same width and height.
\end{enumerate}
\begin{SideBySideExample}
 \begin{rxn}
  \arrow[,,.6]{\ce{Br2}}{$h\nu$} \arrow{\chemfig{-[::30]-[::-60]OH}}{}
 \end{rxn}
 \begin{rxn}
  \arrow[above,,.6]{\ce{Br2}}{$h\nu$}
 \end{rxn}
 \begin{rxn}
  \arrow[above]{\chemfig{-[::30]-[::-60]OH}}{}
 \end{rxn}
 \begin{rxn}
  \arrow[above right,,.5]{\ce{Br2}}{$h\nu$}
 \end{rxn}
 \begin{rxn}
  \arrow[above right]{\chemfig{-[::30]-[::-60]OH}}{}
 \end{rxn}
\end{SideBySideExample}
Most keys in action:
\begin{SideBySideExample}
 \begin{rxn}
  \reactant{A}
  \arrow[,,,arrow_a]{B}{}
  \branch[above=of arrow_a,,yshift=1em]{
    \arrow[above,<-,.7]{}{}
    \reactant[above]{D}
  }
  \reactant{C}
  \end{rxn}
\end{SideBySideExample}
\index{arrow!options|)}

\subsubsection{Alignment}\index{arrow!alignment|(}
If an arrow is placed inside a branch (see \ref{ssec:branch}) the alignment of the branch possibly is determined by the width and height of the arrow arguments. If these arguments have different sizes, the alignment can go wrong.
\begin{SideBySideExample}
 \makevisible
 \begin{rxn}
  \reactant[,a]{A}
  \arrow{}{}
  \branch[below=of a]{
    \arrow[below]{\chemfig{-[::30]-[::-60]OH}}{}
  }
 \end{rxn}
 \makeinvisible
\end{SideBySideExample}
By using the key \lstinline=both=\index{arrow!both}, both argument nodes have the same size, which can correct the alignment.
\begin{SideBySideExample}
 \makevisible
 \begin{rxn}
  \reactant[,a]{A}
  \arrow{}{}
  \branch[below=of a]{
   \arrow[below,,,,both]{\chemfig{-[::30]-[::-60]OH}}{}
  }
 \end{rxn}
 \makeinvisible
\end{SideBySideExample}
There is more about the alignment problem in \ref{sssec:branch_ausrichtung}.
\index{arrow!alignment|)}

\subsubsection{Appearance}\index{arrow!appearance}
With the commands \lstinline+\setarrowlength+ (\ref{ssec:setarrowlength}) and \lstinline+\setarrowline+ (\ref{ssec:setarrowline}) the general appearance of the arrows can be changed.
\index{arrow|)}

\subsection{branch}\label{ssec:branch}\index{branch|(}\index{commands!branch}
\lstinline=\branch= is used to, well, create a branch to a reaction. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
\begin{lstlisting}
 \branch[<alignment>,<anchor>,<tikz>]{<branch code>}
\end{lstlisting}
For \lstinline=\branch= alignment an anchor is important. Let's take a look at an example:
\begin{Example}
 \begin{rxn}
  \reactant[,start]{\chemfig{-[::30]=_[::-60](-[::-60])-[::60]}}
  \arrow[,,.75]{\ce{HCl}}{}
  \reactant{\chemfig{-[::30]-[::-60](-[::120]Cl)(-[::-60])-[::60]}}
  \chemand
  \reactant{\chemfig{-[::30](-[::60]Cl)-[::-60](-[::-60])-[::60]}}
  \branch[below right=of start]{
    \arrow[below right,,.75]{\ce{H2O}}{}
    \reactant[below right]{\chemfig{-[::30]-[::-60](-[::120]OH)(-[::-60])-[::60]}}
    \chemand
    \reactant{\chemfig{-[::30](-[::60]OH)-[::-60](-[::-60])-[::60]}}
  }
 \end{rxn}
\end{Example}
The first reactant got the anchor \lstinline+start+ (line 2, also see \ref{ssec:reactant}).
\begin{lstlisting}[firstnumber=2]
 \reactant[,!!start!!]{ ... }
\end{lstlisting}
\lstinline=\branch= now refers to it in its alignment (line 7):
\begin{lstlisting}[firstnumber=7]
 \branch[below right!!=of start!!]{ ... }
\end{lstlisting}
If you don't use the alignment reference to an anchor, you automatically refer to the last \lstinline=\reactant= or \lstinline=\arrow=. If you don't use alignment at all, then the branch is aligned to the right of the last \lstinline=\reactant= or \lstinline=\arrow=.
\begin{SideBySideExample}
 \begin{rxn}
  \reactant{ \chemfig{CH_2=CH-OH} }
  \arrow[,<=>,.5]{}{}
  \branch{ \reactant{ \chemfig{CH_3-CH=O} } }
 \end{rxn}
\end{SideBySideExample}
You have several options for alignment: you can either put the \lstinline+\branch+ on a \lstinline+chain+ or place it relative to a object.
\begin{description}
 \vitem+chain+ In this case you use: \lstinline+on chain=going <value>+.
 \item[relative] In this case you use: \lstinline+<value>=of <anchor>+.
\end{description}
As possible \lstinline+<value>+ you have the same choices as for \lstinline+\reactant+, see \ref{ssec:reactant}. Default is \lstinline+on chain=going right+.

\subsubsection{Alignment problems}\label{sssec:branch_ausrichtung}\index{branch!alignment|(}
If an arrow has two arguments with different sizes and is placed inside a branch, the alignment of the branch can go wrong. In this case the \lstinline=\arrow= key \lstinline=both= isn't a solution, since the smaller argument then is not placed next to the arrow but is centered in its node.
\begin{SideBySideExample}
 \makevisible
 \begin{rxn}
  \reactant[,a]{A}
  \arrow{}{}
  \branch[below=of a]{
   \arrow[below,,,,both]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
  }
 \end{rxn}
 \makeinvisible
\end{SideBySideExample}
What you have to do is shift the branch using the \TikZ keys \lstinline+xshift+\index{xshift} and \lstinline+yshift+\index{yshift}.
\begin{SideBySideExample}
 \makevisible
 \begin{rxn}
  \reactant[,a]{A}
  \arrow{}{}
  \branch[below=of a,,xshift=-1.35em]{
   \arrow[below]{\chemfig{-[::30]-[::-60]OH}}{\Hpl}
  }
 \end{rxn}
 \makeinvisible
\end{SideBySideExample}
\index{branch!alignment|)}\index{branch|)}

\subsection{chemand}\label{ssec:chemand}\index{chemand|(}\index{commands!chemand}
The command
\begin{lstlisting}
 \chemand[<alignment>,<anchor>,<tikz>]
\end{lstlisting}
produces and places a $+$ in the same way \lstinline+\reactant+ places arbitrary text.
\begin{Example}
 \begin{rxn}
  \reactant{\chemfig{*6(------)}}
  \chemand
  \reactant{\ce{Br2}}
  \arrow{$h\nu$}{}
  \reactant{\chemfig{*6(--(-Br)----)}}
  \chemand
  \reactant{\ce{HBr}}
 \end{rxn}
\end{Example}
The optional arguments for \lstinline+\chemand+ and \lstinline+\reactant+ are the same, see \ref{ssec:reactant} for \lstinline+\reactant+'s options.
\index{chemand|)}

\subsection{dummy}\label{ssec:dummy}\index{dummy|(}\index{commands!dummy}
\NEU\lstinline=\dummy= creates an empty node. Up to v1.3 \lstinline=\arrow= needed to follow after a node, because \lstinline=\arrow= internally uses \lstinline=\tikzchainprevious=. If there was no node on the chain \emph{before} \lstinline=\arrow= was used, it caused an error. With \lstinline+\branch+ it was similar. By using \lstinline=\dummy= you could start a scheme with an arrow anyway.
\begin{lstlisting}
 \begin{rxn}
  \dummy\arrow{}{}
 \end{rxn}
\end{lstlisting}
\emph{This is \textbf{not} necessary any more}. In some (alignment) cases, an empty node still might be useful, so the command still exists.
\index{dummy|)}

\subsection{elmove}\label{ssec:elmove}\index{elmove|(}\index{commands!elmove}
\lstinline=\elmove= just is a shortcut for \CF's \lstinline=\chemmove=.
\begin{lstlisting}
 \elmove[<tikz>]{<start>}{<start direction>}{<end>}{<end direction>}
\end{lstlisting}
This is expanding the command
\begin{lstlisting}
 \chemmove{\draw[!!<tikz>!!](!!<start>!!).. controls +(!!<start direction>!!) and +(!!<end direction>!!)..(!!<end>!!);}
\end{lstlisting}
using \lstinline?[->,red,shorten <=3pt,shorten >=1pt]? as default for \lstinline=<tikz>=. How you use \lstinline+\chemmove+ is described in the documentation for \CF.
\begin{Example}
 \begin{center}
  \setatomsep{1.8em}
  \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
  \elmove{e1}{60:4mm}{e2}{0:4mm}
 \end{center}
\end{Example}
\index{elmove|)}

\subsection{makeinvisible}\label{ssec:makeinvisible}\index{makeinvisible|(}\index{commands!makeinvisible}
\lstinline=\makeinvisible= restores the normal \mC behaviour after \lstinline=\makevisible= (see \ref{ssec:makevisible}) has been used. \lstinline=\makeinvisible= only changes the looks of nodes following after it.
\index{makeinvisible|)}

\subsection{makevisible}\label{ssec:makevisible}\index{makevisible|(}\index{commands!makevisible}
With \lstinline=\makevisible= you can visualize the nodes within which reactants, arrows and branches are set. This is useful when you're aligning branches, for example. You can see an example for \lstinline=\makevisible= in \ref{ssec:arrow}. Every kind of nodes is emphasized with a different colour: 

\tikz[baseline=(X.base)]\node[draw=red!60](X){\texttt{\textbackslash reactant\{\}}};, \tikz[baseline=(X.base)]\node[draw=green!60](X){\texttt{\textbackslash arrow\{above\}\{\}}};, \tikz[baseline=(X.base)]\node[draw=blue!60](X){\texttt{\textbackslash arrow\{\}\{below\}}}; und \tikz[baseline=(X.base)]\node[draw=purple, dotted](X){\texttt{\textbackslash branch\{\}}};. Also see \ref{ssec:makeinvisible}.

 \lstinline=\makevisible= only changes the looks of nodes following after it.
\begin{SideBySideExample}
 \makevisible
 \begin{rxn}
  \reactant[,a]{A}
  \arrow{a}{b}
  \branch[below=of a]{
    \arrow[below,,,,both]{a}{b}
  }
 \end{rxn}
 \makeinvisible
\end{SideBySideExample}
\index{makevisible|)}

\subsection{marrow}\label{ssec:marrow}\index{marrow|(}\index{commands!marrow}
\lstinline=\marrow= creates a double-headed arrow.
\begin{lstlisting}
 \marrow[<direction>]
\end{lstlisting}
It is a shortcut for \lstinline+\arrow[<direction>,<->,.5]{}{}+.
\index{marrow|)}

\subsection{mCsetup}\label{ssec:mCsetup}\index{mCsetup|(}\index{commands!mCsetup}
With
\begin{lstlisting}
 \mCsetup{<keys>}
\end{lstlisting}
you can fully customize \mC. For each of \mC's commands going like \lstinline+\set<command>+ except \lstinline+\setbondshape+ there is a key \lstinline+<command>=<value>+. Additionally there is the key \lstinline+align=<value>+, with which you can change the alignment behaviour of both \lstinline+rxn+ and \lstinline+rxnscheme+, and the key \lstinline+reset+, with whith all values are reset to default.\index{mCsetup!align}\index{mCsetup!arrowlength}\index{mCsetup!atomsize}\index{mCsetup!bondlength}\index{mCsetup!mergelength}\index{mCsetup!rcndist}\index{mCsetup!rxnalign}\index{mCsetup!schemealign}\index{mCsetup!reset}
\begin{Example}
 \mCsetup{
  align=left,
  arrowlength=3em,
  arrowline=thick,
  atomsize=\large,  
  bondlength=3em,
  mergelength=4em,
  rcndist=2em
  %rxnalign=right,
  %schemealign=left
 }
 \setbondshape{4pt}{2pt}{1pt}
 \begin{rxn}
  \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
 \end{rxn}
 \mCsetup{reset}
 \begin{rxn}
  \reactant{A}\arrow{}{}\reactant{\chemfig{A-(<[2])(<:[6])-B}}
 \end{rxn}
\end{Example}
\index{mCsetup|)}

\subsection{merge}\label{ssec:merge}\index{merge|(}\index{commands!merge}
\NEU%
The \lstinline+merge+ command is used to merge different reaction chains. In order to do that, the reactants that are to be merged must have an anchor name (\lstinline+\reactant[,<anchor>]{}+, similar with branches, see \ref{ssec:reactant} and \ref{ssec:branch}) and be placed \emph{before} \lstinline+\merge+.
\begin{lstlisting}
 \merge[<label>,<direction>,<length>]{<target>}{<start a>}{<start b>}
\end{lstlisting}
\lstinline+\merge+ has three optional and three mandatory arguments. The latter are the anchor names of the reactants, that are to be merged.
\begin{Example}
 \begin{rxn}
  \branch[,first]{
   \reactant[,start_a]{\chemfig{-[:30]-[:-30]OH}}
   \reactant[,start_b,xshift=9em]{\chemfig{-[:30]=[:-30]O}}
  }
  \branch[below=of first,target,yshift=-5em]{
   \reactant{\chemfig{-[:30]-[:-30]O-[:30](-[2]OH)-[:-30]}}
  }
  \merge[\ce{[\Hyd]}]{target}{start_a}{start_b}
 \end{rxn}
\end{Example}
The default \lstinline+<direction>+ is \lstinline+below+, other possible values are \lstinline+right+, \lstinline+left+ or \lstinline+above+. With \lstinline+<length>+ the length of the arrow from the point of merging to the tip can be changed. The default length is \SI{3}{\emlength}. The default length can be changed with \lstinline+\setmergelength+\index{setmergelength} or \lstinline+\mCsetup+\index{mCsetup}.
\begin{Example}
 \begin{rxn}
  \reactant[,start_a]{\chemfig{-[:30]-[:-30]OH}}
  \branch[below=of start_a,start_b,yshift=-9em]{
   \reactant{\chemfig{-[:30]=[:-30]O}}
  }
  \branch[right=of start_a,target,xshift=7em,yshift=-6em]{
   \reactant{\chemfig{-[:30]-[:-30]O-[:30](-[2]OH)-[:-30]}}
  }
  \merge[\ce{[\Hyd]},right,5em]{target}{start_a}{start_b}
 \end{rxn}
\end{Example}
Since you have to place the reactants first, it might be useful to know a little bit about involved lengths. There are three values, which influence the needed distance between start points and the target reactant. There is the {\color{green}depth} of the involved reactants, the distance of the "reaction nodes" {\color{red}rcndist} (see \ref{ssec:setrcndist}) and the length of the \lstinline+\merge+ arrow {\color{blue}mergelength} (also see \ref{ssec:setmergelength}).
\begin{rxn}
 \node[above](a) at (0,0){A};
 \node[above](b) at (10em,0){B};
 \node[below](c) at (5em,-6em){C};
 \merge{c}{a}{b}
 \draw (-8.5em,1em) -- (-8.5em,-9em);
 \foreach \x in {-1,0,1,2,3,4,5,6,7,8,9}{
   \draw (-8.5em,-\x em) -- (-8.7em,-\x em);
 }
 \draw[<->,red] (10em,0)--node[midway,right,xshift=.2em]{rcndist (default: 1em)}(10em,-1em);
 \draw[<->,red] (0,0)--(0,-1em);
 \draw[<->,red] (5em,-5em)--(5em,-6em);
 \draw[<->,blue] (6em,-2em) --node[midway,right,xshift=.2em]{mergelength (default: 3em)} (6em,-5em);
 \draw[<->,green] ($(a.base)+(-.5em,0)$)--node[midway,left,xshift=-.2em]{reactant depth}++(0,.5em);
\end{rxn}
At last an example where two chains are merged.
\begin{Example}
 \begin{rxn}
  \setatomsep{1em}\tiny
  % chain 1
   \reactant[,first]{ \chemfig{Cl-[:30,1.5]--[:-30,1.5]O-[:30,1.5]--[:-30,1.5]Cl}{} }
   \arrow[,,.5]{}{}
   \reactant[,start_above]{ \chemfig{O(-[:-150]**6(-----(-OH)-))-[:90]-[:30]-[:-30]O-[:30]-[:-30]-[:-90]O-[:-30]**6(-(-HO)-----)} }
  % chain 2
  \branch[below=of first,start_below,xshift=8em,yshift=-4em]{
   \reactant{ \chemfig{**6((--[6,,,2]HO)-N-(--[6]OH)----)} }
   \arrow[,,.5]{}{}
   \reactant{ \chemfig{**6((--[6]Br)-N-(--[6]Br)----)} }
  }
  % target
  \branch[right=of start_above,target,xshift=5em,yshift=-4em]{
   \reactant[,c]{ \chemfig{O(-[:-150]**6(-----(-O?)-))-[:90]-[:30]**6(-N-(--[:-90]O-[:-30]**6(-(-O-[6]-[:-150]-[:150]O-[:-150]-[:150]?)-----))----)} }
  }
  % merging:
  \merge[,right]{target}{start_above}{start_below}
 \end{rxn}
\end{Example}
The usage of \lstinline=\merge= may require some playing with branches, \lstinline+xshift+\index{xshift} and \lstinline+yshift+\index{yshift}, until you get the desired result.
\begin{Example}
 \begin{rxn}
  \setatomsep{1.5em}
  \reactant[,start_aa]{ \chemname{\chemfig{**6(---(-NH_2)---)}}{Anilin} }
  \reactant[below,start_ab,yshift=-3em]{ \chemname{\ce{HNO2}}{salpetrige S"aure} }
  \branch[right=of start_aa,target_a,xshift=6em,yshift=-5em]{
    \reactant{ \chemname{\chemfig{**6(---(-N|_2\op)---)}}{Diazoniumion} }
  }% = start_ba
  \branch[below=of target_a,start_bb,yshift=-3em]{
    \reactant{ \chemname{\chemfig{**6(---(-NH_2)---)}}{Anilin} }
  }
  \branch[right=of target_a,target_b,xshift=6em,yshift=-5em]{
    \reactant{ \chemname{\chemfig{N(-[:-150]**6(------))=N-[:-30]**6(---(-NH_2)---)}}{p-Aminodiazobenzol} }
  }
  \merge[,right]{target_a}{start_aa}{start_ab}
  \merge[,right]{target_b}{target_a}{start_bb}
 \end{rxn}
\end{Example}
\index{merge|)}

\subsection{mesomeric}\label{ssec:mesomeric}\index{mesomeric|(}\index{commands!mesomeric}
The \lstinline=\mesomeric= command works just like \lstinline=\branch= (see \ref{ssec:branch}) but places the formul\ae\ into square brackets. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
\begin{lstlisting}
 \mesomeric[<alignment>,<anchor>,<tikz>]{<formula>}
\end{lstlisting}
The resonance formul\ae\ are written into \lstinline=<formula>=. With \lstinline=\marrow= (see \ref{ssec:marrow}) you create the resonance arrows. If needed you can give an anchor (\lstinline=<anchor>=) to \lstinline=\mesomeric= (also see \ref{ssec:branch}). Alignment is used the same way as with \lstinline=\reactant=.
\begin{Example}
 \begin{rxn}
  \mesomeric{
    \reactant{
      \chemfig{*6(=[@{e1}]-=-(-[:120]X)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
      \elmove{e1}{60:4mm}{e2}{0:4mm}
    }
    \marrow
    \reactant{
      \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]X)(-[:60]H)-=)}
      \elmove{e3}{180:4mm}{e4}{150:4mm}
    }
    \marrow
    \reactant{
      \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]X)(-[:60]H)-=)}
    }
   }
 \end{rxn}
\end{Example}
Or vertical, too:
\begin{SideBySideExample}
 \begin{rxn}
  \mesomeric{
    \reactant{ \chemfig{*6(=-=-=-)} }
    \marrow[below]
    \reactant[below]{ \chemfig{*6(-=-=-=)} }
  }
 \end{rxn}
\end{SideBySideExample}
Or maybe a coordination complex?
\begin{Example}
 \begin{rxn}
  \setatomsep{3em}
  \mesomeric[,a]{
    \reactant{ \chemfig{H_3\lewis{0,N}-[,1.35,,,dotted]{Cu}(-[2,,,,dotted]\lewis{6,N}H_3)(-[6,,,,dotted]\lewis{2,N}H_3)-[,1.2,,,dotted]\lewis{4,N}H_3} }
  }
  \node[above right=of a,yshift=-1em] {$2\oplus$};
 \end{rxn}
\end{Example}
\index{mesomeric|)}

\subsection{reactant}\label{ssec:reactant}\index{reactant|(}\index{commands!reactant}
\NEU%
The command \lstinline=\reactant=\footnote{In older versions this command was called \texttt{\textbackslash reactand}, which is still available.} is somehow the basic command of \mC. \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
\begin{lstlisting}
 \reactant[<alignment>,<anchor>,<tikz>]{<formula>}
\end{lstlisting}
In this command the actual formul\ae\ are written (\lstinline=<formula>=). If needed, they can be given an anchor (\lstinline=<anchor>=). The optional argument \lstinline=<alignment>= can have 8 different values:
\begin{alphlist}
 \item \lstinline=right=,
 \item \lstinline=above right=,
 \item \lstinline=above=,
 \item \lstinline=above left=,
 \item \lstinline=left=,
 \item \lstinline=below left=,
 \item \lstinline=below=,
 \item \lstinline=below right=
\end{alphlist}
Default is \lstinline=right=. You use this argument to place the reactant relatively to the reactant or arrow right before.
\begin{SideBySideExample}
%horizontal:
 \begin{rxn}
   \reactant{\ce{Br2}}
   \reactant[below]{\ce{Cl2}}
 \end{rxn}

%more than one reactant:
 \begin{rxn}
   \reactant{\ce{Br2}}
   \reactant[below]{\ce{I2}}
   \reactant{\ce{Cl2}}
 \end{rxn}

%vertical reaction:
 \begin{rxn}
  \reactant{\ce{Br-Br}}
  \arrow[below,,.5]{$h\nu$}{}
  \reactant[below]{\ce{2 ~\lewis{0.,Br}}}
 \end{rxn}
\end{SideBySideExample}
\index{reactant|)}

\subsection{rxn (environment)}\label{ssec:rxn}\index{rxn|(}\index{commands!rxn|see{rxn}}\index{environment!rxn|see{rxn}}
\lstinline=rxn= is a non-floating not numbered environment for reaction schemes. Per default all schemes are centered.
\begin{lstlisting}
 \begin{rxn}[<align>,<scalefactor>]
  ...
 \end{rxn}
\end{lstlisting}

\subsubsection{Options}\label{sssec:rxn_optionen}\index{rxn!options|(}
\NEU\lstinline=rxn= has two options, which are to be used in the following order, separated by a comma:
\begin{enumerate}
 \item\lstinline+<alignment>+\index{rxn!options!alignment} alignment behaviour of the \lstinline=rxn= environment; default is `center'.
 \item\lstinline+<scalefactor>+\index{rxn!options!scale} factor by which the \lstinline=rxn= environment is scaled; default: `1.0'. Same behaviour as with \lstinline+rxnscheme+, see \ref{ssec:rxnscheme}.
\end{enumerate}
If you use the \lstinline+scalefactor+ option, you might see strange effects on \CF formul\ae.
\begin{SideBySideExample}
 \begin{rxn}[,.5]
  \reactant{\chemfig{**6(------)}}
 \end{rxn}
\end{SideBySideExample}
Scaling does in general not affect the size of \CF formul\ae, but does scale the aromaticity ring of benzene and similar molecules. This is due to a possible bug in \CF itself.
\begin{SideBySideExample}
 \chemfig[scale=.5]{**6(------)}
\end{SideBySideExample}
This can be solved either by using the \emph{first} optional argument of \lstinline+\chemfig+ to undo the scaling or by using the \emph{second} optional argument to scale the rest of the molecule.
\begin{Example}
 \begin{rxn}[,.5]
  \reactant{\chemfig[scale=2]{**6(------)}}
  \reactant{\chemfig[][scale=.5]{**6(------)}}
 \end{rxn}
 \chemfig[scale=.5][scale=.5]{**6(------)}
\end{Example}
Alignment examples:
\begin{Example}
 \begin{rxn}[center]
  \reactant{center}\arrow{}{}\reactant{centered}
 \end{rxn}
 \begin{rxn}[right]
  \reactant{right}\arrow{}{}\reactant{raggedleft}
 \end{rxn}
 \begin{rxn}[left]
  \reactant{left}\arrow{}{}\reactant{raggedright}
 \end{rxn}
\end{Example}
\index{rxn!options|)}\index{rxn|)}

\subsection{rxnscheme (environment)}\label{ssec:rxnscheme}\index{rxnscheme|(}\index{commands!rxnscheme|see{rxnscheme}}\index{environment!rxnscheme|see{rxnscheme}}
\lstinline+rxnscheme+ is a floating environment for reaction schemes.
\begin{lstlisting}
 \begin{rxnscheme}[<label>,<placement>,<alignment>,<scalefactor>,<name>]{<caption>}
  ...
 \end{rxnscheme}
\end{lstlisting}

\subsubsection{Options}\label{sssec:rxnscheme_optionen}\index{rxnscheme!options|(}
\NEU\lstinline=rxnscheme= has five options, which are to be used in the following order, separated by commas:
\begin{enumerate}
 \item\lstinline+<label>+\index{rxnscheme!options!label} Like every other floating environment \lstinline+rxnscheme+ can be given a label. To do that, you need to use the option \lstinline+<label>+. For example if you use
\begin{lstlisting}
 \begin{rxnscheme}[rs:schema]{<caption>}
  ...
 \end{rxnscheme}
\end{lstlisting}
 you can refer to it by using \lstinline=\ref{rs:schema}= as usual.
 \item\lstinline+<placement>+\index{rxnscheme!options!placement} With this option you can change the placement of the float, \eg with \lstinline+htp+. The default value is \lstinline+H+ (exactly here). An example for this option is \ref{rs:synthese} in \ref{ssec:tikzsynthese}.
 \item\lstinline+<alignment>+\index{rxnscheme!options!alignment}This option changes the alignment of the scheme. You can choose between \lstinline=left=, \lstinline=center= and \lstinline=right=.
 \item\lstinline+<scalefactor>+\index{rxnscheme!options!scale} \lstinline+rxnscheme+ has another key with which the scheme can be scaled. Please keep in mind that it doesn't affect the font size and the size of \CF formul\ae. You can have strange effects on \CF formul\ae\ if you use this key, though. See \ref{sssec:rxn_optionen} for more information.
 \item\lstinline+<name>+\index{rxnscheme!options!name} This option changes the name of the actual scheme from "Reaktionschema" or "Reaction scheme" into \lstinline+<name>+.
\begin{lstlisting}
 \begin{rxnscheme}[,<placement>]{<caption>}
  ...
 \end{rxnscheme}
\end{lstlisting}
\end{enumerate}
\begin{Example}
 \begin{rxnscheme}[,,,2]{Big scheme}
  \large\setatomsep{3.5em}
  \reactant{ \chemfig{=[::30]-[::-60]OH} }
  \arrow[,<=>]{}{}
  \reactant{ \chemfig{-[::30]=[::-60]O} }
 \end{rxnscheme}
 \begin{rxnscheme}[,,,.5]{Small scheme}
  \tiny\setatomsep{1em}
  \reactant{ \chemfig{=[::30]-[::-60]OH} }
  \arrow[,<=>]{}{}
  \reactant{ \chemfig{-[::30]=[::-60]O} }
 \end{rxnscheme}
 \begin{rxnscheme}{center}
  \reactant{center}\arrow{}{}\reactant{centered}
 \end{rxnscheme}
 \begin{rxnscheme}[,,right]{right}
  \reactant{right}\arrow{}{}\reactant{raggedleft}
 \end{rxnscheme}
 \begin{rxnscheme}[,,left]{left}
  \reactant{left}\arrow{}{}\reactant{raggedright}
 \end{rxnscheme}
\end{Example}
\index{rxnscheme!options|)}

\subsubsection{Customizing rxnscheme}\index{rxnscheme!customize|(}
\paragraph{Style}\index{rxnscheme!customize!style}
If you don't like the style of \lstinline+rxnscheme+ you can change it by using
\begin{lstlisting}
 \floatstyle{<new style>}
 \restylefloat{rxnfloat}
\end{lstlisting}
There are different possible styles, privided by the `float' package:
\begin{description}
 \vitem=plain= without any special formatting, the caption is below the object
 \vitem=plaintop= like \lstinline=plain=, but the caption is placed above the object
 \vitem=boxed= the object is boxed, the caption placed below
 \vitem=ruled= the caption is placed above the object framed by to rules, one above and one below, another rule frames the object below; default for \lstinline+rxnscheme+
\end{description}
\begin{Example}
 \begin{rxnscheme}{ruled}
  \reactant{default style}
 \end{rxnscheme}
 \floatstyle{boxed}
 \restylefloat{rxnfloat}
 \begin{rxnscheme}{boxed}
  \reactant{framed object}
 \end{rxnscheme}
 \floatstyle{plain}
 \restylefloat{rxnfloat}
 \begin{rxnscheme}{plain}
  \reactant{without any special formatting}
 \end{rxnscheme}
\end{Example}
\floatstyle{ruled}
\restylefloat{rxnfloat}
\paragraph{Placement}\index{rxnscheme!customize!placement}
Usually floating environments have an optional argument for their placement. \lstinline=rxnscheme='s default placement is \lstinline=H= which means, it is placed \emph{exactly here}. If you want to change it into \lstinline=htp= or something, you can use
\begin{lstlisting}
 \floatplacement{rxnfloat}{<placement>}
\end{lstlisting}
It's easier, though, loading \mC with the `placement' option:
\begin{lstlisting}
 \usepackage[placement=<placement>]{mychemistry}
\end{lstlisting}
This will change the default placement behaviour from \lstinline=H= to \lstinline=<placement>=. You can also change the placement behaviour of just one \lstinline+rxnscheme+ environment by using the placement option:
\begin{lstlisting}
 \begin{rxnscheme}[,<placement>]{<caption>}
  ...
 \end{rxnscheme}
\end{lstlisting}

\paragraph{Name}\label{par:rxnscheme_name}\index{rxnscheme!customize!name}
If you want to change the name of reaction scheme\footnote{You probably do. You reading the English documention means probably, that you're not German.}, you can do that with
\begin{lstlisting}
 \setschemename{<new name>}
\end{lstlisting}
The default name is "Reaktionschema" or, with package option `english', "Reaction scheme".
\paragraph{Counter}\index{rxnscheme!customize!counter}
The counter can be changed just as usual. For example by using
\begin{lstlisting}
 \makeatletter
 \@addtoreset{rxnfloat}{section}
 \makeatletter
 \renewcommand{\therxnscheme}{\arabic{section}.\arabic{rxnscheme}}
\end{lstlisting}
the counter is reset with every new section an looks like \lstinline+section.rxnscheme+. Please be aware, that you have to write \lstinline=\@addtoreset= between \lstinline=\makeatletter= and \lstinline=\makeatother= because of the {@}.
\paragraph{List of schemes}\index{rxnscheme!customize!list}
By writing
\begin{lstlisting}
 \listof{rxnfloat}{<title>}
\end{lstlisting}
you can create a list of all schemes created with \lstinline+rxnscheme+.
\begin{SideBySideExample}
 \listof{rxnfloat}{Reaction schemes}
\end{SideBySideExample}
\index{rxnscheme!customize|)}\index{rxnscheme|)}

\subsection{setarrowlength}\label{ssec:setarrowlength}\index{setarrowlength|(}\index{commands!setarrowlength}
The default length of an reaction arrow is \SI{5.0}{\emlength} or $5.0\cdot\sqrt{2}\,\si{\emlength}$ for the diagonal ones. You can change these values using
\begin{lstlisting}
 \setarrowlength{<length>}
\end{lstlisting}
into \UseVerb{arrowlength} or $\text{\UseVerb{arrowlength}}\cdot\sqrt{2}$, respectively. Mind the fact that you have to use a length unit. If you leave the argument empty, the length is reset to default.

{\bfseries This command replaces \lstinline=\arrowlength= from earlier versions.}
\index{setarrowlength|)}

\subsection{setatomsize}\label{ssec:setatomsize}\index{setatomsize|(}\index{commands!setatomsize}
With
\begin{lstlisting}
 \setatomsize{<font size>}
\end{lstlisting}
you can change the font size of the atom groups. Default value is \lstinline=\small=. If you leave the argument empty, the size is reset to default.

{\bfseries This command replaces \lstinline=\atomsize= from earlier versions.}
\index{setatomsize|)}

\subsection{setbondlength}\label{ssec:setbondlength}\index{setbondlength|(}\index{commands!setbondlength}
With
\begin{lstlisting}
 \setbondlength{<length>}
\end{lstlisting}
you can change \lstinline=\setatomsep{<length>}= for all \CF formul\ae\ \emph{inside} of the\\
\mC environments. Default value is \SI{1.8}{\emlength}. If you leave the argument empty, the length is reset to default.

{\bfseries This command replaces \lstinline=\bondlength= from earlier versions.}
\index{setbondlength|)}

\subsection{setarrowline}\label{ssec:setarrowline}\index{setarrowline|(}\index{Befehle!setarrowline}
\NEU%
With the command
\begin{lstlisting}
 \setarrowline{<value>}
\end{lstlisting}
the thickness of the arrows can be customized. Possible values are
 \begin{flushleft}
 \begin{tikzpicture}
   \draw[ultra thin] (0,0)--(1,0)node[right]{\tt ultra thin};
   \draw[very thin] (0,-.5)--(1,-.5)node[right]{\tt very thin};
   \draw[thin] (0,-1)--(1,-1)node[right]{\tt thin};
   \draw[semithick] (0,-1.5)--(1,-1.5)node[right]{{\tt semithick} (default)};
   \draw[thick] (0,-2)--(1,-2)node[right]{\tt thick};
   \draw[very thick] (0,-2.5)--(1,-2.5)node[right]{\tt very thick};
   \draw[ultra thick] (0,-3)--(1,-3)node[right]{\tt ultra thick};
 \end{tikzpicture}
\end{flushleft}
The values \lstinline+very thick+ and \lstinline+ultra thick+ should not be used.

This command also applies to \lstinline+\merge+\index{merge}.
\index{setarrowline|)}

\subsection{setbondshape}\label{ssec:setbondshape}\index{setbondshape|(}\index{commands!setbondshape}
With
\begin{lstlisting}
 \setbondshape{<base length>}{<dash thickness>}{<dash spacing>}
\end{lstlisting}
you can change \lstinline=\setcrambond{<base length>}{<dash thickness>}{<dash spacing>}= for all \CF formul\ae\ \emph{inside} of the \mC environments. Default values are (in this order) \SI{3}{\pt}, \SI{.5}{\pt} and \SI{1}{\pt}. If you leave an argument empty, the value is reset to default.

{\bfseries This command replaces \lstinline=\bondshape= from earlier versions.}
\index{setbondshape|)}

\subsection{setmergelength}\label{ssec:setmergelength}\index{setmergelength|(}\index{commands!setmergelength}
\NEU%
With
\begin{lstlisting}
 \setmergelength{<länge>}
\end{lstlisting}
you can change the length of the \lstinline+\merge+ arrow. More precisely you can change the length of the arrow from the point of line crossing to the arrow tip (see \ref{ssec:merge}). If you leave an argument empty, the value is reset to default (\SI{3}{\emlength}).
\index{setmergelength|)}

\subsection{setrcndist}\label{ssec:setrcndist}\index{setrcndist|(}\index{commands!setrcndist}
The nodes within which the reactants an arrows are set have a certain distance between them. The default distance is \SI{1}{\emlength}. If you want to change that, you can use
\begin{lstlisting}
 \setrcndist{<länge>}
\end{lstlisting}
If you leave the argument empty, the distance is reset to \SI{1}{\emlength}.
\begin{SideBySideExample}
 \setrcndist{2em}
 \begin{rxn}
  \reactant{A}\arrow{}{}
 \end{rxn}
 \setrcndist{}
 \begin{rxn}
  \reactant{A}\arrow{}{}
 \end{rxn}
\end{SideBySideExample}
\index{setrcndist|)}

\subsection{setrxnalign/setschemealign}\label{ssec:setrxnalign}\label{ssec:setschemealign}\index{setrxnalign|(}\index{commands!setrxnalign}\index{setschemealign|(}\index{commands!setschemealign}
With the commands
\begin{lstlisting}
 \setrxnalign{<alignment>}
 \setschemealign{<alignment>}
\end{lstlisting}
The default alignment behaviour of \lstinline+rxn+ and \lstinline+rxnscheme+ (see \ref{sssec:rxn_optionen} \&\ \ref{sssec:rxnscheme_optionen}) can be set. You can choose between \lstinline=left=, \lstinline=center= and \lstinline=right=.

If you leave the argument empty, \mC's default behaviour (\lstinline=center=) is restored.
\begin{Example}
 \setrxnalign{right}
 \begin{rxn}
  \reactant{A}\arrow{}{}\reactant{B}
 \end{rxn}
 \setrxnalign{}
 \begin{rxn}
  \reactant{A}\arrow{}{}\reactant{B}
 \end{rxn}
\end{Example}
\index{setrxnalign|)}\index{setschemealign|)}

\subsection{setschemename}\label{ssec:setschemename}\index{setschemename|(}\index{commands!setschemename}
See \ref{par:rxnscheme_name}.
\index{setschemename|)}

\subsection{transition}\label{ssec:transition}\index{transition|(}\index{commands!transition}
\lstinline=\transition= works exactly like \lstinline=\reactant= (see \ref{ssec:reactant}). \textbf{If you used earlier versions of \mC please be aware, that the command syntax has changed with v1.3.}
\begin{lstlisting}
 \transition[<alignment>,<anchor>,<tikz>]{<formula>}
\end{lstlisting}
\begin{SideBySideExample}
 \begin{rxn}
  \reactant{ \ce{H2 + I2} }
  \arrow[below,<=>,.5]{}{}
  \transition[below]{ \chemfig[dotted][]{H?-I-[2]I-[4]H?} }
  \arrow[below,<=>,.5]{}{}
  \reactant[below]{ \ce{2 HI} }
 \end{rxn}
\end{SideBySideExample}
\index{transition|)}

\section{Examples}
\subsection{Addition Reaction}\label{ssec:addition}
A simple reaction scheme with two different products.
\begin{rxnscheme}{addition reaction}
 \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
 \arrow{ $+ \Hpl$ }{}
 \mesomeric[,rf]{
   \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
   \marrow[below]
   \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
 }
 \branch[right=of rf,,yshift=3em]{
   \arrow{}{}
   \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
 }
 \branch[right=of rf,,yshift=-5em]{
   \arrow{}{}
   \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
 }
\end{rxnscheme}
Let's take a closer look, step after step. At first we write the first reactant and the reaction arrow.
\begin{lstlisting}
 \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
 \arrow{ $+ \Hpl$ }{}
\end{lstlisting}
\begin{rxn}
 \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
 \arrow{ $+ \Hpl$ }{}
\end{rxn}
Then we write the resonance formul\ae. The \lstinline=\mesomeric=\index{mesomeric}\index{marrow} gets the anchor \lstinline=rf= (line 7).
\begin{lstlisting}[firstnumber=3]
 \mesomeric[,rf]{
   \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
   \marrow[below]
   \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
 }
\end{lstlisting}
\begin{rxn}
 \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
 \arrow{ $+ \Hpl$ }{}
 \mesomeric[,rf]{
   \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
   \marrow[below]
   \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
 }
\end{rxn}
Now comes the 1,2-adduct, placed in a branch\index{branch} referring \lstinline+rf+, shifted above with \lstinline+yshift+\index{yshift}:
\begin{lstlisting}[firstnumber=8]
 \branch[right=of rf,,yshift=3em]{
   \arrow{}{}
   \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
 }
\end{lstlisting}
\begin{rxn}
 \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
 \arrow{ $+ \Hpl$ }{}
 \mesomeric[,rf]{
   \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
   \marrow[below]
   \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
 }
 \branch[right=of rf,,yshift=3em]{
   \arrow{}{}
   \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
 }
\end{rxn}
At last we write the branch\index{branch} containing the 1,4-adduct, also referencing \lstinline+rf+, shifted below with \lstinline+yshift+\index{yshift}:
\begin{lstlisting}[firstnumber=12]
 \branch[right=of rf,,yshift=-5em]{
   \arrow{}{}
   \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
 }
\end{lstlisting}
\begin{rxn}
 \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
 \arrow{ $+ \Hpl$ }{}
 \mesomeric[,rf]{
   \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
   \marrow[below]
   \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
 }
 \branch[right=of rf,,yshift=3em]{
   \arrow{}{}
   \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
 }
 \branch[right=of rf,,yshift=-5em]{
   \arrow{}{}
   \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
 }
\end{rxn}
The complete code looks like this:
\begin{lstlisting}
 \begin{rxnscheme}{addition reaction}
  \reactant{ \chemfig{=_[::-30]-[::60](=[::60]O)-[::-60]} }
  \arrow{ $+ \Hpl$ }{}
  \mesomeric[,rf]{
    \reactant{ \chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120,.3,,,white]\oplus)-[::-60]} }
    \marrow[below]
    \reactant[below]{ \chemfig{\oplus-[6,.3,,,white]-[:-30]=_[::60](-[::60]OH)-[::-60]} }
  }
  \branch[right=of rf,,yshift=3em]{
    \arrow{}{}
    \reactant{ \chemname{\chemfig{=_[:-30]-[::60](-[::60]OH)(-[::-120]R)-[::-60]}}{1,2-adduct} }
  }
  \branch[right=of rf,,yshift=-5em]{
    \arrow{}{}
    \reactant{ \chemname{\chemfig{R-[6]-[:-30]=_[::60](-[::60]OH)-[::-60]}}{1,4-adduct} }
  }
 \end{rxnscheme}}
\end{lstlisting}

\subsection{Mesomerism}
We want to display the following reaction scheme:
\begin{rxnscheme}[,,,.8]{electrophilic substitution}
 \setatomsep{1.6em}
 \reactant[,start]{ \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
 \branch[below=of start]{
   \arrow[below,,,pfeil_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
 }
 \branch[below=of pfeil_a,mesomerism,xshift=8.5em]{
 \mesomeric{
   \reactant{
     \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
     \elmove{e1}{60:4mm}{e2}{0:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
     \elmove{e3}{180:4mm}{e4}{150:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
   }
  }
 }
 \branch[above=of mesomerism,,xshift=7.25em]{
   \arrow[above]{$-\Hpl$}{}
 }
 \arrow[,,2.6]{}{}
 \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
\end{rxnscheme}
First we write the main reaction. To do so, we use the commands \lstinline=\reactant=\index{reactant}, \lstinline=\arrow=\index{arrow} and the environment \lstinline=\begin{rxnscheme} ... \end{rxnscheme}=\index{rxnscheme}.
\begin{lstlisting}
 \begin{rxnscheme}{electrophilic substitution}
  \reactant{
   \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
    }
  \arrow{}{}
  \reactant{
    \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
   }
 \end{rxnscheme}
\end{lstlisting}
 \begin{rxn}
  \reactant{
   \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
    }
  \arrow{}{}
  \reactant{
    \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
   }
 \end{rxn}
Now we make it a little bit smaller:
\begin{lstlisting}
 \begin{rxnscheme}[,,,!!.8!!]{electrophilic substitution}
  !!\setatomsep{1.6em}!!
  \reactant{
   \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
    }
  \arrow{}{}
  \reactant{
    \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
   }
 \end{rxnscheme}
\end{lstlisting}
 \begin{rxn}[,.8]
  \setatomsep{1.6em}
  \reactant{
   \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
    }
  \arrow{}{}
  \reactant{
    \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
   }
 \end{rxn}
We have two possibilities to align both benzene rings at the same height. Either we shift the second one up using \TikZ\index{tikz@\TikZ} code:
\begin{lstlisting}[firstnumber=7]
 \reactant[,,!!yshift=1em!!]{
  \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
 }
\end{lstlisting}
This is not the best solution, because the arrow\index{arrow} isn't centered with respect to the rings.
 \begin{rxn}
  \reactant{
   \chemname{\chemfig{*6(-=-=-=)}}{benzene \compound{benzene}}
    }
  \arrow{}{}
  \reactant[,,yshift=1em]{
    \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
   }
 \end{rxn}
The second possibility would be to shift the first ring down. We can't achieve that by using \TikZ\index{tikz@\TikZ} code, because the following arrow\index{arrow} and reactant\index{reactant} align themselves with respect to the reactant or arrow directly before. But we can write an invisible bromine to the first benzene to do the trick:
\begin{lstlisting}[firstnumber=3]
 \reactant{
  \chemname{\chemfig{*6(-=-=!!(-[,,,,white]\phantom{Br})!!-=)}}{benzene \compound{benzene}}
 }
\end{lstlisting}
 \begin{rxn}
  \reactant{
   \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
    }
  \arrow{}{}
  \reactant{
    \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
   }
 \end{rxn}
We need to give the first reactant an anchor in order to refer to it with the branch\index{branch}.
 \begin{lstlisting}
 \begin{rxnscheme}[,,,.8]{electrophilic substitution}
  \setatomsep{1.6em}
  \reactant[,!!start!!]{
   \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
    }
   \branch[!!below=of start!!]{
     \arrow[!!below!!,,,,both]{ \ce{Br2 / AlBr3} }{ $-\ce{AlBr4\om}$ }
   }
  \arrow{}{}
  \reactant{
    \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
   }
 \end{rxnscheme}
\end{lstlisting}
So the first reactant gets the anchor \lstinline=start= and the branch\index{branch} refers to it with \lstinline+below=of start+. For the reaction arrow to point below, we need to use the option \lstinline+below+. Now we get:
 \begin{rxn}[,.8]
  \setatomsep{1.6em}
  \reactant[,start]{
   \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
    }
   \branch[below=of start]{
     \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
   }
  \arrow{}{}
  \reactant{
    \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
   }
 \end{rxn}
Next we write the resonance formul\ae\ of the Wheland intermediate. To do that we use three further commands: \lstinline=\mesomeric=\index{mesomeric}, \lstinline=\marrow=\index{marrow} and \lstinline=\elmove=\index{elmove}.
\begin{lstlisting}
 !!\mesomeric{!!
   \reactant{
     \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
     !!\elmove{e1}{60:4mm}{e2}{0:4mm}!!
   }
   !!\marrow!!
   \reactant{
     \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
     \elmove{e3}{180:4mm}{e4}{150:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
   }
 !!}!!
\end{lstlisting}
\begin{rxn}[,.8]
 \setatomsep{1.6em}
 \mesomeric{
   \reactant{
     \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
     \elmove{e1}{60:4mm}{e2}{0:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
     \elmove{e3}{180:4mm}{e4}{150:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
   }
 }
\end{rxn}
When we write the code \emph{inside} of the branch\index{branch}, directly after the arrow, we get the following:
\begin{rxn}[,.8]
 \setatomsep{1.6em}
 \reactant[,start]{
  \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
 }
 \branch[below=of start]{
 \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
  \mesomeric{
   \reactant{
     \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
     \elmove{e1}{60:4mm}{e2}{0:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
     \elmove{e3}{180:4mm}{e4}{150:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
   }
  }
 }
 \arrow{}{}
 \reactant{
   \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
 }
 \end{rxn}
This obviously messes everything up. We can try this, though:
\begin{lstlisting}
 \begin{rxn}[,.8]
  \setatomsep{1.6em}
  \reactant[,start]{
   \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
    }
   \branch[below=of start]{
     \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
     \mesomeric!![below]!!{
       \reactant{
         \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
         \elmove{e1}{60:4mm}{e2}{0:4mm}
       }
       \marrow
       \reactant{
         \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
         \elmove{e3}{180:4mm}{e4}{150:4mm}
       }
       \marrow
       \reactant{
         \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
       }
     }
   }
  \arrow{}{}
  \reactant{
    \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
   }
 \end{rxn} 
\end{lstlisting}
The result is better:
 \begin{rxn}[,.8]
  \setatomsep{1.6em}
  \reactant[,start]{
   \chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}}
    }
   \branch[below=of start]{
     \arrow[below,,,,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
     \mesomeric[below]{
       \reactant{
         \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
         \elmove{e1}{60:4mm}{e2}{0:4mm}
       }
       \marrow
       \reactant{
         \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
         \elmove{e3}{180:4mm}{e4}{150:4mm}
       }
       \marrow
       \reactant{
         \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
       }
     }
   }
  \arrow{}{}
  \reactant{
    \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}}
   }
 \end{rxn}
It isn't really what we want, though, because the intermediate is centered below the arrow. In order to be able to shift the whole thing, we place it into a branch\index{branch} of its own.
\begin{lstlisting}[firstnumber=4]
 ...
 \branch[below=of start]{
   \arrow[below,,,!!arrow_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
 }
 !!\branch[below=of arrow_a]{!!
   \mesomeric{
     \reactant{
       \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
       \elmove{e1}{60:4mm}{e2}{0:4mm}
     }
     \marrow
     \reactant{
       \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
       \elmove{e3}{180:4mm}{e4}{150:4mm}
     }
     \marrow
     \reactant{
       \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
     }
   }
 !!}!!
 ...
\end{lstlisting}
\begin{rxn}[,.8]
 \setatomsep{1.6em}
 \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
 \branch[below=of start]{
   \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
 }
 \branch[below=of arrow_a]{
  \mesomeric[,mesomerism]{
   \reactant{
     \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
     \elmove{e1}{60:4mm}{e2}{0:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
     \elmove{e3}{180:4mm}{e4}{150:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
   }
  }
 }
 \arrow{}{}
 \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
\end{rxn}
In first sight this isn't better. But by shifting the branch with \lstinline+xshift+\index{xshift}, we get what we want:
\begin{lstlisting}[firstnumber=4]
 ...
 \branch[below=of start]{
   \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
 }
 \branch[below=of arrow_a,,!!xshift=8.5em!!]{
   \mesomeric{
     \reactant{
       \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
       \elmove{e1}{60:4mm}{e2}{0:4mm}
     }
     \marrow
     \reactant{
       \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
       \elmove{e3}{180:4mm}{e4}{150:4mm}
     }
     \marrow
     \reactant{
       \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
     }
   }
 }
 ...
\end{lstlisting}
\begin{rxn}[,.8]
 \setatomsep{1.6em}
 \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
 \branch[below=of start]{
   \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
 }
 \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
  \mesomeric{
   \reactant{
     \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
     \elmove{e1}{60:4mm}{e2}{0:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
     \elmove{e3}{180:4mm}{e4}{150:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
   }
  }
 }
 \arrow{}{}
 \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
\end{rxn}
The last arrow is also placed in its own branch, so we can shift it where we want.
\begin{lstlisting}[firstnumber=4]
 ...
 \branch[below=of start]{
   \arrow[below,,,!!arrow_a!!,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
 }
 \branch[below=of arrow_a,!!mesomerism!!,xshift=8.5em]{
   \mesomeric{
     \reactant{
       \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
       \elmove{e1}{60:4mm}{e2}{0:4mm}
     }
     \marrow
     \reactant{
       \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
       \elmove{e3}{180:4mm}{e4}{150:4mm}
     }
     \marrow
     \reactant{
       \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
     }
   }
 }
 \branch[!!above=of mesomerism,,xshift=7.25em!!]{
   \arrow[above]{$-\Hpl$}{}
 }
 ...
\end{lstlisting}
\begin{rxn}[,.8]
 \setatomsep{1.6em}
 \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }
 \branch[below=of start]{
   \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
 }
 \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
  \mesomeric{
   \reactant{
     \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
     \elmove{e1}{60:4mm}{e2}{0:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
     \elmove{e3}{180:4mm}{e4}{150:4mm}
   }
   \marrow
   \reactant{
     \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
   }
  }
 }
 \branch[above=of mesomerism,,xshift=7.25em]{
   \arrow[above]{$-\Hpl$}{}
 }
 \arrow{}{}
 \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
\end{rxn}
Now we're almost there: the arrow of the main reaction still is too short. The complete code:
\begin{lstlisting}
 \begin{rxnscheme}[,,,.8]{electrophilic substitution}
 \setatomsep{1.6em}
 \reactant[,start]{\chemname{\chemfig{*6(-=-=(-[,,,,white]\phantom{Br})-=)}}{benzene \compound{benzene}} }

 \branch[below=of start]{
   \arrow[below,,,arrow_a,both]{\ce{Br2 / AlBr3}}{$-\ce{AlBr4\om}$}
 }
 \branch[below=of arrow_a,mesomerism,xshift=8.5em]{
   \mesomeric{
     \reactant{
       \chemfig{*6(=[@{e1}]-=-(-[:120]Br)(-[:60]H)-(-[:-30,.4,,,white]\oplus)-[@{e2}])}
       \elmove{e1}{60:4mm}{e2}{0:4mm}
     }
     \marrow
     \reactant{
       \chemfig{*6(-(-[:90,.4,,,white]\oplus)-[@{e4}]=[@{e3}]-(-[:120]Br)(-[:60]H)-=)}
       \elmove{e3}{180:4mm}{e4}{150:4mm}
     }
     \marrow
     \reactant{
       \chemfig{*6(-=-(-[:-150,.4,,,white]\oplus)-(-[:120]Br)(-[:60]H)-=)}
     }
   }
 }
 \branch[above=of mesomerism,,xshift=7.25em]{
   \arrow[above]{$-\Hpl$}{}
 }

 \arrow[,,!!2.6!!]{}{}
 \reactant{ \chemname{\chemfig{*6(-=-=(-Br)-=)}}{bromobenzene \compound{bromobenzene}} }
 \end{rxnscheme}
\end{lstlisting}

\newpage
\subsection{Hydratisation}\label{ssec:hydratisation}
\pgfdeclaredecoration{ddbond}{initial}{%
  \state{initial}[width=2pt]{%
    \pgfpathlineto{\pgfpoint{2pt}{0pt}}%
    \pgfpathmoveto{\pgfpoint{1.5pt}{2pt}}%
    \pgfpathlineto{\pgfpoint{2pt}{2pt}}%
    \pgfpathmoveto{\pgfpoint{2pt}{0pt}}%
  }%
  \state{final}{%
    \pgfpathlineto{\pgfpointdecoratedpathlast}%
  }%
}%
\tikzset{lddbond/.style={decorate,decoration=ddbond}}%
\tikzset{rddbond/.style={decorate,decoration={ddbond,mirror}}}%
\newcommand*\delm{\ensuremath{\text{\tiny$\delta\ominus$}}}%
\newcommand*\delp{\ensuremath{\text{\tiny$\delta\oplus$}}}%
A scheme with transition\index{transition} states.

\begin{rxnscheme}[rs:hydratisation,htp]{Hydratisation}
 \reactant[,carbonyl_A]{\chemfig{R_2C=O}}
 \anywhere{above=of carbonyl_A}{\chemfig{H-[:-30]O-[:30]H}}
 \arrow[,<=>]{\tiny slow}{}
 \transition[,transition_A]{\chemfig{R_2C(-[2,,2,,densely dotted]\chemabove{O}{\delp}(-[:150]H)-[:30]H)-[:-30,1.15,,,lddbond]O-[6,,,,densely dotted]H-[,,,,densely dotted]\chemabove{A}{\delm}}}
 \anywhere{below=of transition_A,text width=3cm}{(general transition state, acid cat.)}
 \arrow[,<=>,.5]{}{}
 \reactant{\chemfig{R_2C(-[:60]\chemabove{O}{\scriptstyle\oplus}H_2)-[:-60]OH}}
 \arrow[below right,<=>,.5]{$-\Hpl$}{}
 \reactant[below right]{\chemfig{R_2C(-[:60]OH)-[:-60]OH}}
 \arrow[below left,<=>,.5]{\ce{H2O}}{}
 \reactant[below left,zw]{\chemfig{R_2C(-[:60]OH)-[:-60]O|\om}}
 \arrow[left,<=>,.5]{}{}
 \transition[left,transition_B]{\chemfig{R_2C(-[2,,2,,densely dotted]O(-[:150]H-[4,,,,densely dotted]\chemabove{B}{\delp})-[:30]H)-[:-30,1.15,,,lddbond]\chemabove{O}{\delm}-[6,,,,draw=none]\phantom{H}}}
 \anywhere{below=of transition_B,text width=3cm}{(general transition state, base cat.)}
 \arrow[left,<=>]{\tiny slow}{}
 \reactant[left,carbonyl_B]{\chemfig{R_2C=O}}
 \anywhere{above=of carbonyl_B}{\chemfig{H-[:-30]O-[:30]H}}
\end{rxnscheme}

For this example we first declare a style for the delocalized double bonds:\index{tikz@\TikZ}
\begin{lstlisting}
 \pgfdeclaredecoration{ddbond}{initial}{%
   \state{initial}[width=2pt]{%
     \pgfpathlineto{\pgfpoint{2pt}{0pt}}%
     \pgfpathmoveto{\pgfpoint{1.5pt}{2pt}}%
     \pgfpathlineto{\pgfpoint{2pt}{2pt}}%
     \pgfpathmoveto{\pgfpoint{2pt}{0pt}}%
   }%
   \state{final}{%
     \pgfpathlineto{\pgfpointdecoratedpathlast}%
   }%
 }%
 \tikzset{lddbond/.style={decorate,decoration=ddbond}}%
 \tikzset{rddbond/.style={decorate,decoration={ddbond,mirror}}}%
\end{lstlisting}
Now the delocalized double bond can be used via \CF's fifth option (see the \CF manual):
\begin{SideBySideExample}
 \chemfig{-[,,,,lddbond]-[,,,,rddbond]}
\end{SideBySideExample}
Further we define the two commands
\begin{lstlisting}
 \newcommand*\delm{\ensuremath{\text{\tiny$\delta\ominus$}}}%
 \newcommand*\delp{\ensuremath{\text{\tiny$\delta\oplus$}}}%
\end{lstlisting}
to use the partial charges without effort.

Then the whole code looks like follows:\index{anywhere}
\begin{lstlisting}
 \begin{rxnscheme}[rs:hydratisation,htp]{Hydratisation}
  \reactant[,carbonyl_A]{\chemfig{R_2C=O}}
  \anywhere{above=of carbonyl_A}{\chemfig{H-[:-30]O-[:30]H}}
  \arrow[,<=>]{\tiny slow}{}
  \transition[,transition_A]{\chemfig{R_2C(-[2,,2,,densely dotted]\chemabove{O}{\delp}(-[:150]H)-[:30]H)-[:-30,1.15,,,lddbond]O-[6,,,,densely dotted]H-[,,,,densely dotted]\chemabove{A}{\delm}}}
  \anywhere{below=of transition_A,text width=3cm}{(general transition state, acid cat.)}
  \arrow[,<=>,.5]{}{}
  \reactant{\chemfig{R_2C(-[:60]\chemabove{O}{\scriptstyle\oplus}H_2)-[:-60]OH}}
  \arrow[below right,<=>,.5]{$-\Hpl$}{}
  \reactant[below right]{\chemfig{R_2C(-[:60]OH)-[:-60]OH}}
  \arrow[below left,<=>,.5]{\ce{H2O}}{}
  \reactant[below left,zw]{\chemfig{R_2C(-[:60]OH)-[:-60]O|\om}}
  \arrow[left,<=>,.5]{}{}
  \transition[left,transition_B]{\chemfig{R_2C(-[2,,2,,densely dotted]O(-[:150]H-[4,,,,densely dotted]\chemabove{B}{\delp})-[:30]H)-[:-30,1.15,,,lddbond]\chemabove{O}{\delm}-[6,,,,draw=none]\phantom{H}}}
  \anywhere{below=of transition_B,text width=3cm}{(general transition state, base cat.)}
  \arrow[left,<=>]{\tiny langsam}{}
  \reactant[left,carbonyl_B]{\chemfig{R_2C=O}}
  \anywhere{above=of carbonyl_B}{\chemfig{H-[:-30]O-[:30]H}}
  \end{rxnscheme}
\end{lstlisting}

\subsection{Esterification}\label{ssec:veresterung}
\begin{rxn}
 \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-H}}
 \arrow[,-+>,1.2,protolysis]{\ce{H2SO4}}{\ce{HSO4\om}}
 \anywhere{below=of protolysis,yshift=1em}{\tiny protolysis}
 \mesomeric{
   \reactant{\chemfig{H-@{a2}C(-[:60]O-H)(-[:30,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-H}}
   \marrow
   \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-H}}
 }
 \branch[on chain=going below,,xshift=-5em]{
   \arrow[below,<=>]{\tiny addition}{\chemfig{H-[:120]@{a1}O-[:60]CH_3}}
   \reactant[below]{\chemfig{H-C(-[2]O-[:30]H)(-\chemabove{O}{\scriptstyle\oplus}(-[:60]CH_3)-[:-60]H)-[6]O-[:-30]H}}
 }
 \elmove{a1}{90:1.5cm}{a2}{0:3cm}
 \branch[on chain=going left,,yshift=-3.5em]{
   \arrow[left,<=>]{}{\tiny protolysis}
 }
 \reactant[left]{\chemfig{H-C(-[2]O-[:30]H)(-O-CH_3)-[@{b1}6]@{a3}\chemabove{O}{\hspace*{-4mm}\scriptstyle\oplus}(-[:-150]H)-[:-30]H}}
 \elmove{b1}{0:5mm}{a3}{20:5mm}
 \arrow[below,<=>]{\ce{- H2O}}{\tiny elimination}
 \mesomeric[below,,xshift=6em]{
   \reactant{\chemfig{H-C(-[:60]O-H)(-[,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-CH_3}}
   \marrow
   \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-CH_3}}
 }
 \arrow[,-+>,1.2]{\ce{HSO4\om}}{\ce{H2SO4}}
 \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-CH_3}}
\end{rxn}
\begin{lstlisting}
 \begin{rxn}
  \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-H}}
  \arrow[,-+>,1.2,protolysis]{\ce{H2SO4}}{\ce{HSO4\om}}
  \anywhere{below=of protolysis,yshift=1em}{\tiny protolysis}
  \mesomeric{
    \reactant{\chemfig{H-@{a2}C(-[:60]O-H)(-[:30,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-H}}
    \marrow
    \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-H}}
  }
  \branch[on chain=going below,,xshift=-5em]{
    \arrow[below,<=>]{\tiny addition}{\chemfig{H-[:120]@{a1}O-[:60]CH_3}}
    \reactant[below]{\chemfig{H-C(-[2]O-[:30]H)(-\chemabove{O}{\scriptstyle\oplus}(-[:60]CH_3)-[:-60]H)-[6]O-[:-30]H}}
  }
  \elmove{a1}{90:1.5cm}{a2}{0:3cm}
  \branch[on chain=going left,,yshift=-3.5em]{
    \arrow[left,<=>]{}{\tiny protolysis}
  }
  \reactant[left]{\chemfig{H-C(-[2]O-[:30]H)(-O-CH_3)-[@{b1}6]@{a3}\chemabove{O}{\hspace*{-4mm}\scriptstyle\oplus}(-[:-150]H)-[:-30]H}}
  \elmove{b1}{0:5mm}{a3}{20:5mm}
  \arrow[below,<=>]{\ce{- H2O}}{\tiny elimination}
  \mesomeric[below,,xshift=6em]{
    \reactant{\chemfig{H-C(-[:60]O-H)(-[,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-CH_3}}
    \marrow
    \reactant{\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-CH_3}}
  }
  \arrow[,-+>,1.2]{\ce{HSO4\om}}{\ce{H2SO4}}
  \reactant{\chemfig{H-C(=[:60]O)-[:-60]O-CH_3}}
 \end{rxn}
\end{lstlisting}

\subsection[Extensive Synthesis]{Creating an extensive synthesis using \mC and \CF}\label{ssec:tikzsynthese}
As last example we can create extensive syntheses, using the \lstinline=\merge=\index{merge} command.
\begin{rxnscheme}[rs:synthese,htp,,.8]{synthesis of chrysanthemum acid}
 \setatomsep{1.5em}
 \branch[,start_left]{
   \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
   \arrow[below]{\ce{HBr}}{}
   \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
 }
 \branch[right=of start_left,start_center,yshift=1em]{
   \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
   \arrow[below]{\ce{NaOH}}{\ce{Zn}}
   \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
 }
 \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
   \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
   \arrow[below]{\ce{CH3OH}}{}
   \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
 }
 \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
   \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
 }
 \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
   \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
   \arrow[below,,.5]{}{}
   \arrow[below,,.5]{\ce{KOH}}{}
   \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
 }
 \merge{target_one}{start_left}{start_center}
 \merge[\ce{NaOCH3}]{target_two}{target_one}{start_right}
\end{rxnscheme}
\begin{lstlisting}
 \begin{rxnscheme}[,htp,,.8]{synthesis of chrysanthemum acid}
  \setatomsep{1.5em}
  \branch[,start_left]{
    \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
    \arrow[below]{\ce{HBr}}{}
    \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
  }
  \branch[right=of start_left,start_center,yshift=1em]{
    \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
    \arrow[below]{\ce{NaOH}}{\ce{Zn}}
    \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
  }
  \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
    \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
    \arrow[below]{\ce{CH3OH}}{}
    \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
  }
  \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
    \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
  }
  \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
    \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
    \arrow[below,,.5]{}{}
    \arrow[below,,.5]{\ce{KOH}}{}
    \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
  }
  \merge{target_one}{start_left}{start_center}
  \merge[\ce{NaOCH3}]{target_two}{target_one}{start_right}
 \end{rxnscheme}
\end{lstlisting}
Let's go through the code, piece by piece.
\begin{lstlisting}
 \begin{rxnscheme}[,htp,,.8]{synthesis of chrysanthemum acid}
  \setatomsep{1.5em}
  \branch[,start_left]{
    \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
    \arrow[below]{\ce{HBr}}{}
    \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
  }
\end{lstlisting}
In lines 1 and 2 we begin the environment and make sure, that the formul\ae\ don't become to big. In lines 3 -- 7 the first two reactants are written (lines 4 and 6) and connected with an arrow (line 5).
\begin{rxn}[,.8]
  \setatomsep{1.5em}
  \branch[,start_left]{
    \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
    \arrow[below]{\ce{HBr}}{}
    \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
  }
\end{rxn}
\begin{lstlisting}[firstnumber=8]
  \branch[right=of start_left,start_center,yshift=1em]{
    \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
    \arrow[below]{\ce{NaOH}}{\ce{Zn}}
    \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
  }
\end{lstlisting}
In the following lines 8 -- 12, we create the second branch of the synthesis.
\begin{rxn}[,.8]
 \setatomsep{1.5em}
 \branch[,start_left]{
   \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
   \arrow[below]{\ce{HBr}}{}
   \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
 }
 \branch[right=of start_left,start_center,yshift=1em]{
   \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
   \arrow[below]{\ce{NaOH}}{\ce{Zn}}
   \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
 }
\end{rxn}
\begin{lstlisting}[firstnumber=13]
  \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
    \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
    \arrow[below]{\ce{CH3OH}}{}
    \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
  }
  \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
    \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
  }
\end{lstlisting}
In lines 13 -- 20 we create the third branch and the product of the first two branches.
\begin{rxn}[,.8]
 \setatomsep{1.5em}
 \branch[,start_left]{
   \reactant{\chemfig{=_[::30]-[::-60]-[::60](-[::-60])(-[::120])-[::0]OH}}
   \arrow[below]{\ce{HBr}}{}
   \reactant[below]{\chemfig{Br-[::30]-[::-60]=_[::60](-[::-60])-[::60]}}
 }
 \branch[right=of start_left,start_center,yshift=1em]{
   \reactant{\chemname{\chemfig[][scale=.8]{**6(--(-SO_2Cl)---(-)-)}}{tosyle chloride}}
   \arrow[below]{\ce{NaOH}}{\ce{Zn}}
   \reactant[below]{\chemfig[][scale=.8]{**6(--(-SO_2Na)---(-)-)}}
 }
 \branch[right=of start_center,start_right,xshift=3em,yshift=-10em]{
   \reactant{\chemname{\chemfig{-[::30](-[::60])=_[::-60]-[::60]COOH}}{3-methyl-2-butenoic acid}}
   \arrow[below]{\ce{CH3OH}}{}
   \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
 }
 \branch[below=of start_left,target_one,xshift=5em,yshift=-5em]{
   \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
 }
\end{rxn}
\begin{lstlisting}[firstnumber=21]
 \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
   \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
   \arrow[below,,.5]{}{}
   \arrow[below,,.5]{\ce{KOH}}{}
   \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
 }
\end{lstlisting}
In lines 21 -- 26 we create the last branch.
\begin{rxn}[,.8]
 \dummy[start_left]
 \branch[right=of start_left,start_right,xshift=13em,yshift=-4em]{
   \reactant[below]{\chemfig{-[::30](-[::60])=_[::-60]-[::60]CO_2CH_3}}
 }
 \branch[below=of start_left,target_one,xshift=5em]{
   \reactant{\chemfig[][scale=.8]{**6(--(-SO_2-[:30]-[::-60]=_[::60](-[::60])-[::-60])---(-)-)}}
 }
 \branch[below=of target_one,target_two,xshift=6em,yshift=-6em]{
   \mesomeric{\chemfig[][scale=.8]{-[::30](-[::60])=^[::-60]-[::60](-[::60]S(=[::90]O)(=[::-90]O)-[::0]**6(---(-)---))-[::-60](-[::0])(-[::-120])-[::60](-[::60,.5,,,white]\ominus)-[::-60]CO_2CH_3}}
   \arrow[below,,.5]{}{}
   \arrow[below,,.5]{\ce{KOH}}{}
   \reactant[below]{\chemname{\chemfig{-[::-30](-[::-60])=^[::60]>[::-60](-[::90,1.2])-[::30,1.2](-[::120,1.2](-[::-60])-[::0])<:[::-30]COOH}}{\emph{trans}-chrysanthemum acid}}
 }
\end{rxn}
Finally, the different branches are merged\index{merge}, the second merging arrow gets a label and the environment is ended.
\begin{lstlisting}[firstnumber=27]
  \merge{target_one}{start_left}{start_center}
  \merge[\ce{NaOCH3}]{target_two}{target_one}{start_right}
 \end{rxnscheme}
\end{lstlisting}

\section{Epilogue}
\mC is still very new. This means there are probably a number of bugs I haven't discovered yet. There also might be missing one or two features, that would be useful. Since I only can test and work on \mC in my spare time, I'd be very glad about \emph{every} kind of feedback. If you like \mC, why don't you help me improve it by telling me your experiences?

I tried using real chemical reactions but I didn't make sure, that they all make sense chemically. So you shouldn't trust the examples in respect to chemistry but rather take a look into a real chemistry teaching book.

I apologize for any bad or wrong English. I hope you understood the documention anyway.

Have fun with \mC!

\par\vspace{.5cm}\hspace{.5cm}Clemens Niederberger, Berlin, \mCdate{en}

\section{Thanks}
I owe thanks for bug reports and suggestions to:

F.\,Chervet, Ferghun, V.\,Garibal.

\printindex
\end{document}