summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex
blob: 8fc970a5562509546a0d56858a5c4f83ff1d2634 (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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% --------------------------------------------------------------------------- %
% - chemmacros - chemmacros_doc_en.tex                                      - %
% - macros and commands for chemists                                        - %
% --------------------------------------------------------------------------- %
% - Clemens Niederberger                                                    - %
% - 2011/11/03                                                              - %
% --------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/                                              - %
% - contact@mychemistry.eu                                                  - %
% --------------------------------------------------------------------------- %
% - 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 chemmacros.sty, chemmacros-version1.cfg,- %
% - chemmacros_doc_de.tex, chemmacros_doc_de.tex, README and the derived    - %
% - files chemmacros_doc_de.pdf and chemmacros_doc_en.pdf                   - %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[nohyper,titlepage,a4paper,nofonts,notoc]{tufte-handout}

\newcommand*\CMname{\textsf{chemmacros}\xspace}
\newcommand*\CMversion{2.0\xspace}
\newcommand*\CMdate{2011/11/03\xspace}

% changing some tufte-handout settings
\titleformat{\section}[hang]{\normalfont\Large\bfseries}{\thesection}{1em}{}[]
\titleformat{\subsection}[hang]{\normalfont\large\bfseries}{\thesubsection}{1em}{}[]
\makeatletter
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
\makeatother
\def\thesubsubsection{\thesection.\thesubsection.\arabic{subsubsection}}
\titleformat{\subsubsection}[hang]{\normalfont\large\bfseries}{\thesubsection}{1em}{}[]
\titlespacing*{\subsubsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus.2ex}
\setcounter{secnumdepth}{2}

% need these because of the lots of marginnotes
\usepackage{etex,morefloats}
\reserveinserts{150}

\usepackage[english]{babel}
\usepackage[utf8]{inputenx}
\usepackage[dvipsnames]{xcolor}
  \colorlet{code}{RawSienna}
\usepackage[normalem]{ulem}
\usepackage{url,chemfig,chemstyle,bpchem,array,longtable,multirow,booktabs,framed}
\usepackage[version=3,arrows=pgf]{mhchem}
\usepackage[xspace,circled]{chemmacros}

\usepackage{showexpl}
\lstset{literate={ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 {ß}{{\ss}}1}
\lstset{
   language         = [LaTeX]TeX,
   basicstyle       = {\ttfamily},
   extendedchars    = true,
   numbers          = left,
   numberstyle      = \tiny,
   numberblanklines = true,
   gobble           = 1,
   xleftmargin      = 20pt,
   breaklines       = true,
   commentstyle     = {\color[named]{Gray}},
   }

\usepackage{hyperref}
\hypersetup{
  colorlinks         = true,
  plainpages         = false,
  bookmarksopen      = true,
  bookmarksopenlevel = 2,
  bookmarksnumbered  = true,
  pdfauthor          = {Clemens Niederberger},
  pdftitle           = {chemmacros - Manual},
  pdfsubject         = {macros for the chemist},
  pdfkeywords        = {chemmacros},
  pdfcreator         = {LaTeX}
}
 
\ExplSyntaxOn
\NewDocumentCommand \paket { o m }
  {
    \textsf { #2 }
    \cs_if_exist:cF { paket @ #2 }
      {
        \cs_new_nopar:cpn { paket @ #2 } { }
        \IfNoValueTF { #1 }
          { \sidenote { CTAN: ~ \href { http://www.ctan.org/pkg/#2/ } { #2 } } }
          { \sidenote[][ #1 ] { CTAN: \href { http://www.ctan.org/pkg/#2/ } { #2 } } }
      }
  }

\newcommand*\code[1]{{\normalfont\upshape\ttfamily#1}}
\newcommand*\ma[1]{%
  {\normalcolor\ttfamily\char`\{#1\char`\}}}
\newcommand*\oa[1]{%
  {\normalcolor\ttfamily\char`[#1\char`]}}
\newcommand*\da[1]{%
  {\normalcolor\ttfamily\char`(#1\char`)}}

\NewDocumentCommand \cmd { m }
  {
    \group_begin:
      \code { \char`\\ \color{code} #1 }
    \group_end:
  }

% Key[<default>][<module>](<label prefix>){<key>}{<val>}
\NewDocumentCommand \Key { o o d() m m }
  {
    \IfNoValueTF { #3 }
      {
        \IfNoValueTF { #2 }
          { \label{key:#4} }
          { \label{key:#2_#4} }
      }
      { \label{key:#3_#4} }
    \marginnote
      {
        \framed
          \code { \textcolor { blue } { #4 } ~ = ~ #5 }
          \IfNoValueF { #1 } { \tl_if_blank:nF { #1 } { \newline default: ~ \code { #1 } } }
          \IfNoValueTF { #2 }
            { \newline \textcolor { red } { no ~ module } }
            { \newline module: ~ \code { #2 } }
        \endframed
      }
  }

\NewDocumentCommand \changed { m }
  {
    \group_begin:
    \colorlet { shadecolor } { red!20 }
    \marginnote
      {
        \shaded
          The ~ command ~ \cmd { #1 } ~ has ~ a ~ new ~ syntax ~ with ~ v2.0 . \tl_use:N \c_space_tl
          The ~ package ~ option ~ \code { version=1 } \tl_use:N \c_space_tl
          restores ~ the ~ former ~ syntax.
        \endshaded
      }
    \group_end:
  }

\NewDocumentCommand \formercmd { m }
  {
    \marginnote
      {
        \cmd { #1 } ~ is ~ not ~ provided ~ any ~ more. ~ Use ~ package ~ option ~
        \code { version = 1 } ~ to ~ reactivate ~ it.
      }
  }
\ExplSyntaxOff

\newcommand*\eg{\mbox{e.\,g.}\xspace}
\newcommand*\ie{\mbox{i.\,e.}\xspace}
\newcommand*\etc{\mbox{etc.}\xspace}
\newcommand*\TikZ{\mbox{Ti\textbf{\textit{k}}Z}\xspace}

\begin{document}

\begin{titlepage}
 \begin{fullwidth}
 \centering
 \Huge chemmacros v\CMversion{}a
 \vskip.5cm
 \Large\CMdate
 \vskip.5cm
 \large Clemens \textsc{Niederberger}
 \vskip.25cm
 \normalsize\url{http://www.mychemistry.eu/}\\
 \href{mailto:contact@mychemistry.eu}{contact@mychemistry.eu}
 \vskip2cm
 \begin{abstract}
  \CMname is a collection of macros and commands which are intended to make typesetting chemistry documents with \LaTeXe\ faster and more convenient. Coverage includes some nomenclature commands, oxidation numbers, thermodynamic data, newman projections, \etc
 \end{abstract}
 \end{fullwidth}
\end{titlepage}

\tableofcontents

\section{What's New?}
With the update to v\CMversion lot's has changed behind the scenes. The settings now are done completely with a key/value system. This way there are now much more possibilities to customize commands. This also means that the syntax of a number of commands has changed\changed{command}. In order to provide compatibility with documents set with v1.*, there is now the package option \code{version=1}, which restores the old definitions. If a command has been changed, you can see this through a note in the margin. Some commands now are deprecated\formercmd{command} and are not longer provided unless the option \code{version=1} is used.

\section{Licence, Requirements}
\CMname v\CMversion underlies the The \LaTeX\ project public license version 1.3 or later. (\url{http://www.latex-project.org/lppl.txt})

\CMname uses the packages \textsf{expl3}, \paket{xparse}, \paket{l3keys2e} and \paket{xfrac}, which are part of the bundles \paket{l3kernel} and \paket{l3packages}. \paket{expl3} is part of \paket{l3kernel}, and \paket{xparse}, \paket{l3keys2e} and \paket{xfrac} are part of \paket{l3packages}.

\CMname also uses the packages \paket{siunitx}, \paket{mhchem}, \paket{mathtools} and \paket{environ} as well as \TikZ (\paket{pgf}) and the \TikZ libraries \code{calc} and \code{arrows}.

Package option \code{bpchem} (section \ref{sec:optionen}) needs the package \paket{bpchem} and package option \code{xspace} needs the package \paket{xspace}.

\section{Package Options}\label{sec:optionen}
\CMname has several package options.\marginnote{This document is set with default behaviour.}\marginnote[\baselineskip]{\code{bpchem = false} \NMR;\\\code{bpchem = true} {\chemsetup[option]{bpchem}\NMR};}\marginnote[\baselineskip]{\code{circled = none} {\chemsetup[option]{circled=none}\mch\ \pch\ \fmch\ \fpch}\\\code{circled = formal, circletype = chem} {\chemsetup[option]{circled}\mch\ \pch\ \fmch\ \fpch}\\\code{circled = all, circletype = chem} {\chemsetup[option]{circled=all,circletype=chem}\mch\ \pch\ \fmch\ \fpch}\\\code{circled = formal, circletype = math} {\chemsetup[option]{circled,circletype=math}\mch\ \pch\ \fmch\ \fpch}\\\code{circled = all, circletype = math} {\chemsetup[option]{circled=all,circletype=math}\mch\ \pch\ \fmch\ \fpch}} They all are used as key/value pairs like \cmd{usepackage\oa{option1 = <value1>, option2 = <value2>}\ma{chemmacros}}. Some also can be used without value (\cmd{usepackage\oa{option1, option2}\ma{chemmacros}}), which means that the \uline{underlined} value is used.
\begin{description}
 \item[\code{bpchem = \uline{true}/false>}] This option loads the package \paket{bpchem} and adjusts the layout of the \cmd{NMR} command to the \paket{bpchem} commands \cmd{HNMR} and \cmd{CNMR}. (default: \code{false})\label{key:option_bpchem}
 %
 \item[\code{circled = \uline{formal}/all/none}] \CMname uses two different kinds of charges\footnote{Thanks to Christoph Sch\"afer, who pointed out to me, that v1.1 handled the charges too undifferentiated!}, which indicate the usage of real ($+/-$ ) and formal (\fplus/\fminus) charges. The option \code{formal} distinguishes between them, option \code{none} displays them all without circle, option \code{all} circles all (default: \code{formal}).\label{key:option_circled}
 %
 \item[\code{circletype = \uline{chem}/math}] This option switches between two kinds of circled charge symbols: \cmd{fplus} \fplus\ and \code{\$\cmd{oplus}\$} $\oplus$. (Default: \code{chem})\label{key:option_circletype}
 %
 \item[\code{EZ = \uline{chemmacros}/cool}] The command \cmd{E} is defined by the package \paket{cool} as well as by \CMname. With this option you can choose, which definition is used, see page \pageref{EZ}. (default: \code{chemmacros})\label{key:option_EZ}
 %
 \item[\code{german = \uline{true}/false}]\marginnote{\code{german = false} {\chemsetup[option]{german=false}\pKa, \sld, \lqd}\\\code{german = true} \pKa, \sld, \lqd} This option changes the commands \cmd{pKa}, \cmd{sld} and \cmd{lqd} (default: \code{false})\label{key:option_german}
 %
 \item[\code{version = 1/2}] This option restores the old definitions of some commands, so documents set with v1.* will still compile correctly. You'll find notes in the margin for every changed command. (default: \code{2})\label{key:option_version}
 %
 \item[\code{xspace = \uline{true}/false}] With this option most commands are defined with a \cmd{xspace}. (default: \code{true})\label{key:option_xspace}
\end{description}

\section{Setup}
Various of \CMname's commands have key/value pairs with which they are customized. Most times they can be used as (optional) argument of the copmmands themselves. They also can most times be used with the \cmd{chemsetup} command.
\begin{framed}
 \cmd{chemsetup\oa{<module>}\ma{<key> = <value>}} or \\
 \cmd{chemsetup\ma{<module>/<key> = <value>}}
\end{framed}
The keys\Key[<default>][<module>]{<key>}{<value>} each belong to a module, which defines for which commands they are intended for. If a key is presented, you'll see a box in the margin that gives you information to that key. You have two ways to use keys with the \cmd{chemsetup}, as you can see in the box above.

The package options can also be seen as keys belonging to the module \code{option}. This means they can also be used with the \cmd{chemsetup} command (except for the option \code{version=1/2}).
\begin{LTXexample}[pos=b]
 \chemsetup[option]{circled=none}\mch\ \pch\ \fmch\ \fpch\ \el\ \prt \\
 \chemsetup[option]{circled=formal}\mch\ \pch\ \fmch\ \fpch\ \el\ \prt \\
 \chemsetup[option]{circletype=math}\mch\ \pch\ \fmch\ \fpch\ \el\ \prt \\
 \chemsetup{option/circletype=chem,option/circled=all}\mch\ \pch\ \fmch\ \fpch\ \el\ \prt \\
 \chemsetup{option/circletype=math}\mch\ \pch\ \fmch\ \fpch\ \el\ \prt
\end{LTXexample}
Keys \emph{not} belonging to a module \emph{cannot} be used with \cmd{chemsetup}!

\section{Particles, Ions and Symbols}\label{sec:teilchen}
Some simple macros for displaying often needed particles and a symbol. Please note, that they're displayed differently depending on the package options used, see section \ref{sec:optionen}.\marginnote{These commands can be used in text as well as in math mode.}
\begin{itemize}
 \item\cmd{Hpl} \Hpl (proton)
 \item\cmd{Hyd} \Hyd (hydroxide)
 \item\cmd{HtO} \HtO (oxonium ion) (\textbf{H} \textbf{t}hree \textbf{O})
 \item\cmd{water} \water
 \item\cmd{el} \el (electron)
 \item\cmd{prt} \prt (proton)
 \item\cmd{ntr} \ntr (neutron)
 \item\cmd{Nu} \Nu (nucleophile)
 \item\cmd{El} \El (electrophile)
 \item\cmd{ba} \ba (base)
 \item\cmd{fplus} \fplus
 \item\cmd{fminus} \fminus
 \item\cmd{transitionstatesymbol} \transitionstatesymbol\ (uses \TikZ)
 \item\cmd{standardstate} \standardstate. This symbol is only provided by \CMname, if the package \paket{chemstyle} is not loaded; the idea is borrowed from there\footnote{thanks to the package author \href{http://www.texdev.net/}{Joseph Wright}.}.
\end{itemize}
There is another command which allows to typeset radicals with charges and subscripts.
\begin{framed}
 \cmd{R\oa{<sign>}\ma{<subscript>}}
\end{framed}
\begin{LTXexample}
 \R[+]{tert} \R[-]{sek} \R{prim}
\end{LTXexample}
The two particles \cmd{Nu} and \cmd{ba} can be modified. To do that you use the key \code{elpair}\Key[false][particle]{elpair}{false/\uline{dots}/dash}. It only has any effect, if the package \paket{chemfig} is loaded, since it uses it's command \cmd{Lewis}.
\begin{LTXexample}
 \documentclass{article}
 \usepackage{chemmacros,chemfig}
 \begin{document}
  \ba[elpair] \Nu[elpair=dash]
 \end{document}
\end{LTXexample}
\begin{LTXexample}
 \documentclass{article}
 \usepackage{chemmacros,chemfig}
 \begin{document}
  \chemsetup[particle]{elpair}
  \ba \Nu
 \end{document}
\end{LTXexample}

\section{Stereo Descriptors, Nomenclature, Latin Phrases}\label{sec:stereo}
\subsection{Stereo Descriptors and Nomenclature}
The following macros are intended to make the writing of IUPAC names more convenient:
\begin{itemize}
 \item Cahn-Ingold-Prelog:
 \begin{framed}
  \cmd{Rcip} \Rcip \\
  \cmd{Scip} \Scip \\
  \cmd{cip\ma{<conf>}} \eg: \cmd{cip\ma{R,S}} \cip{R,S}
 \end{framed}
 \item Fischer:
 \begin{framed}
  \cmd{Dfi} \Dfi \\
  \cmd{Lfi} \Lfi
 \end{framed}
 \item cis/trans and zusammen/entgegen:\marginnote{Please notice, that the commands \cmd{cis} and \cmd{trans} are defined by the \paket{bpchem} package as well. If you load that package, they are redefined by \CMname. With \paket{bpchem} they \textit{always} get a \cmd{xspace}, with \CMname only , when option \code{xspace} is used.}
 \begin{framed}
  \cmd{Z} \Z\label{EZ} \\
  \cmd{E} \E\ (\cmd{E} is also defined by the package \paket{cool}. By using the package option \code{EZ = cool} instead of \cmd{E} and \cmd{Z} \CMname defines \cmd{Ent} and \cmd{Zus}.) \\
  \cmd{cis} \cis \\
  \cmd{trans} \trans
 \end{framed}
 \item ortho/meta/para:
 \begin{framed}
  \cmd{ortho} \ortho \\
  \cmd{meta} \meta \\
  \cmd{para} \para
 \end{framed}
\end{itemize}
absolute configuration (uses \TikZ):
\begin{framed}
 \cmd{Rconf\oa{<letter>}} \cmd{Rconf}: \Rconf \quad\cmd{Rconf\oa{}}: \Rconf[] \\
 \cmd{Sconf\oa{<letter>}} \cmd{Sconf}: \Sconf \quad\cmd{Sconf\oa{}}: \Sconf[]
\end{framed}

\newpage
Examples:\marginnote{Of course the appearance depends on the font you chose:\par\cip{2S,3R} \E \Z \Dfi \Lfi\par\fontfamily{ptm}\selectfont\cip{2S,3R} \E \Z \Dfi \Lfi\par\fontfamily{ppl}\selectfont\cip{2S,3R} \E \Z \Dfi \Lfi}
\begin{LTXexample}[pos=b]
 \Dfi-Weins\"aure = \cip{2S,3S}-Weins\"aure  \\
 \Dfi-($-$)-Threose = \cip{2S,3R}-($-$)-2,3,4-Trihydroxybutanal \\
 \cis-2-Buten = \Z-2-Butene, \cip{2E,4Z}-Hexadiene \\
 \meta-Xylol = 1,3-Dimethylbenzene \\
 % with bpchem's command \IUPAC:
 \IUPAC{\Dfi\-Wein\|s\"aure} = \IUPAC{\cip{2S,3S}\-Wein\|s\"aure}, \IUPAC{\Dfi\-($-$)\-Threose} = \IUPAC{\cip{2S,3R}\-($-$)\-2,3,4\-Tri\|hydroxy\|butanal}
\end{LTXexample}

\subsection{Latin Phrases}
At last there are two commands for common latin phrases.
\begin{framed}
 \cmd{insitu} \insitu \\
 \cmd{abinitio} \abinitio
\end{framed}
If the package \paket{chemstyle} has been loaded, too\footnote{\paket{chemstyle} defines other similar commands like \etal, \invacuo.}, they are defined using \paket{chemstyle}'s \cmd{latin} command. This means that then the appearance depends on \paket{chemstyle}'s option \code{abbremph}:
\begin{LTXexample}
 \insitu, \abinitio\\
 \cstsetup{abbremph=false}
 \insitu, \abinitio
\end{LTXexample}
If \paket{chemstyle} hasn't been loaded, they're always in \textit{italics}.

\section{Units with \textsf{siunitx}}\label{sec:einheiten}
In chemistry some non-SI units are very common. \paket{siunitx} provides the command \cmd{DeclareSIUnit\ma{<command>}\ma{<unit>}} to add arbitrary units. \CMname uses that command to provide some units. Like all \paket{siunitx} units they're only valid inside \cmd{SI\ma{<num>}\ma{<unit>}} and \cmd{si\ma{<unit>}}.
\begin{itemize}
 \item\cmd{atmosphere} \si{\atmosphere}
 \item\cmd{atm} \si{\atm}
 \item\cmd{calory} \si{\calory}
 \item\cmd{cal} \si{\cal}
 \item\cmd{cmc} \si{\cmc}\marginnote{The units \cmd{cmc}, \cmd{molar}, and \cmd{Molar} are defined by the package \paket{chemstyle} as well. \CMname only defines them, if \paket{chemstyle} is not loaded.}
 \item\cmd{molar} \si{\molar}
 \item\cmd{moLar} \si{\moLar}
 \item\cmd{Molar} \si{\Molar}
 \item\cmd{MolMass} \si{\MolMass}
 \item\cmd{normal} \si{\normal}
 \item\cmd{torr} \si{\torr}
\end{itemize}
\marginnote[-3\baselineskip]{By the way: \cmd{mmHg} \si{\mmHg} already is defined by \paket{siunitx} and \paket{chemstyle}.}

\section{Acid/Base}\label{sec:saeure_base}
Easy representation of \pH, \pKa \ldots\marginnote{These commands can be used both in text and in math mode as well as inside the \cmd{ce} command of the \paket{mhchem} package. The command \cmd{pKa} depends on the package option \code{german}, see section \ref{sec:optionen}.}
\begin{framed}
 \cmd{pH} \pH \\
 \cmd{pOH} \pOH \\
 \cmd{pKa\oa{<num>}} \cmd{pKa} \pKa, \cmd{pKa\oa{1}} \pKa[1] \\
 \cmd{pKb\oa{<num>}} \cmd{pKb} \pKb, \cmd{pKb\oa{1}} \pKb[1] \\
 \cmd{p\ma{<anything>}} \eg \cmd{p\ma{K\_w}} \p{K_w}
\end{framed}
\begin{LTXexample}
 \pKa \pKa[1] \pKb \pKb[1]\\
 \chemsetup[option]{german=true}
 \pKa \pKa[1] \pKb \pKb[1]
\end{LTXexample}

\section{Oxidation Numbers, real and formal Charges}\label{sec:ladungen}
\CMname distinguishes between real ($+$/$-$) and formal (\fplus/\fminus) charge symbols, also see section \ref{sec:optionen}. All commands using formal charge symbols start with a \code{f}.
\subsection{Ion Charges}\label{ssec:ionen}
Simple displaying of (real) charges:
\begin{framed}
 \cmd{pch\oa{<number>}} positive charge (\textbf{p}lus + \textbf{ch}arge) \\
 \cmd{mch\oa{<number>}} negative charge (\textbf{m}inus + \textbf{ch}arge)
\end{framed}
\begin{LTXexample}
 \pch, Na\pch, Ca\pch[2]\\
 \mch, F\mch, S\mch[2]
\end{LTXexample}

The same for formal charges:
\begin{framed}
 \cmd{fpch\oa{<number>}} positive charge\\
 \cmd{fmch\oa{<number>}} negative charge
\end{framed}
\begin{LTXexample}
 \fpch\ \fmch\ \fpch[3] \fmch[3]
\end{LTXexample}

There is a key which influences the behaviour of the charges\Key[false][charges]{append}{\uline{true}/false}.
\begin{itemize}
 \item\code{append = \uline{true}/false} if set \code{true}, the charge is appended together with an empty group. 
\end{itemize}
This is, how the key influences the behaviour:
\begin{LTXexample}
 \chemsetup[charges]{append=false}
 \ce{H\pch\aq} \ce{H\aq\pch}

 \chemsetup[charges]{append=true}
 \ce{H\pch\aq} \ce{H\aq\pch}
\end{LTXexample}
In most cases this behaviour will be unwanted. However, in some cases it might be useful, for example together with the \cmd{ox} (see next section):
\begin{LTXexample}
 \chemsetup[charges]{append=false}
 \ce{\ox{1,H}\pch\aq}

 \chemsetup[charges]{append=true}
 \ce{\ox{1,H}\pch\aq}
\end{LTXexample}

\subsection{Oxidation Numbers}\label{ssec:oxidationszahlen}
Typesetting oxidation numbers:\changed{ox}
\begin{framed}
 \cmd{ox\oa{<keyval>}\ma{<number>,<atom>}} places \code{<number>} above \code{<atom>}\\
 \code{<number>} has to be a (rational) number!
\end{framed}
\begin{LTXexample}
 \ox{+1,Na}, \ox{2,Ca}, \ox{-2,S}, \ox{-1,F}
\end{LTXexample}

There are a number of keys, that can be used to modify the \cmd{ox} command.\Key[true][ox]{parse}{\uline{true}/false}\Key[true][ox]{roman}{\uline{true}/false}
\begin{itemize}
 \item\code{parse = \uline{true}/false} when \code{false} an arbitrary entry can be used for \code{<number>}.
 \item\code{roman = \uline{true}/false} switches from roman to arabic numbers.
 \item\code{pos = top/super/side}; \code{top} places \code{<number>} above \code{<atom>}, \code{super} to the upper right and \code{side} to the right and inside brackets.
 \item\code{explicit-sign = \uline{true}/false} shows the $+$ for positiv numbers and the $\pm$ for $0$.
 \item\code{decimal-marker = comma/point} choice for the decimal marker for formal oxidation numbers like \ox{1.2,X}.
\end{itemize}
\Key[top][ox]{pos}{top/super/side}\Key[false][ox]{explicit-sign}{\uline{true}/false}\Key[point][ox]{decimal-marker}{comma/point}
\begin{LTXexample}
 \ox[roman=false]{2,Ca} \ox{2,Ca} \\
 \ox[pos=super]{3,Fe}-Oxide \\
 \ox[pos=side]{3,Fe}-Oxide \\
 \ox[parse=false]{?,Mn}
\end{LTXexample}
The \code{pos=super} variant also can be set with the shortcut \cmd{ox*}:
\begin{LTXexample}
 \ox{3,Fe} \ox*{3,Fe}
\end{LTXexample}
Using the \code{explicit-sign} key will always show the sign of the oxidation number:
\begin{LTXexample}
 \chemsetup[ox]{explicit-sign = true}
 \ox{+1,Na}, \ox{2,Ca}, \ox{-2,S}, \ox{0,F2}
\end{LTXexample}
As you could see in the last example, \code{<atom>} is placed within \paket{mhchem}'s \cmd{ce} command. However, using this fact does not necessarily give good results.
\begin{LTXexample}[pos=b]
 Compare \ox{-1,O2^{2-}} to \ce{\ox{-1,O}{}_2 \mch[2]} or \ce{\ox{-1,O}{}_2^{2-}}.
\end{LTXexample}
Sometimes one might want to use formal oxidation numbers like \num{.5} or $\frac{1}{3}$. This is possible:
\begin{LTXexample}
 \ox{.5,Br2\pch} \ox{1/3,I3+}
\end{LTXexample}

\subsection{Partial Charges and similar Stuff}\label{ssec:partialladungen}
The next ones probably are seldomly needed but nevertheless useful:
\begin{framed}
 \cmd{delp} \delp\ (\textbf{del}ta + \textbf{p}lus) \\
 \cmd{delm} \delm\ (\textbf{del}ta + \textbf{m}inus) \\
 \cmd{fdelp} \fdelp \\
 \cmd{fdelm} \fdelm
\end{framed}
These macros for example can be used with the \cmd{ox} command or with the \paket{chemfig} package:
\begin{LTXexample}[pos=b]
 \chemsetup{
   option/circled = all,
   ox/parse       = false
 }
 \ox{\delp,H}\ox{\delm,Cl} \hspace*{1cm}
 \chemfig{\chemabove[3pt]{\lewis{246,Br}}{\delm}-\chemabove[3pt]{H}{\delp}}
\end{LTXexample}

The following macros are useful together with \paket{chemfig}, too.
\begin{framed}
 \cmd{scrp} \scrp (\textbf{scr}iptstyle + \textbf{p}lus) \\
 \cmd{scrm} \scrm (\textbf{scr}iptstyle + \textbf{m}inus) \\
 \cmd{fscrp} \fscrp \\
 \cmd{fscrm} \fscrm \\
 \cmd{fsscrp} \fsscrp (using \cmd{scriptscriptstyle})\\
 \cmd{fsscrm} \fsscrm
\end{framed}
\begin{LTXexample}[pos=b,rframe=]
 \setatomsep{1.8em}\chemfig{CH_3-\chemabove{C}{\scrp}(-[6]C|H_3)-\vphantom{H_3}CH_3}
 
 \chemfig{\fmch{}|O-\chemabove{N}{\fscrp}(-[1]O|\fmch)-[7]O|\fmch}
\end{LTXexample}

\section{Reaction Mechanisms}\label{sec:mechanismen}
With the command\marginnote{This command can also be used in math mode and inside the \cmd{ce} command of the \paket{mhchem} package.}
\begin{framed}
 \cmd{mech\oa{<type>}}
\end{framed}
one can specify the most common reaction mechanisms. \code{<type>} can have one of the following values:
\begin{itemize}
 \item\cmd{mech} (empty, no opt. argument) nucleophilic substitution \mech
 \item\cmd{mech\oa{1}} unimolecular nucleophilic substitution \mech[1]
 \item\cmd{mech\oa{2}} bimolecular nucleophilic substitution \mech[2]
 \item\cmd{mech\oa{se}} electrophilic substitution \mech[se]
 \item\cmd{mech\oa{1e}} unimolecular electrophilic substitution \mech[1e]
 \item\cmd{mech\oa{2e}} bimolecular electrophilic substitution \mech[2e]
 \item\cmd{mech\oa{ar}} electrophilic aromatic substitution \mech[ar]
 \item\cmd{mech\oa{e}} elimination \mech[e]
 \item\cmd{mech\oa{e1}} unimolecular elimination \mech[e1]
 \item\cmd{mech\oa{e2}} bimolecular elimination \mech[e2]
 \item\cmd{mech\oa{cb}} unimolecular elimination "conjugated base", \ie via carbanion \mech[cb]
\end{itemize}

\section{Redox Reactions}\label{sec:redoxreaktionen}
\CMname provides two commands\footnote{Thanks to \href{http://www.mathannotated.com/}{Peter Cao} who suggested this feature.}, to visualize the transfer of electrons in redox reactions. Both commands are using \TikZ.
\begin{framed}
 \cmd{OX\ma{<name>,<atom>}}\\
 \cmd{redox\da{<name1>,<name2>}\oa{<tikz>}\oa{<num>}\ma{<text>}}
\end{framed}
\cmd{OX} places \code{<atom>} into a node, which is named with \code{<name>}. If you have set two \cmd{OX}, they can be connected with a line using \cmd{redox}. To do so the names of the two nodes that are to be connected are written in the round braces. Since \cmd{redox} draws a tikzpicture with options \code{remember picture,overlay}, the document needs to be \emph{compiled at least two times}.
\begin{LTXexample}[rframe=]
 \OX{a,Na} $\rightarrow$ \OX{b,Na}\pch\redox(a,b){oxidation}
\end{LTXexample}
This line can be customized using \TikZ keys in \oa{<tikz>}:
\begin{LTXexample}[rframe=]
 \OX{a,Na} $\rightarrow$ \OX{b,Na}\pch\redox(a,b)[->,red]{ox}
\end{LTXexample}
With the argument \oa{<num>} the length of the vertical parts of the line can be adjusted. The default length is \code{.6em}. This length is multiplied with \code{<num>}. If you use a negative value the line is placed  \emph{below} the text.
\begin{LTXexample}[rframe=]
 \OX{a,Na} $\rightarrow$ \OX{b,Na}\pch
 \redox(a,b)[->,red]{ox}
 \redox(a,b)[<-,blue][-1]{red}
\end{LTXexample}
The default length of the vertical lines can be customized with the key\Key[.6em][redox]{dist}{<dim>} \code{dist}:
\begin{LTXexample}[rframe=]
 \chemsetup{redox/dist=1em}
 \OX{a,Na} $\rightarrow$ \OX{b,Na}\pch\redox(a,b)[->,red]{ox}
\end{LTXexample}
Additionally the key\Key[.2em][redox]{sep}{<dim>} \code{sep} can be used to change the distance between the atom and the beginning of the line.
\begin{LTXexample}[rframe=]
 \chemsetup{redox/sep=.5em}
 \OX{a,Na} $\rightarrow$ \OX{b,Na}\pch\redox(a,b)[->,red]{ox}
\end{LTXexample}

Examples:
\begin{LTXexample}[rframe=]
 \ce{ 2 \OX{o1,Na} + \OX{r1,Cl2} -> 2 \OX{o2,Na}\pch + 2 \OX{r2,Cl}\mch }
 \redox(o1,o2){\small OX: $- 2\el$}
 \redox(r1,r2)[][-1]{\small RED: $+ 2\el$}
\end{LTXexample}
\begin{LTXexample}[rframe=]
 \chemsetup[charges]{append}
 \ce{ 2 \OX{o1,\ox{0,Na}} + \OX{r1,\ox{0,Cl2}} -> 2 \OX{o2,\ox{+1,Na}}\pch + 2 \OX{r2,\ox{-1,Cl}}\mch }
 \redox(o1,o2){\small OX: $- 2\el$}
 \redox(r1,r2)[][-1]{\small RED: $+ 2\el$}
\end{LTXexample}
\begin{LTXexample}[rframe=]
 \chemsetup[charges]{append}
 \ce{ 2 \OX{o1,\ox{0,Na}} + \OX{r1,\ox{0,Cl2}} -> 2 \OX{o2,\ox{+1,Na}}\pch + 2 \OX{r2,\ox{-1,Cl}}\mch }
 \redox(o1,o2)[draw=red,->][3.33]{\small OX: $- 2\el$}
 \redox(r1,r2)[draw=blue,->]{\small RED: $+ 2\el$}
 \end{LTXexample}
\begin{LTXexample}[rframe=]
 \chemsetup[charges]{append}
 \ce{ 2 \OX{o1,\ox{0,Na}} + \OX{r1,\ox{0,Cl2}} -> 2 \OX{o2,\ox{+1,Na}}\pch + 2 \OX{r2,\ox{-1,Cl}}\mch }
 \redox(o1,o2)[green,-stealth]{\small OX: $- 2\el$}
 \redox(r1,r2)[purple,-stealth][-1]{\small RED: $+ 2\el$}
\end{LTXexample}

In v1.1 there was the command \cmd{setredoxdist\ma{<dim>}}\formercmd{setredoxdist\ma{<dim>}}. By using the package option \code{version=1} it is provided again.

\section{(Standard) State, Thermodynamics}\label{sec:standardstate}
\subsection{Thermodynamic Variables}\label{ssec:siunitx}
The following commands use \paket{siunitx}:\changed{Enthalpy}\changed{Entropy}\changed{Gibbs}
\begin{framed}
 \cmd{Enthalpy\oa{<keyval>}\da{<subscript>}\ma{<value>}} \\
 \cmd{Entropy\oa{<keyval>}\da{<subscript>}\ma{<value>}} \\
 \cmd{Gibbs\oa{<keyval>}\da{<subscript>}\ma{<value>}}
\end{framed}
Their usage is pretty much self-explaining:
\begin{LTXexample}
  \Enthalpy{123} \\
  \Entropy{123} \\
  \Gibbs{123}
\end{LTXexample}
The argument \da{<subscript>} adds a subscript for specification: \cmd{Enthalpy\da{r}\ma{123}} \Enthalpy(r){123}.

There are several keys to customize the commands.\Key[\cmd{standardstate}](thermo){exponent}{<anything>}\Key(thermo){delta}{<anything>/false}\Key(thermo){subscript}{left/right}\Key(thermo){unit}{<unit>}
\begin{itemize}
 \item\code{exponent = <anything>}
 \item\code{delta = <anything>/false}
 \item\code{subscript = left/right}
 \item\code{unit = <unit>}
\end{itemize}
The default values depend on the command.
\begin{LTXexample}
 \Enthalpy[unit=\kilo\joule]{-285} \\
 \Gibbs[delta=false]{0} \\
 \Entropy[delta=\Delta,exponent=]{56.7}
\end{LTXexample}
The unit is set corresponding to the rules of \paket{siunitx} and depends on its settings:
\begin{LTXexample}[pos=b]
 \Enthalpy{-1234.56e3} \\
 \sisetup{per-mode=symbol,exponent-product=\cdot,output-decimal-marker={,},group-four-digits=true}
 \Enthalpy{-1234.56e3}
\end{LTXexample}

\subsubsection{Create New Variables}
You can use the command\changed{setnewstate}
\begin{framed}
 \cmd{setnewstate\oa{<keyval>}\ma{<name>}\ma{<symbol>}\ma{<unit>}}
\end{framed}
to create new corresponding commands:
\begin{LTXexample}
 \setnewstate{Helmholtz}{A}{\kilo\joule\per\mole}
 \setnewstate[subscript-left=false,exponent=]{ElPot}{E}{\volt}
 \Helmholtz{123.4} \\
 \ElPot{-1.1} \\
 \ElPot[exponent=0]($\ce{Sn}|\ce{Sn \pch[2]}||\ce{Pb \pch[2]}|\ce{Pb}$){0.01}
\end{LTXexample}

The command has some keys with which the default behaviour of the new command can be set.\Key[\cmd{standardstate}](newstate){exponent}{<anything>}\Key[\cmd{Delta}](newstate){delta}{<anything>/false}\Key[true](newstate){subscript-left}{true/false}\Key(newstate){subscript}{<anything>}
\begin{itemize}
 \item\code{exponent = <anything>}
 \item\code{delta = <anything>/false}
 \item\code{subscript-left = true/false}
 \item\code{subscript = <anything>}
\end{itemize}

\subsubsection{Redefine Variables}
With\changed{renewstate}
\begin{framed}
 \cmd{renewstate\oa{<keyval>}\ma{<name>}\ma{<symbol>}\ma{<unit>}}
\end{framed}
you can redefine the already existing commands:
\begin{LTXexample}
 \renewstate{Enthalpy}{h}{\joule}
 \Enthalpy(f){12.5}
\end{LTXexample}
The command is analogous to \cmd{setnewstate}, \ie it has the same keys.

So -- for following thermodynamic conventions -- one could define a molar and an absolute variable:
\begin{LTXexample}
 \setnewstate[exponent=]{enthalpy}{h}{\kilo\joule\per\mole}% molar
 \renewstate[exponent=]{Enthalpy}{H}{\kilo\joule}% absolut
 \enthalpy{-12.3} \Enthalpy{-12.3}
\end{LTXexample}

\subsection{State}\label{ssec:state}
The commands presented in section \ref{ssec:siunitx} internally all use the command\marginnote{Please note that \ma{<subscript>} is an \emph{optional} argument.}\changed{State}
\begin{framed}
 \cmd{State\oa{<keyval>}\ma{<symbol>}\ma{<subscript>}}
\end{framed}
It can be used to write the thermodynamic variables without value and unit.

Examples:
\begin{LTXexample}
 \State{A}, \State{G}{f}, \State[subscript-left=false]{E}{\ce{Na}}, \State[exponent=\SI{1000}{\celsius}]{H}
\end{LTXexample}

Again there are some keys to customize the command:\Key[\cmd{standardstate}][state](state){exponent}{<anything>}\Key[true][state](state){subscript-left}{true/false}\Key[\cmd{Delta}][state](state){delta}{<anything>/false}
\begin{itemize}
 \item\code{exponent = <anything>}
 \item\code{subscript-left = true/false}
 \item\code{delta = <anything>/false}
\end{itemize}

In v1.1 there was the command \cmd{setstatesubscript\ma{<subscript pos>}}\formercmd{setstatesubscript\ma{<subscript pos>}}. By using the package option \code{version=1} it is provided again.

\section{Spectroscopy}\label{sec:spektroskopie}
\marginnote[\baselineskip]{If you want the command to look like the corresponding \paket{bpchem} commands (\paket{bpchem} command \cmd{HNMR} \HNMR and \CMname command \cmd{NMR} \NMR), then you use the package option \code{bpchem} (see section \ref{sec:optionen}).}If substances are examined wether they are what they're supposed to, one often needs NMR spectroscopy. Measured results then are written in a way like: \NMR(400)[CDCl3] = \num{1.59}\ldots\ \CMname provides a command which simplifies writing this down (uses \paket{siunitx}).
\begin{framed}
 \cmd{NMR\ma{<num>,<elem>}\da{<num>,<unit>}\oa{<solvent>}} \\
 \cmd{NMR*\ma{<num>,<elem>}\da{<num>,<unit>}\oa{<solvent>}}
\end{framed}
\emph{All} arguments are optional! Without arguments we get:\marginnote[\baselineskip]{All arguments can be combined freely, the command can also be used in math mode.}
\begin{LTXexample}
 \NMR \\
 \NMR*
\end{LTXexample}
With the first argument you can specify the kind of NMR:
\begin{LTXexample}
 \NMR{13,C}
\end{LTXexample}
With the second argument the frequency (in \si{\mega\hertz}) can be specified:
\begin{LTXexample}
 \NMR(400)
\end{LTXexample}
You also can change the unit:
\begin{LTXexample}
 \NMR(4e8,\hertz)
\end{LTXexample}
Please note that the setup of \paket{siunitx} also has an impact on this command:
\begin{LTXexample}
 \sisetup{exponent-product=\cdot}\NMR(4e8,\hertz)
\end{LTXexample}
And finally with the third argument the solvent can be specified:
\begin{LTXexample}
 \NMR[CDCl3]
\end{LTXexample}

With the keys \code{unit}\Key[\cmd{mega}\cmd{hertz}][nmr]{unit}{<unit>} and \code{nucleus}\Key[\ma{1,H}][nmr]{nucleus}{\ma{<num>,<elem>}} the default unit and the default nucleus can be changed.

Examples:
\begin{LTXexample}
 {\chemsetup[nmr]{nucleus={13,C}}\NMR(100) \NMR*(100) } \\
 \NMR*{19,F}[CFCl3] \NMR*{19,F}(285)[CFCl3] \\
 \NMR(400)[CDCl3] = \num{1.59} (q, 1H, \textit{J} = \SI{11.6}{\hertz}, H-4)
\end{LTXexample}

\section{Commands for \textsf{mhchem}}\label{sec:mhchem}
From v2.0 \CMname loads the package \paket{mhchem}.

Before the commands are described some words on using commands inside the \cmd{ce} and \cmd{cee} commands. Probably due to the way these commands are processed there can be difficulties especially when using commands with arguments.

Often you have to leave blank spaces:
\begin{LTXexample}
 \ce{Na\pch}\\     % no problem
 \ce{Ca\pch[2]}\\  % displayed wrong
 \ce{Ca \pch[2]}\\ % displayed right
 \ce{Ca$\pch[2]$}  % displayed right
\end{LTXexample}

You also need to put curly braces at the end of commands:
\begin{LTXexample}
 \ce{\mch OMe}\\   % displayed wrong
 \ce{\mch{} OMe}\\ % displayed right
 \ce{$\mch$OMe}    % displayed right
\end{LTXexample}

This is \emph{not} only true for \CMname commands!
\begin{LTXexample}[pos=b]
 \ce{A \quad B} \ce{Na2\textbf{O}}\\    % displayed wrong
 \ce{A \quad{} B} \ce{Na2 \textbf{O}}\\ % displayed right
 \ce{A $\quad$ B} \ce{Na2 \textbf{O}}   % displayed right
\end{LTXexample}

As you can see in most cases instead of using blank spaces or curly braces you can also put the according command between \code{\$ \$}.

\subsection{Reaction Environments}\label{ssec:mhchem_reaktionen}
\subsubsection{Defined by \CMname}
You can use these environments for numbered\ldots
\begin{framed}
\cmd{begin\ma{reaction}}\\
   \code{<mhchem code>}\\
\cmd{end\ma{reaction}}\\
\cmd{begin\ma{reactions}}\\
   \code{<mhchem code>}\\
\cmd{end\ma{reactions}}
\end{framed}
\ldots and their starred versions for unnumbered reactions.
\begin{framed}
\cmd{begin\ma{reaction*}}\\
   \code{<mhchem code>}\\
\cmd{end\ma{reaction*}}\\
\cmd{begin\ma{reactions*}}\\
   \code{<mhchem code>}\\
\cmd{end\ma{reactions*}}
\end{framed}
With them you can create (un)numbered reaction equations similar to mathematical equations.

The environments \code{reaction}/\code{reaction*} use the \code{equation}/\code{equation*} environments and the environments \code{reactions}/ \code{reactions*} use the \code{align}/\code{align*} environments to display the reactions.

\begin{LTXexample}[pos=b]
 Reaction with counter:
 \begin{reaction}
  A -> B
 \end{reaction}
\end{LTXexample}

\begin{LTXexample}[pos=b]
 Reaction without counter:
 \begin{reaction*}
  C -> D
 \end{reaction*}
\end{LTXexample}

\begin{LTXexample}[pos=b]
 Several aligned reactions with counter:
 \begin{reactions}
  A     &-> B + C \\
  D + E &-> F
 \end{reactions}
\end{LTXexample}

\begin{LTXexample}[pos=b]
 Several aligned reactions without counter:
 \begin{reactions*}
  G     &-> H + I \\
  J + K &-> L
 \end{reactions*}
\end{LTXexample}

If you want to change the layout of the counter tags, you can use \cmd{renewtagform\ma{<tagname>}\oa{<format>}\ma{<right delim>}\ma{<left delim>}}\footnote{Provided by the \paket{mathtools} package}.
\begin{LTXexample}[pos=b]
 \renewtagform{reaction}[R \textbf]{[}{]}
 \begin{reaction}
  H2O + CO2 <<=> H2CO3
 \end{reaction}
\end{LTXexample}
Note, that the name of the tagform has changed with v2.0. It was called \code{CMreaction} in v1.*. Option \code{version=1} restores this name.

\subsubsection{Own Reactions}
You can create new types of reactions with the command:\changed{newreaction}
\begin{framed}
 \cmd{newreaction\oa{<keyval>}\ma{<name>}\ma{<math name>}}
\end{framed}
\code{<name>} will be the name of the new environment. \code{<math name>} is the used math environment.

The command has two keys. There is \code{star}\Key[false]{star}{true/false}, which will also define a starred version of the new environment, if the starred math environment exists. If it doesn't exist, this will cause an error.

Then there is \code{arg}\Key[false]{arg}{true/false}, which is used to define an environment with a mandatory argument. Of course this only works, if the used math environment has a mandatory argument.

The predefined environments are defined via\\
\cmd{newreaction\oa{star}\ma{reaction}\ma{equation}} and\\
\cmd{reaction\oa{star}\ma{reactions}{align}}.

Let's suppose, you'd like to have the alignment behaviour of the \code{alignat} environment for \paket{mhchem} reactions. You could do the following:\\
\cmd{newreaction\oa{star,arg}\ma{reactionsat}\ma{alignat}}

With this the \code{reactionsat} environment is defined.
\begin{LTXexample}[pos=b]
 \newreaction[star,arg]{reactionsat}{alignat}
 \begin{reactionsat}{3}
  A     &-> B     &&-> C     &&-> D \\
  aaaaa &-> bbbbb &&-> ccccc &&-> ddddd
 \end{reactionsat}
 \begin{reactionsat*}{2}
  A     &-> B     & C            &-> D  \\
  aaaaa &-> bbbbb &\quad{} ccccc &-> ddddd
 \end{reactionsat*}
\end{LTXexample}

\subsection{Phases}\label{ssec:mhchem_phasen}
These commands are intended to indicate the phase of a compound. Although these commands were intended for the use with \paket{mhchem} they can be used without it as well.
\begin{itemize}
 \item\cmd{sld\oa{<anything>}} \sld\formercmd{solid}
 \item\cmd{lqd\oa{<anything>}} \lqd\formercmd{liquid}
 \item\cmd{gas} \gas
 \item\cmd{aq} \aq
\end{itemize}
Please notice, that the commands \cmd{solid} and \cmd{liquid} are now called \cmd{sld} and \cmd{lqd}, respectively.

\begin{LTXexample}[pos=b]
 \ce{C\sld{} + 2 H2O\lqd{} -> CO2\gas{} + 2 H2\gas}\\
 To make it complete: NaCl\aq.
\end{LTXexample}

With the package option \code{german} (see section \ref{sec:optionen}) or by using the optional arguments you get the german versions:
\begin{LTXexample}[pos=b]
 {\chemsetup[option]{german=true}
 \ce{C\sld{} + 2 H2O\lqd{} -> CO2\gas{} + 2 H2\gas} }\\
 \ce{C \sld[f] + 2 H2O \lqd[fl] -> CO2\gas{} + 2 H2\gas}
\end{LTXexample}

If you looked closely, you have probably noticed that the german \cmd{lqd} isn't identical to \cmd{lqd\oa{fl}} but to \cmd{lqd\oa{f\textbackslash /l}}. This makes the subscript more readable.

Of course it doesn't matter which command with optional argument you use. Both of them just write a subscript with braces. \cmd{sld\oa{f}} is identical to \cmd{lqd\oa{f}}.

One can think of other uses, too:
\begin{LTXexample}
 C\sld[graphite]
\end{LTXexample}

\newpage
\subsection{Text Under Compounds}\label{ssec:mhchem_beschriftung}
\CMname provides a command, with which you can place text below of compounds.\changed{mhName}\Key[\cmd{centering}][mhName]{align}{<alignment>}\Key[][mhName]{fontattr}{<commands>}\Key[\cmd{tiny}][mhName]{fontsize}{<fontsize>}\Key[][mhName]{width}{<dim>}
\begin{framed}
 \cmd{mhName\oa{<keyval>}\ma{<formula>}\ma{<text>}}
\end{framed}
For example:
\begin{LTXexample}[pos=b]
 \ce{4 C2H5Cl + Pb / Na -> \mhName{Pb(C2H5)4}{former antiknock additive} + NaCl}
\end{LTXexample}

There are several keys to customize \cmd{mhName}.
\begin{itemize}
 \item\code{align}
 \item\code{fontattr}
 \item\code{fontsize}
 \item\code{width}
\end{itemize}
\begin{LTXexample}[pos=b]
 \ce{4 C2H5Cl + Pb / Na -> \mhName[fontsize=\footnotesize]{Pb(C2H5)4}{former antiknock additive} + NaCl}\\
 \chemsetup[mhName]{align=\raggedright,fontsize=\small,fontattr=\bfseries\color{red},width=3cm}
 \ce{4 C2H5Cl + Pb / Na -> \mhName{Pb(C2H5)4}{former antiknock additive} + NaCl}
\end{LTXexample}

In v1.1 there was the command \cmd{setmhName\ma{<textattr>}}\formercmd{setmhName\ma{<textattr>}}. By using the package option \code{version=1} it is provided again.

\section{Newman Projections}\label{sec:newman}
\CMname provides the command\changed{newman}
\begin{framed}
 \cmd{newman\oa{<keyval>}\da{<angle>}\ma{<1>,<2>,<3>,<4>,<5>,<6>}}
\end{framed}
that allows you to create newman projections (uses \TikZ). With \code{<angle>} the back atoms are rotated counter clockwise with respect to the front atoms.\Key[0][newman]{angle}{<angle>}\Key[1][newman]{scale}{<factor>}\Key[][newman]{ring}{<tikz>}\Key[][newman]{atoms}{<tikz>}\Key[][newman]{back-atoms}{<tikz>}
\begin{LTXexample}[pos=b]
 \newman{} \newman(170){}
 \newman{1,2,3,4,5,6} \newman{1,2,3} \newman{,,,4,5,6}
\end{LTXexample}

Several keys allow customization:
\begin{itemize}
 \item\code{angle = <angle>} default angle
 \item\code{scale = <factor>} scale the whole projection
 \item\code{ring = <tikz>} customize the ring with \TikZ keys
 \item\code{atoms = <tikz>} customize the nodes within which the atoms are set
 \item\code{back-atoms = <tikz>} explicitly customize the back atoms
\end{itemize}
\begin{LTXexample}[pos=b]
 \chemsetup[newman]{angle=45} \newman{}
 \newman[scale=.75,ring={draw=blue,fill=blue!20}]{}
\end{LTXexample}
\begin{LTXexample}
 \chemsetup[newman]{atoms={draw=red,fill=red!20,inner sep=2pt,rounded corners}}
 \newman{1,2,3,4,5,6}
\end{LTXexample}
\begin{LTXexample}[pos=b]
 \chemsetup[newman]{
   atoms = {draw=red,fill=red!20,inner sep=2pt,rounded corners},
   back-atoms = {draw=blue,fill=blue!20,inner sep=2pt,rounded corners}
 }
 \newman{1,2,3,4,5,6} \newman(170){1,2,3,4,5,6}
\end{LTXexample}

\section{s, p, and Hybrid Orbitals}\label{sec:orbitale}
In v1.1 there have been the commands \cmd{porb\oa{<options>}}\formercmd{porb\oa{<options>}}, \cmd{phorb\oa{<options>}}\formercmd{phorb\oa{<options>}}, \cmd{pxorb}\formercmd{pxorb}, \cmd{pyorb}\formercmd{pyorb} und \cmd{pzorb}\formercmd{pzorb}. By using the package option \code{version=1} they are provided again

\CMname provides the following command to create orbitals:
\begin{framed}
 \cmd{orbital\oa{<keyval>}\ma{<type}}
\end{framed}
There are the following types available for \code{<type>}:
\begin{itemize}
 \item\code{s}
 \item\code{p}
 \item\code{sp}
 \item\code{sp2}
 \item\code{sp3}
\end{itemize}
\begin{LTXexample}[pos=b]
 \orbital{s} \orbital{p} \orbital{sp} \orbital{sp2} \orbital{sp3}
\end{LTXexample}

\newpage
Depending on the type you have different keys to modify the orbitals:\Key[+][orbital/<type>](orbital){phase}{\uline{+}/-}\Key[1][orbital/<type>](orbital){scale}{<factor>}\Key[black][orbital/<type>](orbital){color}{<color>}\Key[90][orbital/<type>](orbital){angle}{<angle>}\Key[false][orbital/<type>](orbital){half}{\uline{true}/false}
\begin{itemize}
 \item\code{phase = \uline{+}/-} changes the phase of the orbital (all types)
 \item\code{scale = <factor>} changes the size of the orbital (all types)
 \item\code{color = <color>} changes the color of the orbital (all types)
 \item\code{angle = <angle>} rotates the orbitals with a p contribution counter clockwise (all types except \code{s})
 \item\code{half = \uline{true}/false} displays only half an orbital (only \code{p})
\end{itemize}
\begin{LTXexample}[pos=b]
 \orbital{s} \orbital[phase=-]{s} 
 \orbital{p} \orbital[phase=-]{p}
 \orbital{sp3} \orbital[phase=-]{sp3}
 
 \orbital[angle=0]{p} \orbital[color=red!50]{p} \orbital[angle=135,scale=1.5]{p} \orbital[half]{p}
\end{LTXexample}

Additionally there are two keys, with which the \TikZ behaviour can be changed.\Key[false][orbital]{overlay}{\uline{true}/false}\Key[1][orbital]{opacity}{<num>}
\begin{itemize}
 \item\code{overlay = \uline{true}/false} the orbital ``doesn't need space''; it is displayed with the \TikZ option \code{overlay}.
 \item\code{opacity = <num>} the orbital becomes transparent; \code{<value>} can have values between \code{1} (fully opaque) to \code{0} (invisible).
\end{itemize}
\begin{LTXexample}[pos=b]
 \vspace{1cm}\hspace{1cm}
 \chemsetup[orbital]{
   overlay,
   p/color = black!70
 }
 \setbondoffset{0pt}
 \chemfig{?\orbital{p}-[,1.3]{\orbital[phase=-]{p}}-[:30,1.1]\orbital{p}-[:150,.9]{\orbital[phase=-]{p}}-[4,1.3]\orbital{p}-[:-150,1.1]{\orbital[phase=-]{p}}?}
 \vspace{1cm}
\end{LTXexample}
\begin{LTXexample}[pos=b]
 \vspace{2cm}\hspace{2cm}
 \setbondoffset{0pt}
 \chemsetup[orbital]{
   overlay ,
   opacity = .75 ,
   p/scale = 1.6 ,
   s/color = blue!50 ,
   s/scale = 1.6
 }
 \chemfig{\orbital{s}-[:-20]{\orbital[scale=2]{p}}{\orbital[half,angle=0]{p}}{\orbital[angle=170,half]{p}}{\orbital[angle=-150,half]{p}}(-[:-150]\orbital{s})-\orbital{s}}
 \vspace{2cm}
\end{LTXexample}

\section{Key Overview}
In the table below all keys provided by \CMname for customization are listed. All keys that belong to a module; can be set with \cmd{chemsetup\oa{<module>}\ma{<keyval>}} or \linebreak\cmd{chemsetup\ma{<module>/<keyval>}}.

Some keys can be set without value. Then the \uline{underlined} value is used.
\begin{fullwidth}
\begin{longtable}{>{\ttfamily\hspace{5mm}}l>{\ttfamily}l>{\ttfamily}l>{\ttfamily}ll}
 \toprule
 \normalfont\bfseries key & \normalfont\bfseries module & \normalfont\bfseries values & \normalfont\bfseries default & \\
 \midrule
 \endhead
 \bottomrule
 \endfoot
 \multicolumn{5}{l}{Paket-Optionen:} \\
 bpchem              & option   & \uline{true}/false      & false                 & page \pageref{key:option_bpchem} \\
 circled             & option   & \uline{formal}/all/none & formal                & page \pageref{key:option_circled} \\
 circletype          & option   & \uline{chem}/math       & chem                  & page \pageref{key:option_circletype} \\
 EZ                  & option   & \uline{chemmacros}/cool & chemmacros            & page \pageref{key:option_EZ} \\
 german              & option   & \uline{true}/false      & false                 & page \pageref{key:option_german} \\
 version             & option   & 1/2                     & 2                     & page \pageref{key:option_version} \\
 xspace              & option   & \uline{true}/false      & true                  & page \pageref{key:option_xspace} \\
 \multicolumn{5}{l}{\cmd{ba}, \cmd{Nu}:} \\
 elpair              & base     & \uline{dots}/dash/false & false                 & page \pageref{key:particle_elpair} \\
 \multicolumn{5}{l}{\cmd{pch}, \cmd{mch}, \cmd{fpch}, \cmd{fmch}:} \\
 append              & charges  & \uline{true}/false      & false                 & Seite \pageref{key:charges_append} \\
 \multicolumn{5}{l}{\cmd{ox}:} \\
 parse               & ox       & \uline{true}/false      & true                  & page \pageref{key:ox_parse} \\
 roman               & ox       & \uline{true}/false      & true                  & page \pageref{key:ox_roman} \\
 pos                 & ox       & top/super/side          & top                   & page \pageref{key:ox_pos} \\
 explicit-sign       & ox       & \uline{true}/false      & false                 & page \pageref{key:ox_explicit-sign} \\
 decimal-marker      & ox       & comma/point             & point                 & page \pageref{key:ox_decimal-marker} \\
 \multicolumn{5}{l}{\cmd{OX}, \cmd{redox}:} \\
 dist                & redox    & <dim>                   & .6em                  & page \pageref{key:redox_dist} \\
 sep                 & redox    & <dim>                   & .2em                  & page \pageref{key:redox_sep} \\
 \multicolumn{5}{l}{\cmd{Enthalpy}, \cmd{Entropy}, \cmd{Gibbs}:} \\
 exponent            &          & <anything>              & \cmd{standardstate}   & page \pageref{key:thermo_exponent} \\
 delta               &          & <anything>/false        &                       & page \pageref{key:thermo_delta} \\
 subscript           &          & left/right              &                       & page \pageref{key:thermo_subscript} \\
 unit                &          & <unit>                  &                       & page \pageref{key:thermo_unit} \\
 \multicolumn{5}{l}{\cmd{setnewstate}, \cmd{renewstate}:} \\
 exponent            &          & <anything>              & \cmd{standardstate}   & page \pageref{key:newstate_exponent} \\
 delta               &          & <anything>/false        &                       & page \pageref{key:newstate_delta} \\
 subscript           &          & <anything>              &                       & page \pageref{key:newstate_subscript} \\
 subscript-left      &          & true/false              &                       & page \pageref{key:newstate_subscript-left} \\
 \multicolumn{5}{l}{\cmd{State}:} \\
 exponent            &          & <anything>              & \cmd{standardstate}   & page \pageref{key:state_exponent} \\
 delta               &          & <anything>/false        &                       & page \pageref{key:state_delta} \\
 subscript-left      &          & true/false              &                       & page \pageref{key:state_subscript-left} \\
 \multicolumn{5}{l}{\cmd{NMR}:} \\
 unit                & nmr      & <unit>                  & \cmd{mega}\cmd{hertz} & page \pageref{key:nmr_unit} \\
 nucleus             & nmr      & \{<num>,<atom symbol>\} & \{1,H\}               & page \pageref{key:nmr_nucleus}  \\
 \multicolumn{5}{l}{\cmd{newreaction}:} \\
 star                &          & \uline{true}/false      & false                 & page \pageref{key:star} \\
 arg                 &          & \uline{true}/false      & false                 & page \pageref{key:arg} \\
 \multicolumn{5}{l}{\cmd{mhName}:} \\
 align               & mhName   & <alignment>             & \cmd{centering}       & page \pageref{key:mhName_align} \\
 fontattr            & mhName   & <commands>              &                       & page \pageref{key:mhName_fontattr} \\
 fontsize            & mhName   & <fontsize>              & \cmd{tiny}            & page \pageref{key:mhName_fontsize} \\
 width               & mhName   & <dim>                   &                       & page \pageref{key:mhName_width} \\
 \multicolumn{5}{l}{\cmd{newman}:} \\
 angle               & newman   & <angle>                 & 0                     & page \pageref{key:newman_angle} \\
 scale               & newman   & <factor>                & 1                     & page \pageref{key:newman_scale} \\
 ring                & newman   & <tikz>                  &                       & page \pageref{key:newman_ring} \\
 atoms               & newman   & <tikz>                  &                       & page \pageref{key:newman_atoms} \\
 back-atoms          & newman   & <tikz>                  &                       & page \pageref{key:newman_back-atoms} \\
 \multicolumn{5}{l}{\cmd{orbital} \ttfamily <type> = s/p/sp/sp2/sp3:} \\
 phase               & orbital/<type>  & \uline{+}/-      & +                     & page \pageref{key:orbital_phase} \\
 scale               & orbital/<type>  & <factor>         & 1                     & page \pageref{key:orbital_scale} \\
 color               & orbital/<type>  & <color>          & black                 & page \pageref{key:orbital_color} \\
 angle               & orbital/<type>  & <angle>          & 90                    & page \pageref{key:orbital_angle} \\
 half                & orbital/p       & \uline{true}/false & false               & page \pageref{key:orbital_half} \\
 overlay             & orbital  & \uline{true}/false      & false                 & page \pageref{key:orbital_overlay} \\
 opacity             & ornital  & <num>                   & 1                     & page \pageref{key:orbital_opacity}
\end{longtable}
\end{fullwidth}

\section{Suggestions and Bug Reports}
Feedback on \CMname is highly appreciated and welcome! If you have suggestions for macros, missing features \etc, please don't hesitate to cantact me. If you recognize any errors, be it chemical ones, wrong documentation and the like, I'd be grateful about a short email to \href{mailto:contact@mychemistry.eu}{contact@mychemistry.eu}. If you find any bugs, it would be best, if you'd send me a minimal example, with which I can reproduce the bug.

Many thanks to all the people, who already provided me with feedback!

\end{document}