summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/endiagram/endiagram_en.tex
blob: 74be547af91206cfaa89aae49b8fa1f78a5f3607 (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
% arara: pdflatex
% arara: biber
% arara: pdflatex
% arara: pdflatex
% --------------------------------------------------------------------------
% the ENdiagram package
%
%   easy creation of potential energy curve diagrams
%
% --------------------------------------------------------------------------
% Clemens Niederberger
% Web:    https://www.bitbucket.org/cgnieder/endiagram
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011--2013 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 endiagram.sty, endiagram_en.tex,
% README and the derived file endiagram_en.pdf.
% --------------------------------------------------------------------------
\documentclass[load-preamble+]{cnltx-doc}
\usepackage[utf8]{inputenc}
\usepackage{endiagram}

\setcnltx{
  package = endiagram ,
  title   = \ENdiagram ,
  authors = Clemens Niederberger ,
  email   = contact@mychemistry.eu ,
  url     = https://bitbucket.org/cgnieder/endiagram/ ,
  add-cmds = {
    AddAxisLabel, 
    ENcurve, ENsetup,
    MakeOrigin,  ShowEa, ShowGain,
    ShowNiveaus
  } ,
  add-envs = { MOdiagram } ,
  add-silent-cmds = {
    arrow,
    calory, ch, chemfig, chemsetup, color, command,
    DeclareChemIUPAC, draw,
    fontfamily,
    iso,
    joule,
    kilo,
    lewis, libertineLF,
    mole,
    node,
    per,
    schemestart, schemestop, selectfont, setatomsep, sisetup,
    tert, tikz, transitionstatesymbol
  }
}

\newpackagename\ENdiagram{endiagram}

\defbibheading{bibliography}{\addsec{References}}

\usepackage{chemmacros,chemfig,ragged2e}

\usepackage{acro}
\acsetup{short-format=\scshape}
\DeclareAcronym{su}{
  short = su ,
  long  = standard unit
}
\DeclareAcronym{CTAN}{
  short = ctan ,
  long  = Comprehensive \TeX{} Archive Network
}
\DeclareAcronym{MWE}{
  short = mwe ,
  long  = minimal working example
}

\begin{filecontents}{\jobname.bib}
@book{brueckner,
  author    = {Reinhard Br\"uckner},
  title     = {Reaktionsmechanismen},
  publisher = {Springer-Verlag Berlin Heidelberg},
  edition   = {3.\,Auflage, 2.\,korrigierter Nachdruck},
  year      = {2009},
  isbn      = {978-3-8274-1579-0}
}
@package{pkg:tikz,
  author    = {Till Tantau and Mark Wibrow and Christian Feuersänger},
  title     = {Ti\textbf{\textit{k}}Z/pgf},
  sorttitle = {TikZ},
  version   = {2.10},
  date      = {2010-20-25},
  url       = {http://sourceforge.net/projects/pgf/},
  urldate   = {2013-04-18}
}
@package{pkg:siunitx,
  author    = {Joseph Wright},
  title     = {siunitx},
  version   = {2.5q},
  date      = {2013-03-11},
  url       = {mirror.ctan.org/macros/latex/contrib/siunitx/}
}
\end{filecontents}

% \setlength{\marginparwidth}{1.5\marginparwidth}

\newcommand*\TikZ{Ti\textit{k}Z}

\begin{document}

\section{Licence and Requirements}
\license

\ENdiagram\ needs the \bnd{l3kernel}~\cite{bnd:l3kernel} and the package
\pkg{xparse}. \pkg{xparse} is part of the
\bnd{l3packages}~\cite{bnd:l3packages} bundle. \ENdiagram\ also needs
\TikZ~\cite{pkg:pgf} and \pkg{siunitx}~\cite{pkg:siunitx}.

Basic knowledge of \TikZ/pgf is recommended.

\section{Caveat}
This package is in an experimental state.  There is lots of code to clean up
and there are many loose ends to be tied together until I'll be satisfied to
publish this package as stable.  However, as the unofficial release on my blog
has gotten quite some interest\footnote{$\ge 400$ downloads} I decided to
publish this experimental version on the \CTAN{} nonetheless.

If you detect any bugs -- and I guess you will -- please write me a short email
with a \ac{MWE} showing the undesired behaviour or report on issue on
\url{https://www.bitbucket.org/cgnieder/endiagram}.

\section{Setup}

There are two kinds of options: choice options where you can choose one of the
values separated with \code{|}; an underlined value is a default value that is
used, if no value is given.  The others need a value of a certain type like a
number (\meta{num}), arbitrary input (\meta{text}), \TikZ\ options
(\meta{tikz}) \etc.

As a rule commands are only defined inside the \env{endiagram} environment.

Options can also be set up with this command:
\begin{commands}
  \command{ENsetup}[\oarg{module}\marg{options}]
    The setup command.
\end{commands}

\begin{sourcecode}
  \ENsetup{option1 = value1, option2 = value2}
  \ENsetup{module/option = value}
  \ENsetup[module]{option = value}
\end{sourcecode}

Options that belong to a module are specific to a command.  The command
\cs*{command} they belong to can \emph{only} have the options marked with
\module*{command} in his argument \oarg{options}.

All other options can also be set globally as package options.  These are
options which do \emph{not} belong to a module like for example the
\option{draft} option (see page~\pageref{key:debug}):
\begin{sourcecode}
  \usepackage[draft]{endiagram}
\end{sourcecode}

\section{The Curve --  \cs*{ENcurve}}
The potential energy curves are drawn inside the \env{endiagram}
environment using the command \cs{ENcurve}.
\begin{environments}
  \environment{endiagram}[\oarg{options}]
    The basic environment for the potential energy curves
\end{environments}
\begin{commands}
  \command{ENcurve}[\oarg{options}\Marg{\meta{level1},\meta{level2},\meta{level3}}]
    The basic command for drawing the actual curve.
\end{commands}
The command needs a comma separated list of relative energy levels.
\cs{ENcurve}\Marg{1,4,0} means the maximum is four times higher above the end
level than the starting level.

\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

\cs{ENcurve} can read any number of values but needs \emph{at least three}.
Less values will cause an error.
\begin{example}
  \begin{endiagram}
    \ENcurve{1,5,2.5,4,0}
  \end{endiagram}
  \quad
  \begin{endiagram}[scale=.7]
    \ENcurve{1,7,2.5,6,3,4,0}
  \end{endiagram}
\end{example}

\subsection{Properties}
\subsubsection{Scaling}

Values given to \cs{ENcurve} are multiples of \ENdiagram's \ac{su}.  As a default
it is set to \SI{.5}{cm} but can be changed using an option.  There are other ways
to influence the size of the diagram, too.
\begin{options}
 \keyval{unit}{length}\Default{.5cm}
   The standard unit for \cs{ENcurve} and some other commands.  This document
   refers to it with \ac{su}. \label{key:unit}
 \keyval{scale}{factor}\Default{1}
   A scaling factor that allows scaling the diagram.
\end{options}

A changed \ac{su}:
\begin{example}[side-by-side]
  \begin{endiagram}[unit=2em]
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

Scaled by the factor \code{1.5}:
\begin{example}[side-by-side]
  \begin{endiagram}[scale=1.5]
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

\subsubsection{Influencing the position relative to the axes}

The \option{offset} options control the length and position of the horizontal
axis relative to the curve.
\begin{options}
  \keyval{offset}{num}\Default{0}
    \meta{num} is a multiple of the \ac{su} (see page~\pageref{key:unit}).
  \keyval{r-offset}{num}\Default{0}
    \meta{num} is a multiple of the \ac{su}.
  \keyval{l-offset}{num}\Default{0}
    \meta{num} is a multiple of the \ac{su}.
\end{options}

The default behaviour for comparison:
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

\option{l-offset} controls the distance of the start of the $x$ axis to the
start of the curve:
\begin{example}[side-by-side]
  closer to the $y$ axis:\par
  \begin{endiagram}[l-offset=-1]
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

\option{r-offset} controls the ``protruding'' of the $x$ axis after the curve:
\begin{example}[side-by-side]
  $x$ axis extended to the right:\par
  \begin{endiagram}[r-offset=1]
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

\option{offset} changes both values equally:
\begin{example}[side-by-side]
  $x$ extended to the left and the right:\par
  \begin{endiagram}[offset=1]
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

\subsubsection{Increment between the levels}

With the option \option{step} the default increment between the levels can be
changed:
\begin{options}
  \keyval{step}{num}\Module{ENcurve}\Default{2}
    \meta{num} is a multiple of the \ac{su} (see page~\pageref{key:unit}).
\end{options}

\begin{example}
  \begin{endiagram}
    \ENcurve{1,4,0}
  \end{endiagram}
  \quad
  \begin{endiagram}
    \ENcurve[step=3]{1,4,0}
  \end{endiagram}
\end{example}

Sometimes a certain level should be shifted against the others.  This is
possible using an optional argument to the value of that level:
\begin{commands}
  \command{ENcurve}[\Marg{\meta{level}\oarg{offset},...}]
    \meta{offset} is a multiple of the \ac{su} (see page~\pageref{key:unit})
    and is set to \code{0} as default. The level will be shifted to the right
    (positive values) or left (negative values).
\end{commands}
\begin{example}
  \begin{endiagram}
    \ENcurve{1,4,0}
  \end{endiagram}
  \quad
  \begin{endiagram}
    \ENcurve{1,4[.5],0}
  \end{endiagram}
  \quad
  \begin{endiagram}
    \ENcurve{1,4[-.5],0}
  \end{endiagram}
\end{example}

\subsubsection{The shape}

The option \option{looseness} changes the shape of the curve:
\begin{options}
  \keyval{looseness}{value}\Module{ENcurve}\Default{.5}
     should be a number between \code{0} and \code{1}.
\end{options}

\begin{example}
  \begin{endiagram}
    \ENcurve[looseness=0]{0,3,1}
  \end{endiagram}
  \quad
  \begin{endiagram}
    \ENcurve{0,3,1}% corresponds looseness=.5
  \end{endiagram}
  \quad
  \begin{endiagram}
    \ENcurve[looseness=1]{0,3,1}
  \end{endiagram}
\end{example}

\subsubsection{Ending minima}

Sometimes potential energy curves are drawn with local minima at the start and
the end of the cuve.  The option \option{minima} en- or disables them:
\begin{options}
  \keybool{minima}\Module{ENcurve}\Default{false}
    Draw local minima at the ends of the curve.
\end{options}

\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve[minima]{1,4,0}
  \end{endiagram}
\end{example}

\subsubsection{\TikZ{} style}

The style of the curve can be changed using \TikZ{} options:
\begin{options}
  \keyval{tikz}{tikz}\Module{ENcurve}\Default
     Valid are options that can be used with \cs*{draw}.
\end{options}
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve[tikz={red,dotted}]{0,3,1}
  \end{endiagram}
\end{example}

\subsection{The Axes}

There are also possibilities to customize the axes.
\begin{options}
  \keychoice{axes}{xy,y,y-l,y-r,x,all,false}\Default{xy}
    Number and type of axes.
  \keyval{x-axis}{tikz}\Default
    \TikZ{} options to the $x$ axis.
  \keyval{y-axis}{tikz}\Default
    \TikZ{} options to the $y$ axis.
  \keychoice{x-label}{below,right}\Default{below}
    Position of the $x$ axis label.
  \keychoice{y-label}{above,left}\Default{left}
    Position of the $y$ axis label.
  \keyval{x-label-pos}{value}\Default{.5}
    Position of the $x$ axis label when \keyis{x-label}{below} is set.
  \keyval{y-label-pos}{value}\Default{.5}
    Position of the $y$ axis label when \keyis{y-label}{left} is set.
  \keyval{x-label-offset}{length}\Default{0pt}
    Distance between label and $x$ axis.
  \keyval{y-label-offset}{length}\Default{0pt}
    Distance between label and $y$ axis.
  \keyval{x-label-angle}{angle}\Default{0}
    Angle which rotates the $x$ axis label counter clockwise.
  \keyval{y-label-angle}{angle}\Default{0}
    Angle which rotates the $y$ axis label counter clockwise.
  \keyval{x-label-text}{text}\Default{\$\cs*{xi}\$}
    $x$ axis label.
  \keyval{y-label-text}{text}\Default{\$E\$}
   $y$ axis label.
\end{options}

No axes:
\begin{example}[side-by-side]
  \begin{endiagram}[axes=false]
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

All axes:
\begin{example}[side-by-side]
  \begin{endiagram}[axes=all]
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

Only the $x$ axis:
\begin{example}[side-by-side]
  \begin{endiagram}[axes=x]
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

Changed labels:
\begin{example}[side-by-side]
  \begin{endiagram}[x-label-text=\footnotesize reaction coordinate]
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

Different positions of the labels:
\begin{example}
  \begin{endiagram}[
     x-label=right,
     y-label=above]
    \ENcurve{1,4,0}
  \end{endiagram}
  \quad
  \begin{endiagram}[
     x-label-pos=.7,
     y-label-pos=.7,
     y-label-angle=-90,
     y-label-offset=5pt]
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

Crazy setup:
\begin{example}[side-by-side]
  \begin{endiagram}[x-axis={draw=blue,dashed,font=\color{green}}]
    \ENcurve{1,4,0}
  \end{endiagram}
\end{example}

\subsection{Debugging Information}

For precise adjustments of details -- particularly with the options and
commands described in the next sections -- some information is useful that is
hidden normally.  These options enable access:
\begin{options}
  \keybool{debug}\Default{false}
    Enable debug mode of \ENdiagram. \label{key:debug}
  \keybool{draft}\Default{false}
    An alias to \option{debug}.
  \keybool{final}\Default{true}
    The opposite of \option{draft}.
\end{options}

\begin{example}
  \begin{endiagram}[debug]
    \ENcurve{1,4,0}
  \end{endiagram}
  \quad
  \begin{endiagram}[debug,unit=2em]
    \ENcurve[step=3,minima]{1,4,0}
  \end{endiagram}
\end{example}
Shown are a grid, the origin and the coordinates and names of the levels.
Depending on the commands you're using you get more information.  It is
described with the commands they belong to.

\section{The Levels}
\subsection{The \cs*{ShowNiveaus} Command}
The command \cs{ShowNiveaus} draws horizontal lines to the levels:
\begin{commands}
  \command{ShowNiveaus}[\oarg{options}]
    Draw a visual hint of the different niveaus.
\end{commands}

\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowNiveaus
  \end{endiagram}
\end{example}

\subsection{Customization}

A number of options allow fine-tuning:
\begin{options}
  \keyval{length}{num}\Module{ShowNiveaus}\Default{1}
    The length of the lines. \meta{num} is a multiple of the \ac{su} (see
    page~\pageref{key:unit}).
  \keyval{shift}{num}\Module{ShowNiveaus}\Default{0}
    Shift to the right (positive values) or the left (negative values).
    \meta{num} is a multiple of the \ac{su}.
  \keyval{tikz}{tikz}\Module{ShowNiveaus}\Default
    \TikZ options to modify the style of the lines.
\end{options}

Longer lines:
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowNiveaus[length=2]
  \end{endiagram}
\end{example}

Without option \option{shift} the lines are centered to the extrema , \ie,
they protrude by half of the value specified with option \option{length}.
\begin{example}
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowNiveaus[shift=.5]
  \end{endiagram}
  \quad
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowNiveaus[length=2,shift=1]
  \end{endiagram}
\end{example}
Maybe the examples in the next section will make it more clear why option
\option{shift} can be useful.

\subsection{Choose Levels Explicitly}

If you don't want to draw a line to every level you can use this option:
\begin{options}
  \keychoice{niveau}{\Marg{\meta{id1},\meta{id2}}}\Module{ShowNiveaus}
    The \meta{id} is the name of the level as shown by the \option{debug}
    option, see page~\pageref{key:debug}.
\end{options}

The debug information helps in choosing the right level.  The names of the
levels follow the scheme \code{N-\meta{number of curve}-\meta{number of
    level}}.
\begin{example}
  \begin{endiagram}[debug]
    \ENcurve{3,4,0}
  \end{endiagram}
  \quad
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowNiveaus[niveau=N1-2]
  \end{endiagram}
\end{example}

Every level can have a different color, length and shift:
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowNiveaus[length=2,tikz=red,niveau=N1-2]
    \ShowNiveaus[niveau=N1-1,shift=-.5]
    \ShowNiveaus[niveau=N1-3,shift=.5]
  \end{endiagram}
\end{example}

\section{The Energy Gain}
\subsection{The \cs*{ShowGain} Command}

The command \cs{ShowGain} enables you the show the energy gain or loss of the
reaction.  It is always the difference between the first and the last level.
\begin{commands}
  \command{ShowGain}[\oarg{options}]
    Draw a visual hint of the energy gain.
\end{commands}

\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowGain
  \end{endiagram}
\end{example}

\subsection{Customization}

The command has options to modify the appearance.
\begin{options}
  \keyval{tikz}{tikz}\Module{ShowGain}\Default{<->}
    \TikZ{} options for the vertical line.
  \keyval{connect}{tikz}\Module{ShowGain}\Default{dashed,help lines}
    \TikZ{} options for the connecting line.
  \keybool{connect-from-line}\Module{ShowGain}\Default{false}
    The connecting line starts either at the maximum/minimum or at the line
    drawn by \cs{ShowNiveaus}.  This option works with the default values but
    otherwise can lead to unwanted results.  To avoid that you can either set
    \cs{ShowGain} \emph{before} \cs{ShowNiveaus} or you need to choose another
    way.
  \keyval{offset}{num}\Module{ShowGain}\Default{0}
    Shifts the vertical line to the right (positive value) or the left
    (negative value).  \meta{num} is a multiple of \ac{su} (see
    page~\pageref{key:unit}).
  \keychoice{label}{\default{true},false,\meta{text}}\Module{ShowGain}\Default{false}
    Use the default label (\code{true}) or an own label
    (\meta{text}).\label{key:showgain_label}
  \keychoice{label-side}{right,left}\Module{ShowGain}\Default{right}
    The side of the vertical line on which the label should be placed.
  \keyval{label-pos}{<value>}\Module{ShowGain}\Default{.5}
    Position at the line. \code{0} means at the height of $H_1$, \ie, the
    starting level, \code{1} means at the height of $H_2$, \ie, the ending
    level.
  \keyval{label-tikz}{<tikz>}\Module{ShowGain}\Default
    \TikZ{} options for the label.
\end{options}

\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowGain[connect={dotted,red},offset=2]
  \end{endiagram}
\end{example}

Using the \option{label} option:
\begin{example}
  \begin{endiagram}
    \ENcurve{3,4,0}
     \ShowGain[label]
  \end{endiagram}
  \begin{endiagram}
    \ENcurve{0,4,3}
    \ShowGain[label]
  \end{endiagram}
\end{example}

\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowGain[label=exothermic]
  \end{endiagram}
\end{example}

Connecting lines and levels are overlapping:
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowNiveaus
    \ShowGain[connect=red]
  \end{endiagram}
\end{example}

A possible solution:
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowNiveaus
    \ShowGain[connect-from-line,connect=red]
  \end{endiagram}
\end{example}

Better would be to set \cs{ShowNiveaus} \emph{after} \cs{ShowGain},
particularly if you're not using the default settings.
\begin{example}
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowNiveaus[niveau=N1-1]
    \ShowGain[connect={red,dotted}]
  \end{endiagram}
  \begin{endiagram}
    \ENcurve{3,4,0}
    \ShowGain[connect={red,dotted}]
    \ShowNiveaus[niveau=N1-1]
  \end{endiagram}
\end{example}

\subsection{Debugging Information}
Using the \option{debug} option (see page~\pageref{key:debug}) gives you
further information:
\begin{example}[side-by-side]
  \begin{endiagram}[debug]
    \ENcurve{3,4,0}
    \ShowGain
  \end{endiagram}
\end{example}

\section{The Activation Energy}
\subsection{The \cs*{ShowEa} Command}
This command is similar to the commands \cs{ShowNiveaus} and \cs{ShowGain}.
\begin{commands}
  \command{ShowEa}[\oarg{options}]
    Draw a visual hint af the activation energy.
\end{commands}

It enables to show the activation energy:
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{2,4,0}
    \ShowEa
  \end{endiagram}
\end{example}

The default behaviour shows the difference between the \emph{first} maximum
after a \emph{previous} minimum to that minimum:
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{2,0,4}
    \ShowEa
  \end{endiagram}
\end{example}

This also holds if there is more than one maximum.  How you choose a different
one is described in the next section.
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{1,5,2.5,4,0}
    \ShowEa
  \end{endiagram}
\end{example}

\subsection{Choose Level Explicitly}
The default behaviour is all right if there is only one maximum.  If there are
more one might want to choose a different one.  The following options allow
that.
\begin{options}
  \keychoice{max}{first,all}\Module{ShowEa}\Default{first}
    Show the difference to the first maximum or to all maxima.
  \keychoice{from}{\Marg{(\meta{coordinate1})to(\meta{coordinate2})}}\Module{ShowEa}
    Specify the coordinates that should be connected.  You can either use the
    coordinates \code{(\meta{x},\meta{y})} or the name \code{(\meta{name})} of
    the node.
\end{options}

Using \keyis{max}{all}:
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{1,5,2.5,4,0}
    \ShowEa[max=all]
  \end{endiagram}
\end{example}

Since in most cases this won't be what you want you can specify the
coordinates yourself.  The option \option{debug} (see
page~\pageref{key:debug}) may help.
\begin{example}
  \begin{endiagram}[debug]
    \ENcurve{1,5,2.5,4,0}
    \ShowEa
  \end{endiagram}
  \quad
   \begin{endiagram}
    \ENcurve{1,5,2.5,4,0}
    \ShowEa[from={(0,1) to (6,4)}]
  \end{endiagram}

  \begin{endiagram}
    \ENcurve{1,5,2.5,4,0}
    \ShowEa[from={(N1-1) to (N1-3)}]
  \end{endiagram}
  \quad
  \begin{endiagram}
    \ENcurve{1,5,2.5,4,0}
    \ShowEa[from={(N1-5) to (N1-4)}]
  \end{endiagram}
\end{example}
In every case the position of the vertical line is determined by the \emph{first}
coordinate.

\subsection{Customization}
Again there are a number of options to customize the appearance.
\begin{options}
  \keyval{tikz}{tikz}\Module{ShowEa}\Default{<->}
    \TikZ{} options for the vertical line.
  \keyval{connect}{tikz}\Module{ShowEa}\Default{dashed,help lines}
    \TikZ{} options for the horizontal line.
  \keychoice{label}{\default{true},false,\meta{text}}\Module{ShowEa}\Default{false}
    Use the default label ($E_{\mathrm{a}}$) or an own
    label.\label{key:showea_label}
  \keychoice{label-side}{right,left}\Module{ShowEa}\Default{right}
    The side of the vertical line where the label should appear.
  \keyval{label-pos}{value}\Module{ShowEa}\Default{.5}
    Determines the vertical position of the label relative to the vertical line.
    \code{0} means at the lower end, \code{1} means at the upper end.
  \keyval{label-tikz}{tikz}\Module{ShowEa}\Default
    \TikZ options for the label.
\end{options}

\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve[step=4]{1,6,0}
    \ShowEa[label,label-pos=.3]
  \end{endiagram}
\end{example}

\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve{1,5,2.5,4,0}
    \ShowEa[
      from    = {(N1-1) to (N1-3)},
      connect = {draw=none},
      label   = endoth.]
    \ShowEa[
      from  = (N1-3) to (N1-5),
      label = exoth.,
      label-pos = .7]
    \ShowGain[label=exoth.] 
  \end{endiagram}
\end{example}

\subsection{Debugging Information}
The \option{debug} option gives you further information.
\begin{example}
  \begin{endiagram}[debug]
    \ENcurve{1,5,2,3,0}
    \ShowEa[max=all]
  \end{endiagram}
  \quad
  \begin{endiagram}[debug]
    \ENcurve{1,5,2,3,0}
    \ShowEa[from={(0,1) to (6,3)}]
  \end{endiagram}
\end{example}

\section{Several Curves in one Diagram}
It's easy to draw several curves.  You only need to use \cs{ENcurve} more than
once.
\begin{example}
  \begin{endiagram}
    \ENcurve[tikz=blue]{1,4,0}
    \ENcurve[tikz=red]{1,2.5,0}
    \draw[blue] (5,5) -- ++(1,0) node[black,right] {without enzyme};
    \draw[red] (5,4) -- ++(1,0) node[black,right] {with enzyme};
  \end{endiagram}
\end{example}

The commands \cs{ShowNiveaus}, \cs{ShowGain} and \cs{ShowEa} always relate to
the curve set at last.  This means you can use them selectively.
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve[tikz=blue]{1,4,0}
    \ShowEa[tikz={blue,<->}]
    \ENcurve[tikz=red]{1,2.5,0}
  \end{endiagram}

  \begin{endiagram}
    \ENcurve[tikz=blue]{1,4,0}
    \ENcurve[tikz=red]{1,2.5,0}
    \ShowEa[tikz={red,<->}]
  \end{endiagram}
\end{example}

Using more than one curves explains the multiple numbering of the level names:
\begin{example}[side-by-side]
  % the names of the levels (N1-1)
  % and (N1-3) are hidden behind
  % (N2-1) and (N2-3), resp.
  \begin{endiagram}[debug]
    \ENcurve{1,4,0}
    \ENcurve{1,2.5,0}
  \end{endiagram}

  \begin{endiagram}
    \ENcurve[tikz=blue]{1,4,0}
    \ENcurve[tikz=red]{1,2.5,0}
    \draw[<->] (N1-2) -- (N2-2) ;
  \end{endiagram}
\end{example}

Of course it's possible to choose different options for different curves.
This means you can use curves with a different number of maxima.
\begin{example}[side-by-side]
  \begin{endiagram}
    \ENcurve[step=4]{1,6,0}
    \ENcurve[
      tikz={densely dotted}]
     {1,4[1],2.5,3[-1],0}
  \end{endiagram}
\end{example}

\section{Usage of \TikZ}
Since the \env{endiagram} environment only is a \env*{tikzpicture} environment
(well, more or less) you can use \TikZ{} commands inside it.  This means you
can easily add additional information to the diagram.
\begin{example}
  % needs the package `chemmacros'
  \begin{endiagram}
    \ENcurve{1,5,2,3,0}
    \ShowNiveaus[length=2,niveau={N1-2,N1-3,N1-4}]
    \node[above,xshift=4pt] at (N1-2) {[\"UZ1]$^{\transitionstatesymbol}$} ;
    \node[below] at (N1-3) {ZZ} ;
    \node[above,xshift=4pt] at (N1-4) {[\"UZ2]$^{\transitionstatesymbol}$} ;
  \end{endiagram}
  \quad
  \begin{endiagram}
    \ENcurve{2,3,0}
    \draw[<-,red] (N1-2) -- ++(2,1) node[right] {transition state} ;
  \end{endiagram}
\end{example}

\subsection{The Origin}
The nodes \code{(origin-l)} and \code{(origin-r)} are set at the end of the
environment.  This means they are \emph{not} available inside the
\env{endiagram} environment.  If you want to use them you either need to look
up their coordinates using the \option{debug} option (see
page~\pageref{key:debug}) \ldots

\begin{example}
  \begin{endiagram}[y-label=above]
    \ENcurve{1,3[.5],0}
    \draw[dashed,help lines]
      (N1-2) -- (N1-2 -| -1.5,-1)
      node[left,black] {max} ;
  \end{endiagram}
\end{example}
\ldots\ or use this option:
\begin{options}
  \keyval{tikz}{tikz}\Default
    \TikZ{} options for the \env{endiagram} environment.
\end{options}
With it you can pass arbitrary \TikZ{} options to the internal \code{tikzpicture}
environment.
\begin{example}[side-by-side]
  \begin{endiagram}[
      y-label = above,
      tikz    = {remember picture}]
    \ENcurve{1,3[.5],0}
  \end{endiagram}
  \tikz[remember picture,overlay]{
    \draw[dashed,help lines]
      (N1-2) -- (N1-2 -| origin-l)
      node[left,black] {max} ;
  }
\end{example}

There is an easier way, though: you can use the following command \emph{after}
drawing all curves:
\begin{commands}
  \command{MakeOrigin}
    Helper command to make the origin of the coordinate system
    known.\label{cmd:makeorigin}
\end{commands}

\begin{example}[side-by-side]
  \begin{endiagram}[y-label = above]
    \ENcurve{1,3[.5],0}
    \MakeOrigin
    \draw[dashed,help lines]
      (N1-2) -- (N1-2 -| origin-l)
      node[left,black] {max} ;
  \end{endiagram}
\end{example}

\section{Axes Ticks and Labels}
\subsection{Automatic Ticks}

The $y$ axes can get ticks automatically.
\begin{options}
  \keychoice{ticks}{y,\default{y-l},y-r,none}\Default{none}
    Adds ticks to the specified axes.
  \keyval{ticks-step}{num}\Default{1}
    \meta{num} is a multiple of the \ac{su}. \keyis{ticks-step}{2} means that
    only every second tick is added.
\end{options}
\ENsetup{
  AddAxisLabel/font=\libertineLF
}

\begin{example}
  \ENsetup{ticks,y-label=above}
  \begin{endiagram}
    \ENcurve{1,5,2.5,4,0}
  \end{endiagram}
  \quad
  \begin{endiagram}[ticks-step=2]
    \ENcurve{1,5,2.5,4,0}
  \end{endiagram}
\end{example}
These ticks obey the \option{energy-unit} option, see
section~\ref{sec:reale_werte}.

\subsection{The \cs*{AddAxisLabel} Command}
% TODO auf Unterschied zwischen den Ticks produziert durch AddAxisLabel und
% Option ticks hinweisen
To be able to add labels to the ticks there is the command
\begin{commands}
  \command{AddAxisLabel}[\oarg{options}\Marg{(\meta{point1})[\meta{opt.\@
      label}];(\meta{point2});...}]
    Add axis labels to points.
  \command{AddAxisLabel}[\sarg\oarg{options}\Marg{\meta{level1}[\meta{opt.\@
      label}];\meta{level2};...}]
    Add axis labels to levels.
\end{commands}
As you can see there are two variants.  The first one awaits a list of
coordinates in the \TikZ{} sense.  The second awaits $y$ values.  Every of
these values has an optional argument with which you can specify the label.

The first variant also draws lines between the points specifiad and the $y$
axis.  Internally this command calls \cs{MakeOrigin}, see
page~\pageref{cmd:makeorigin}, which means it should be used \emph{after}
drawing all curves.

Example for the second variant:
\begin{example}
  \begin{endiagram}[y-label=above]
    \ENcurve{1,3,2}
    \AddAxisLabel*{1;2;3}
  \end{endiagram}
  \begin{endiagram}[y-label=above]
    \ENcurve{1,3,2}
    \AddAxisLabel*{1[10];2[20];3[30]}
  \end{endiagram}
\end{example}

Example for the first variant:
\begin{example}[side-by-side]
  \begin{endiagram}[y-label=above]
    \ENcurve{1,3,2}
    \AddAxisLabel{(N1-1)[$H_1$];(N1-3)[$H_2$]}
  \end{endiagram}
\end{example}

The optional arguments can also get \TikZ{} options. The description should read:
\begin{commands}
  \command{AddAxisLabel}[\oarg{options}\Marg{(\meta{point1})[\meta{opt.\@
      label},\meta{tikz}];(\meta{point2});...}]
    Add axis labels to points.
  \command{AddAxisLabel}[\sarg\oarg{options}\Marg{\meta{level1}[\meta{opt.\@
      label},\meta{tikz}];\meta{level2};...}]
    Add axis labels to levels.
\end{commands}

\begin{example}
  \begin{endiagram}[y-label=above]
    \ENcurve{1,3,2}
    \AddAxisLabel*{1[10];2[20,{draw,fill=green!15}];3[30]}
  \end{endiagram}
  \begin{endiagram}[y-label=above]
    \ENcurve{1,3,2}
    \AddAxisLabel{(N1-1)[$H_1$];(N1-3)[$H_2$,{draw,font=\color{red},fill=green!15}]}
  \end{endiagram}
\end{example}

\subsection{Customization}

You have several options to customize the labels:
\begin{options}
  \keychoice{axis}{y-l,y-r,x}\Module{AddAxisLabel}\Default{y-l}
    Choose which axis gets the labels.
  \keyval{connect}{tikz}\Module{AddAxisLabel}\Default{dashed,help lines}
    Change the style of the lines.
  \keyval{font}{commands}\Module{AddAxisLabel}\Default
    You can add commands like \cs*{footnotesize} and/or \cs*{color}\Marg{red}
    to format the label text.
\end{options}

\begin{example}
  \begin{endiagram}[y-label=above]
    \ENcurve{1,3,2}
    \AddAxisLabel{(2,3)[\"UZ]}
  \end{endiagram}
  \begin{endiagram}[y-label=above,x-label=right]
    \ENcurve{1,3,2}
    \AddAxisLabel[axis=x,connect=dotted]{(2,3)[\"UZ]}
  \end{endiagram}
  \begin{endiagram}[axes=all,y-label=above]
    \ENcurve{1,3,2}
    \AddAxisLabel[axis=y-r,connect=red]{(2,3)[\"UZ]}
  \end{endiagram}
\end{example}

\section{Actual Values}\label{sec:reale_werte}
\subsection{The Basics}

If you want to have a more quantitative diagram or use actual values for the
energies you can use these options:
\begin{options}
  \keyval{energy-unit}{unit}\Default
    The unit of the energy scale.  A unit in the \pkg{siunitx} sense.
  \keyval{energy-step}{num}\Default{1}
    Determines which increment on the energy scale corresponds to the
    \ac{su}.
  \keyval{energy-zero}{num}\Default{0}
    Shifts the origin of the energy scale by \meta{num} in multiples of the
    energy scale.
  \keyval{energy-unit-separator}{anything}\Default{/}
    Separates the $y$ axes label from the unit.
  \keyval{energy-round}{num}\Default{3}
    Rounds the value to this number of figures.
  % \keybool{energy-round-places}\Default{false}
  %   Switch rounding mode to places.
\end{options}
Choosing a unit will add ticks and labels to the $y$ axis automatically and has
an impact on the commands \cs{ShowGain} and \cs{ShowEa}, see
section~\ref{ssec:real_einfluss}.

\begin{example}
  \begin{endiagram}[ticks,y-label=above,energy-step=10]
    \ENcurve{1,3,2}
  \end{endiagram}
  \begin{endiagram}[y-label=above,energy-step=10,energy-zero=30]
    \ENcurve{1,3,2}
    \AddAxisLabel*{1;2;3}
  \end{endiagram}
\end{example}

\begin{example}
  \begin{endiagram}[
      y-label=above,
      energy-step=15,
      energy-zero=30,
      energy-unit=\kilo\joule]
    \ENcurve{1,3,2}
    \AddAxisLabel*{1;2;3}
  \end{endiagram}
  \begin{endiagram}[
      y-label=above,
      energy-step=10,
      energy-unit=\kilo\joule,
      energy-unit-separator={ in }]
    \ENcurve{1,3,2}
    \AddAxisLabel*{1;2;3}
  \end{endiagram}
\end{example}

\begin{example}
  \ENsetup{
    energy-unit=kJ,
    energy-step=10,
    energy-zero=.613,
    y-label-offset=20pt
  }
  \begin{endiagram}
    \ENcurve{1.0613,4.3465,2.9876}
    \ShowGain[label]
  \end{endiagram}
\end{example}
  % \begin{endiagram}% [energy-round-places]
  %   \ENcurve{1.0613,4.3465,2.9876}
  %   \ShowGain[label]
  % \end{endiagram}

\subsection{Impact on Other Commands}\label{ssec:real_einfluss}

Using the option \option{energy-unit} changes the default labels of
\cs{ShowGain} and \cs{ShowEa}.  Now an actual value is shown:
\begin{example}
  % uses \DeclareSIUnit{\calory}{cal}
  \sisetup{per-mode = fraction}
  \ENsetup{
    energy-step           = 100,
    energy-unit           = \kilo\calory\per\mole,
    energy-unit-separator = { in },
    y-label               = above,
    AddAxisLabel/font     = \libertineLF\footnotesize
  }
  \begin{endiagram}[scale=1.5]
    \ENcurve{2.232,4.174,.308}
    \AddAxisLabel*{0;1;2;3;4}
    \ShowEa[label,connect={draw=none}]
    \ShowGain[label]
  \end{endiagram}
\end{example}

This behaviour can be switched off, though:
\begin{options}
  \keybool{calculate}\Default{true}
  Switch the calculating of activation energy and energy gain on or off.
\end{options}
\begin{example}
  % uses \DeclareSIUnit{\calory}{cal}
  \sisetup{per-mode = fraction}
  \ENsetup{
    energy-step           = 100,
    energy-unit           = \kilo\calory\per\mole,
    energy-unit-separator = { in },
    y-label               = above,
    AddAxisLabel/font     = \footnotesize,
  }
  \begin{endiagram}[scale=1.5,calculate=false]
    \ENcurve{2.232,4.174,.308}
    \AddAxisLabel*{0;1;2;3;4}
    \ShowEa[label,connect={draw=none}]
    \ShowGain[label]
  \end{endiagram}
\end{example}

\section{Example}

The illustration of the Bell-Evans-Polanyi principle
(figure~\ref{fig:bell-evans-polanyi}) serves as an example for a more complex
usage. One reaction is coloured as it an exception to the principle. The
figure is a reproduction of a similar figure in~\cite{brueckner}.

\begin{sourcecode}
  % uses the packages `chemmacros', `chemfig' and `libertine'
  \setatomsep{1.5em}
  \DeclareChemIUPAC\iso{\textit{i}}
  \chemsetup[chemformula]{format=\libertineLF}
  \ENsetup{
    ENcurve/minima,
    AddAxisLabel/font=\libertineLF\footnotesize
  }
  \begin{endiagram}[
     tikz         = {yscale=1.5}, scale        = 1.7,
     y-label      = above,        y-label-text = $\Delta H$,
     x-label      = right,        x-label-text = RK,
     energy-step  = 10]
    \ENcurve{0,3.5,1}
    \ENcurve[tikz=red]{0,3.7,.4}
    \ENcurve{0,4.3[.2],2.4}
    \ENcurve{0,4.7[.3],2.7}
    \ENcurve{0,4.9[.35],2.9}
    \ENcurve{0,5.2[.4],3.3}
    \AddAxisLabel*{1;2;3;4;6}
    \AddAxisLabel{
      (N1-1)[0]; (N1-2)[35]; (N2-2)[37]; (N3-2)[43]; (N4-2)[47]; (N5-2)[49];
      (N6-2)[52]
    }
    \draw[right] (N1-3) ++ (1,0)
      node {\small \ch{2 "\chemfig{=_[:30]-[::-60]\lewis{0.,}}~" + N2} } ;
    \draw[right,red] (N2-3) ++ (1,-.3)
      node {\small \ch{2 "\chemfig{[:-60]*6(=-=-(-\lewis{0.,})=-)}~" + N2} } ;
    \draw[right] (N3-3) ++ (1,-.2)
      node {\small \ch{2 "\tert-\lewis{0.,Bu}~" + N2} } ;
    \draw[right] (N4-3) ++ (1,-.1)
      node {\small \ch{2 "\iso-\lewis{0.,Pr}~" + N2} } ;
    \draw[right] (N5-3) ++ (1,0)
      node {\small \ch{2 "\lewis{0.,Et}~" + N2} } ;
    \draw[right] (N6-3) ++ (1,0)
      node {\small \ch{2 "\lewis{0.,Me}~" + N2} } ;
    \draw[above,font=\fontfamily{fxlf}\selectfont\footnotesize]
     (N1-3) node {10} (N2-3) node[red] {4}
     (N3-3) node {24} (N4-3) node {27}
     (N5-3) node {29} (N6-3) node {33} ;
  \end{endiagram}

  \setatomsep{2em}
  \schemestart
    \chemfig{R-[:30]N=N-[:30]R}
    \arrow{->[$\Delta$]}[,2.1]
    \ch{2 "\lewis{0.,R}~" + N2}
  \schemestop
\end{sourcecode}

\begin{figure}
  \centering
  \centering
  \setatomsep{1.5em}
  \DeclareChemIUPAC\iso{\textit{i}}
  \chemsetup[chemformula]{format=\libertineLF}
  \ENsetup{
    ENcurve/minima,
    AddAxisLabel/font=\libertineLF\footnotesize
  }
  \begin{endiagram}[
     tikz         = {yscale=1.5}, scale        = 1.7,
     y-label      = above,        y-label-text = $\Delta H$,
     x-label      = right,        x-label-text = RK,
     energy-step  = 10]
    \ENcurve{0,3.5,1}
    \ENcurve[tikz=red]{0,3.7,.4}
    \ENcurve{0,4.3[.2],2.4}
    \ENcurve{0,4.7[.3],2.7}
    \ENcurve{0,4.9[.35],2.9}
    \ENcurve{0,5.2[.4],3.3}
    \AddAxisLabel*{1;2;3;4;6}
    \AddAxisLabel{
      (N1-1)[0]; (N1-2)[35]; (N2-2)[37]; (N3-2)[43]; (N4-2)[47]; (N5-2)[49];
      (N6-2)[52]
    }
    \draw[right] (N1-3) ++ (1,0)
      node {\small \ch{2 "\chemfig{=_[:30]-[::-60]\lewis{0.,}}~" + N2} } ;
    \draw[right,red] (N2-3) ++ (1,-.3)
      node {\small \ch{2 "\chemfig{[:-60]*6(=-=-(-\lewis{0.,})=-)}~" + N2} } ;
    \draw[right] (N3-3) ++ (1,-.2)
      node {\small \ch{2 "\tert-\lewis{0.,Bu}~" + N2} } ;
    \draw[right] (N4-3) ++ (1,-.1)
      node {\small \ch{2 "\iso-\lewis{0.,Pr}~" + N2} } ;
    \draw[right] (N5-3) ++ (1,0)
      node {\small \ch{2 "\lewis{0.,Et}~" + N2} } ;
    \draw[right] (N6-3) ++ (1,0)
      node {\small \ch{2 "\lewis{0.,Me}~" + N2} } ;
    \draw[above,font=\fontfamily{fxlf}\selectfont\footnotesize]
     (N1-3) node {10} (N2-3) node[red] {4}
     (N3-3) node {24} (N4-3) node {27}
     (N5-3) node {29} (N6-3) node {33} ;
  \end{endiagram}

  \setatomsep{2em}
  \schemestart
    \chemfig{R-[:30]N=N-[:30]R}
    \arrow{->[$\Delta$]}[,2.1]
    \ch{2 "\lewis{0.,R}~" + N2}
  \schemestop
  \caption{\label{fig:bell-evans-polanyi}Enthalpie-Entwicklung
    entlang der Reaktionskoordinate bei einer Serie von Thermolysen
    aliphatischer Azoverbindungen.  Alle Thermolysen dieser Serie -- mit
    Ausnahme der farbig hervorgehobenen -- folgen dem
    Bell-Evans-Polanyi-Prinzip~\cite{brueckner}.}
\end{figure}

\end{document}


\end{document}