summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex')
-rw-r--r--Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex2371
1 files changed, 1631 insertions, 740 deletions
diff --git a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex
index 8fc970a5562..6dbe65850f0 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex
@@ -1,10 +1,11 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% --------------------------------------------------------------------------- %
-% - chemmacros - chemmacros_doc_en.tex - %
+% - the CHEMMACROS bundle - %
+% - chemmacros_doc_en.tex - %
% - macros and commands for chemists - %
% --------------------------------------------------------------------------- %
% - Clemens Niederberger - %
-% - 2011/11/03 - %
+% - 2012/02/01 - %
% --------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/ - %
% - contact@mychemistry.eu - %
@@ -12,7 +13,7 @@
% - If you have any ideas, questions, suggestions or bugs to report, please - %
% - feel free to contact me. - %
% --------------------------------------------------------------------------- %
-% - Copyright 2011 Clemens Niederberger - %
+% - Copyright 2011-2012 Clemens Niederberger - %
% - - %
% - This work may be distributed and/or modified under the - %
% - conditions of the LaTeX Project Public License, either version 1.3 - %
@@ -25,802 +26,857 @@
% - 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}
+\documentclass[DIV11,toc=index]{scrartcl}
+\usepackage{fontspec,xltxtra}
+\usepackage{polyglossia}
+ \setmainlanguage{english}
\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 }
+\usepackage{chemfig,chemstyle,multicol,makeidx,booktabs}
+\usepackage{chemmacros}
+\usepackage[version=3]{mhchem}
+\usepackage[para]{footmisc}
+
+% Setup:
+\setmainfont[SmallCapsFont=Linux Libertine Capitals O,SlantedFont=Linux Libertine Slanted O]{Linux Libertine O}
+\setsansfont[Scale=MatchLowercase,SmallCapsFont=Linux Biolinum Capitals O,SlantedFont=Linux Biolinum Slanted O]{Linux Biolinum O}
+\setmonofont[Scale=MatchLowercase]{Inconsolata}
+\chemsetup[option]{synchronize}
+\colorlet{chemformula}{darkgray}
+\chemsetup[chemformula]{font-spec={[Color=chemformula]Latin Modern Sans}}
+\reversemarginpar
+\input{chemmacros-codehelper}
+
+\begin{filecontents}{index_en.ist}
+ preamble "\\begin{theindex}\n Section titles are indicated \\textbf{bold}, packages \\textsf{sans serif}, commands \\textcolor{code}{\\texttt{\\textbackslash brown}}, keys \\textcolor{key}{\\texttt{green}} and modules (only \\chemmacros) \\textcolor{module}{\\texttt{red}}.\\newline\n\n"
+ heading_prefix "{\\bfseries "
+ heading_suffix "\\hfil}\\nopagebreak\n"
+ headings_flag 1
+ delim_0 "\\dotfill "
+ delim_1 "\\dotfill "
+ delim_2 "\\dotfill "
+ delim_r "\\textendash"
+ suffix_2p "\\nohyperpage{\\,f.}"
+ suffix_3p "\\nohyperpage{\\,ff.}"
+\end{filecontents}
+
+\DeclareInstance{xfrac}{chemformula-text-frac}{text}
{
- \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 } } }
- }
+ scale-factor = 1 ,
+ denominator-bot-sep = -.2ex ,
+ denominator-format = \scriptsize #1 ,
+ numerator-top-sep = -.2ex ,
+ numerator-format = \scriptsize #1
}
-\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:
+\usepackage{hyperref}
+ \hypersetup{colorlinks=true,
+ allcolors=myblue,
+ plainpages=false,
+ bookmarksopen=true,
+ bookmarksopenlevel=1,
+ bookmarksnumbered=true,
+ pdfauthor={Clemens Niederberger},
+ pdftitle={chemmacros bundle - English documentation},
+ pdfsubject={macros and commands for chemists},
+ pdfkeywords={chemmacros,chemformula,ghsystem},
+ pdfcreator={XeLaTeX}
}
-% 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
- }
- }
+\newcommand*\chemmacros{{\scshape\textcolor{myblue}{chemmacros}}\xspace}
+\newcommand*\chemformula{{\scshape\textcolor{myblue}{chemformula}}\xspace}
+\newcommand*\ghsystem{{\scshape\textcolor{myblue}{ghsystem}}\xspace}
-\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*\Chemmacros{{\fontspec[Color=myblue,Scale=1.2]{Linux Biolinum Shadow O}chemmacros}}
+\newcommand*\Chemformula{{\fontspec[Color=myblue,Scale=1.2]{Linux Biolinum Shadow O}chemformula}}
+\newcommand*\Ghsystem{{\fontspec[Color=myblue,Scale=1.2]{Linux Biolinum Shadow O}ghsystem}}
\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}
+\newcommand*\TIKZ{Ti\textbf{\textit{k}}Z}
+\newcommand*\TikZ{\index{TikZ@\TIKZ}\mbox{\TIKZ}\xspace}
+
+\newcommand*\pdfTeX{\textsc{pdf\kern-.2ex\TeX}}
+\renewcommand*\LuaTeX{{Lua\kern-.2ex\TeX}}
+\providecommand\glqq{„}
+\providecommand\grqq{“}
+
+\makeindex
\begin{document}
+\GetFileInfo{chemmacros}
+
+\begin{center}
+ % title:
+ \Huge the \Chemmacros\ bundle \\[.5cm]
+ \fileversion \qquad \filedate \\[.5cm]
+ \Large packages \Chemmacros, \Chemformula\ and \Ghsystem \\[.5cm]
+ % author and contact:
+ \large Clemens \textsc{Niederberger} \\[.5cm]
+ \normalsize\url{https://bitbucket.org/cgnieder/chemmacros/}\\
+ \href{mailto:contact@mychemistry.eu}{contact@mychemistry.eu}\\[1cm]
+ % picture:
+ \large\ch[font-spec={[Color=chemformula]Augie}]{ 2 "\OX{o1,\ox{0,Na}}" + "\OX{r1,\ox{0,Cl}}" {}2 -> 2 "\OX{o2,\ox{+1,Na}}" \pch{} + 2 "\OX{r2,\ox{-1,Cl}}" \mch }
+ \redox(o1,o2)[red,-cf]{\small\ch[font-spec={[Color=red]Augie},math-space=.3em]{$-$ 2 e-}}
+ \redox(r1,r2)[blue,-cf][-1]{\small\ch[font-spec={[Color=blue]Augie},math-space=.3em]{$+$ 2 e-}}
+\end{center}
+\vskip1cm
+\begin{multicols}{2}
+ \tableofcontents
+\end{multicols}
+
+\part{Preliminaries}\secidx{PRELIMINARIES}
+\section{Licence, Requirements and README}
+The \chemmacros bundle underlies the \LaTeX\ project public license (lppl) version 1.3 or later. (\url{http://www.latex-project.org/lppl.txt})
+
+\chemmacros uses the packages \paket*{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}.
+
+Obviously, the packages \chemformula and \ghsystem are loaded as they are part of this bundle.
+
+\chemmacros also uses the packages \paket{siunitx}, \paket{mathtools}, \paket{bm} and \paket{environ} as well as \paket*{tikz}\footnote{CTAN: \href{http://www.ctan.org/pkg/pgf/}{pgf}} and the \TikZ libraries \texttt{calc} and \texttt{arrows}.
+
+Package option \key{bpchem} (section \ref{sec:optionen}) needs the package \paket{bpchem}, package option \key{xspace} needs the package \paket{xspace} and package option \key{method}{mhchem} needs the package \paket{mhchem}.
+
+\chemmacros has been bundled with the new \chemformula and \ghsystem packages. \chemformula provides an alternative to \paket{mhchem}. This leads to some internal changes in \chemmacros. On the same time the documentation has been redesigned.
-\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}
+You might remember that \chemmacros' options all belong to different modules, see section \ref{sec:setup} for further information. These are typeset in the left margin when the option is first mentioned. In section \ref{sec:overview} all options and the module the belong to are listed. Throughout the document options are typeset \textcolor{key}{\texttt{green}} and modules \textcolor{module}{\texttt{red}}.
+
+\chemformula uses the packages \chemmacros and \paket{nicefrac}. \chemformula has no own package options but passes all options on to \chemmacros.
+
+\ghsystem uses the packages \chemmacros, \paket{tabu}, \paket{longtable}, \paket{ifpdf} and \paket{graphicx}. \ghsystem has no own package options but passes all options on to \chemmacros.
+
+\section{Motivation}
+\chemmacros started some years ago as a growing list of custom macros that I frequently used. I cannot completely recall when and why I decided to release them as a package. Well \textendash\ here we go and you might find it useful, too, I hope.
+
+I would guess that nearly every chemist using \LaTeXe\ is aware of the great \paket{mhchem} package. \chemformula is \emph{not} a replacement for \paket{mhchem} but an alternative. I thought about writing it for a while. Some minor points in \paket{mhchem} always bothered me, but they hardly seemed enough for a new package. They weren't even enough for a feature request to the \paket{mhchem} author. What convinced me at last was the fun and the challenge.
+
+\chemformula works very similar to \paket{mhchem} but is more strict as to how compounds, stoichiometric factors and arrows are input. In the same time \chemformula offers some possibilities to customize the output that \paket{mhchem} does not. If you are content with the way \paket{mhchem} works there is probably no need to use \chemformula. Maybe you are curious anyway.
+
+As a chemist you are probably aware of the fact that the \textsc{United Nations} have developed the “\textbf{G}lobally \textbf{H}armonized \textbf{S}ystem of Classification and Labelling of Chemicals” (GHS) as a global replacement for the various different systems in different countries. While it has not been implemented by all countries yet\footnote{\url{http://www.unece.org/trans/danger/publi/ghs/implementation_e.html}}, it as only a matter of time. The package \ghsystem now enables you to typeset all the hazard and precautionary statements and pictograms in a very easy way.
+
+\section{Loading the Bundle}\secidx{Loading the Bundle}
+Loading \chemmacros with
+\begin{beispiel}[code only]
+ \usepackage{chemmacros} % `chemmacros', `formula' and `ghs' are loaded
+\end{beispiel}
+will also load \chemformula and \ghsystem. However, you can prevent \chemmacros from loading \ghsystem:
+\begin{beispiel}[code only]
+ \usepackage[ghs=false]{chemmacros} % `chemmacros' and `formula' are loaded
+\end{beispiel}
+
+Loading \chemformula or \ghsystem explicitly is possible and will also load \chemmacros if it hasn't been loaded yet, and will therefore implicitly load the other package, too.
+\begin{beispiel}[code only]
+ \usepackage{chemformula} % `chemmacros', `formula' and `ghs' are loaded
+ or
+ \usepackage[ghs=false]{chemformula} % `chemmacros' and `formula' are loaded
+\end{beispiel}
+
+However, it is recommended to simply use \lstinline=\usepackage{chemmacros}= and setup the required options with \lstinline=\chemsetup= (also see section \ref{sec:setup}).
+\secidx*{Loading the Bundle}
+
+\section{Package Options}\label{sec:optionen}\secidx{Package Options}
+\chemmacros has several package options. They all are used as key/value pairs like
+\begin{beispiel}[code only]
+ \usepackage[option1 = <value1>, option2 = <value2>]{chemmacros}
+\end{beispiel}
+Some also can be used without value (\lstinline+\usepackage[option1]{chemmacros}+), which means that the \uline{underlined} value is used.
+
+Both \chemformula and \ghsystem don't have package options of their own. If you load them explicitly you can give them \chemmacros' options instead and they will pass them on to \chemmacros.
+\begin{description}
+ \item \key[option]{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 \lstinline+\HNMR+ and \lstinline+\CNMR+. (default: \texttt{false})
+ \item \key[option]{circled}{\uline{formal}/all/none} \chemmacros uses two different kinds of charges\footnote{Thanks to Christoph Sch\"afer, who pointed out to me, that v1.1 handled the charges too sloppy!}, which indicate the usage of real ($+/-$) and formal (\fplus/\fminus) charges. The option \texttt{formal} distinguishes between them, option \texttt{none} displays them all without circle, option \texttt{all} circles all (default: \texttt{formal})
+ \item \key[option]{circletype}{\uline{chem}/math} This option switches between two kinds of circled charge symbols: \cmd{fplus} \fplus\ and \lstinline+$\oplus$+ $\oplus$. (default: \texttt{chem})
+ \item \key[option]{detect-bold}{\uline{true}/false} This option determines wether or not macros like \cmd{pKa} recognize a bold font series. \textbf{bold \pKa text} or {\chemsetup[option]{detect-bold}\textbf{bold \pKa text}}. (default: \texttt{false})
+ \item \key[option]{EZ}{\uline{chemmacros}/cool} The command \cmd{E} is defined by the package \paket{cool} as well as by \chemmacros. With this option you can choose, which definition is used, see page \pageref{EZ}. (default: \texttt{chemmacros})
+ \item \key[option]{german}{\uline{true}/false} This option changes the commands \cmd{pKa}, \cmd{sld} and \cmd{lqd} (default: \texttt{false}). This option has the alias \key[option]{ngerman}.
+ \item \key[option]{ghs}{\uline{true}/false} Disable the use of the \ghsystem package. Setting \key{ghs}{false} will prevent \chemmacros from loading \ghsystem. (default: \texttt{true})
+ \item \key[option]{method}{\uline{chemformula}/mhchem} You can choose the method which \chemmacros will use for the reaction environments (see section \ref{ssec:mhchem_reaktionen}) and the typesetting of the particles (see section \ref{sec:teilchen}). (default: \texttt{chemformula}). This option can only be chosen in the preamble.
+ \item \key[option]{strict}{\uline{true}/false} Setting \key{strict}{true} will turn all warning messages into erros messages. (default: \texttt{false})
+ \item \key[option]{synchronize}{\uline{true}/false} The setting \texttt{true} will tell \chemmacros the adapt the font settings of \chemformula if that method has been chosen (default: \texttt{false}). In order to demonstrate this feature this document is set with \key{synchronize}{true} and the \chemformula setting \lstinline+\chemsetup[chemformula]{font-spec={[Color=darkgray]Latin Modern Sans}}+.
+ \item \key[option]{version}{1/2/bundle} This option restores the old definitions of some commands, so documents set with v1.* will still compile correctly. (default: \texttt{bundle}). Actually \texttt{2} and \texttt{bundle} are only aliases. This option can only be chosen in the preamble.
+ \item \key[option]{xspace}{\uline{true}/false} With this option most commands are defined with a \lstinline+\xspace+. (default: \texttt{true})
\end{description}
+\secidx*{Package Options}
-\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]
+\section{Setup}\label{sec:setup}\secidx{Setup}
+Various of \chemmacros', \chemformula's and \ghsystem' commands have key/value pairs with which they can be customized. Most times they can be used as (optional) argument of the commands themselves. They also can most times be used with the \cmd{chemsetup} command.
+\begin{description}
+ \item \cmd{chemsetup}[<module>]{<key> = <value>} or
+ \item \cmd{chemsetup}{<module>/<key> = <value>}
+\end{description}
+The keys each belong to a module, which defines for which commands they are intended for. If a key is presented, you'll see the module to which it belongs in the left margin. You have two ways to use keys with the \cmd{chemsetup}, as you can see above.
+
+The package options can also be seen as keys belonging to the module \textcolor{module}{\ttfamily option}. This means they can also be used with the \cmd{chemsetup} command (except for the option \key[option]{version}{1/2/3}).
+\begin{beispiel}
\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}
+\end{beispiel}
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}
+All options of \chemformula belong to the module \textcolor{module}{\texttt{chemformula}} and all of \ghsystem' options belong to the module \textcolor{module}{\texttt{ghs}}.
+\secidx*{Setup}
+\secidx*{PRELIMINARIES}
+
+\part{\texorpdfstring{\Chemmacros}{chemmacros}}\secidx{CHEMMACROS}
+\section{Particles, Ions and Symbols}\label{sec:teilchen}\secidx{Particles, Ions and Symbols}
+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}. These commands can be used in text as well as in math mode.
+\begin{description}
+ \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 \chemmacros, if the package \paket{chemstyle} is not loaded; the idea is borrowed from there\footnote{many thanks to the package author \href{http://www.texdev.net/}{Joseph Wright}.}.
+\end{description}
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}
+\begin{description}
+ \item \cmd{R}[<sign>]{<subscript>}
+\end{description}
+
+\begin{beispiel}
\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}
+\end{beispiel}
+The two particles \cmd{Nu} and \cmd{ba} can be modified. To do that you use the option
+\begin{description}
+ \item\key[particle]{elpair}{false/\uline{dots}/dash}.
+\end{description}
+It only has any effect, if the package \paket{chemfig} is loaded, since it uses it's command \lstinline+\Lewis+.
+\begin{beispiel}
+ % needs package `chemfig'
+ \ba[elpair] \Nu[elpair=dash]
+
+ \chemsetup[particle]{elpair}
+ \ba \Nu
+\end{beispiel}
+\secidx*{Particles, Ions and Symbols}
\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}
+\subsection{IUPAC Names}\secidx{IUPAC Names}
+Similar to the \paket{bpchem} package \chemmacros provides a command\footnote{The idea and the implementation is borrowed from \paket*{bpchem} by Bjørn Pedersen.} to typeset IUPAC names. Why is that useful? IUPAC names can get very long. So long indeed that they span over more than two lines, especially in two-column documents. This means they must be allowed to be broken more than one time. This is what the following command does.
+\begin{description}
+ \item\cmd{iupac}{<IUPAC name>} Inside this command use \cmd{\textbar} and \cmd{-} to indicate a breaking point or a breaking dash. Use \cmd{\textasciicircum} as a shortcut for \lstinline=\textsuperscript=\footnote{Actually \cmd{\textasciicircum} uses a \chemformula command instead.}.
+\end{description}
+\begin{beispiel}
+ \begin{minipage}{.4\linewidth}
+ \iupac{Tetra\|cyclo[2.2.2.1\^{1,4}]\-un\|decane-2\-dodecyl\-5\-(hepta\|decyl\|iso\|dodecyl\|thio\|ester)}
+ \end{minipage}
+\end{beispiel}
+The \cmd{iupac} command is more of a semantic command. Most times you can achieve (nearly) the same thing by using \cmd{-} instead of \cmd{\textbar}, \texttt{-} instead of \cmd{-} and \lstinline=\textsuperscript= instead of \cmd{\textasciicircum}.
+
+\subsection{Stereo Descriptors and Nomenclature}\secidx{Stereo Descriptors and Nomenclature}
+The macros in this section are intended to make the writing of IUPAC names more convenient.
+\paragraph{Cahn-Ingold-Prelog}\index{Cahn-Ingold-Prelog}\secidx[Cahn-Ingold-Prelog]{IUPAC Names}
+\begin{description}
+ \item \cmd{Rcip} \Rcip
+ \item \cmd{Scip} \Scip
+ \item \cmd{cip}{<conf>} \eg: \cmd{cip}{R,S} \cip{R,S}
+\end{description}
+
+\paragraph{Fischer}\index{Fischer}\secidx[Fischer]{IUPAC Names}
+\begin{description}
+ \item \cmd{Dfi} \Dfi
+ \item \cmd{Lfi} \Lfi
+\end{description}
+
+\paragraph{cis/trans, zusammen/entgegen, syn/anti \& tert}\index{tert}\secidx[tert]{IUPAC Names}\index{cis/trans}\secidx[cis/trans]{IUPAC Names}\index{zusammen/entgegen}\secidx[zusammen/entgegen]{IUPAC Names}\secidx[syn/anti]{IUPAC Names} 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 \chemmacros. With \paket{bpchem} they \textit{always} get a \lstinline+\xspace+, with \chemmacros \textit{never}.
+\begin{description}
+ \item \cmd{cis} \cis
+ \item \cmd{trans} \trans
+ \item \cmd{Z} \Z\label{EZ}
+ \item \cmd{E} \E\ (\cmd{E} is also defined by the package \paket{cool}. By using the package option \key{EZ}{cool} instead of \cmd{E} and \cmd{Z} \chemmacros defines \cmd{Ent} and \cmd{Zus}.)
+ \item \cmd{syn} \syn
+ \item \cmd{anti} \anti
+ \item \cmd{tert} \tert
+\end{description}
+
+\paragraph{ortho/meta/para}\index{ortho/meta/para}\secidx[ortho/meta/para]{IUPAC Names}
+\begin{description}
+ \item \cmd{ortho} \ortho
+ \item \cmd{meta} \meta
+ \item \cmd{para} \para
+\end{description}
+
+\paragraph{absolute configuration}\index{absolute configuration} (uses \TikZ)
+\begin{description}
+ \item \cmd{Rconf}[<letter>] \cmd{Rconf}: \Rconf \quad\cmd{Rconf}[]: \Rconf[]
+ \item \cmd{Sconf}[<letter>] \cmd{Sconf}: \Sconf \quad\cmd{Sconf}[]: \Sconf[]
+\end{description}
+
+Examples:
+\begin{beispiel}
+ \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} \\
+ \iupac{\cis\-2\-Butene} = \\
+ \iupac{\Z\-2\-Butene}, \\
+ \iupac{\cip{2E,4Z}\-Hexa\|diene} \\
+ \iupac{\meta\-Xylol} = \\
+ \iupac{1,3\-Di\|methyl\|benzene}
+\end{beispiel}
+\secidx*{IUPAC Names}\secidx*{Stereo Descriptors and Nomenclature}
+
+\subsection{Latin Phrases}\secidx{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}
+\begin{description}
+ \item \cmd{insitu} \insitu
+ \item \cmd{abinitio} \abinitio
+\end{description}
+
+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 \lstinline+\latin+ command. This means that then the appearance depends on \paket{chemstyle}'s option \texttt{abbremph}:
+\begin{beispiel}
\insitu, \abinitio\\
\cstsetup{abbremph=false}
\insitu, \abinitio
-\end{LTXexample}
+\end{beispiel}
If \paket{chemstyle} hasn't been loaded, they're always in \textit{italics}.
+\secidx*{Latin Phrases}
-\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]\\
+\section{Units for the Usage With \textsf{siunitx}}\label{sec:einheiten}\secidx{Units}
+In chemistry some non-SI units are very common. \paket{siunitx} provides the command \lstinline+\DeclareSIUnit{<command>}{<unit>}+ to add arbitrary units. \chemmacros uses that command to provide some units. Like all \paket{siunitx} units they're only valid inside \lstinline+\SI{<num>}{<unit>}+ and \lstinline+\si{<unit>}+.
+\begin{description}
+ \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} The units \cmd{cmc}, \cmd{molar}, and \cmd{Molar} are defined by the package \paket{chemstyle} as well. \chemmacros 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{description}
+
+By the way: \lstinline+\mmHg+ \si{\mmHg} already is defined by \paket{siunitx} and \paket{chemstyle}
+\secidx*{Units}
+
+\section{Acid/Base}\label{sec:saeure_base}\secidx{Acid/Base}
+Easy representation of \pH, \pKa \ldots (the command \cmd{pKa} depends on the package option \key[option]{german}, see section \ref{sec:optionen}.)
+\begin{description}
+ \item \cmd{pH} \pH
+ \item \cmd{pOH} \pOH
+ \item \cmd{Ka} \Ka
+ \item \cmd{Kb} \Kb
+ \item \cmd{Kw} \Kw
+ \item \cmd{pKa}[<num>] \cmd{pKa}: \pKa, \cmd{pKa}[1]: \pKa[1]
+ \item \cmd{pKb}[<num>] \cmd{pKb}: \pKb, \cmd{pKb}[1]: \pKb[1]
+ \item \cmd{p}{<anything>} \eg \cmd{p}{\cmd{Kw}} \p{\Kw}
+\end{description}
+
+\begin{beispiel}
+ \Ka \Kb \pKa \pKa[1] \pKb \pKb[1]\\
\chemsetup[option]{german=true}
- \pKa \pKa[1] \pKb \pKb[1]
-\end{LTXexample}
+ \Ka \Kb \pKa \pKa[1] \pKb \pKb[1]
+\end{beispiel}
+\secidx*{Acid/Base}
-\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}
+\section{Oxidation Numbers, Real and Formal Charges}\label{sec:ladungen}
+\chemmacros distinguishes between real ($+$/$-$) and formal (\fplus/\fminus) charge symbols, also see section \ref{sec:optionen}. All commands using formal charge symbols start with a \texttt{f}.
+\subsection{Ion Charges}\label{ssec:ionen}\secidx{Ion Charges}
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}
+\begin{description}
+ \item \cmd{pch}[<number>] positive charge (\textbf{p}lus + \textbf{ch}arge)
+ \item \cmd{mch}[<number>] negative charge (\textbf{m}inus + \textbf{ch}arge)
+\end{description}
+
+\begin{beispiel}
\pch, Na\pch, Ca\pch[2]\\
\mch, F\mch, S\mch[2]
-\end{LTXexample}
+\end{beispiel}
The same for formal charges:
-\begin{framed}
- \cmd{fpch\oa{<number>}} positive charge\\
- \cmd{fmch\oa{<number>}} negative charge
-\end{framed}
-\begin{LTXexample}
+\begin{description}
+ \item \cmd{fpch}[<number>] positive charge
+ \item \cmd{fmch}[<number>] negative charge
+\end{description}
+
+\begin{beispiel}
\fpch\ \fmch\ \fpch[3] \fmch[3]
-\end{LTXexample}
+\end{beispiel}
-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}
+There is a key which influences the behaviour of the charges.
+\begin{description}
+ \item \key[charges]{append}{\uline{true}/false} if set \texttt{true}, the charge is appended together with an empty group.
+\end{description}
+This is how the key influences the behaviour:
+\begin{beispiel}
\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}
+\end{beispiel}
+In most cases this behaviour will be unwanted. However, in some cases it might be useful, for example together with the \cmd{ox} command (see next section):
+\begin{beispiel}
\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}
+\end{beispiel}
+\secidx*{Ion Charges}
+
+\subsection{Oxidation Numbers}\label{ssec:oxidationszahlen}\secidx{Oxidation Numbers}
+Typesetting oxidation numbers:
+\begin{description}
+ \item \cmd{ox}[<keyval>]{<number>,<atom>} places \texttt{<number>} above \texttt{<atom>}; \texttt{<number>} has to be a (rational) number!
+\end{description}
+
+\begin{beispiel}
\ox{+1,Na}, \ox{2,Ca}, \ox{-2,S}, \ox{-1,F}
-\end{LTXexample}
+\end{beispiel}
-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}
+There are a number of keys, that can be used to modify the \cmd{ox} command.
+\begin{description}
+ \item \key[ox]{parse}{\uline{true}/false} when \texttt{false} an arbitrary entry can be used for \texttt{<number>}.
+ \item \key[ox]{roman}{\uline{true}/false} switches from roman to arabic numbers.
+ \item \key[ox]{pos}{top/super/side}; \texttt{top} places \texttt{<number>} above \texttt{<atom>}, \texttt{super} to the upper right as superscript and \texttt{side} to the right and inside brackets.
+ \item \key[ox]{explicit-sign}{\uline{true}/false} shows the $+$ for positiv numbers and the $\pm$ for $0$.
+ \item \key[ox]{decimal-marker}{comma/point} choice for the decimal marker for formal oxidation numbers like \ox{1.2,X}.
+\end{description}
+
+\begin{beispiel}
\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}
+\end{beispiel}
+
+The \key[ox]{pos}{super} variant also can be set with the shortcut \cmd[oxa]{ox*}:
+\begin{beispiel}
\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}
+\end{beispiel}
+
+Using the \key[ox]{explicit-sign} key will always show the sign of the oxidation number:
+\begin{beispiel}
\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}
+ \ox{+1,Na}, \ox{2,Ca}, \ox{-2,S}, \ch{"\ox{0,F}" {}2}
+\end{beispiel}
+
+\begin{beispiel}
+ Compare \ox{-1,\ch{O2^2-}} to \ch{"\ox{-1,O}" 2^2-}
+\end{beispiel}
+
+Sometimes one might want to use formal oxidation numbers like \num{.5} or $\frac{1}{3}$:
+\begin{beispiel}
+ \ox{.5,\ch{Br2}} \ch{"\ox{1/3,I}" 3+}
+\end{beispiel}
+
+The fraction uses the \lstinline+\sfrac+ command of the \paket{xfrac} package. For this purpose the instance \lstinline+chemmacros-ox-frac+ is defined.
+\begin{beispiel}[code only]
+\DeclareInstance{xfrac}{chemmacros-ox-frac}{text}
+ {
+ scale-factor = 1.2 ,
+ denominator-bot-sep = -.5ex ,
+ numerator-top-sep = -.3ex ,
+ slash-left-kern = -.2em ,
+ slash-right-kern = -.2em ,
+ slash-symbol-font = lmr
+ }
+\end{beispiel}
+Of course you can redefine it so that it suits your needs as the output often strongly depends on the used font.
+\secidx*{Oxidation Numbers}
+
+\subsection{Partial Charges and Similar Stuff}\label{ssec:partialladungen}\secidx{Partial Charges}
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}
+\begin{description}
+ \item \cmd{delp} \delp\ (\textbf{del}ta + \textbf{p}lus)
+ \item \cmd{delm} \delm\ (\textbf{del}ta + \textbf{m}inus)
+ \item \cmd{fdelp} \fdelp
+ \item \cmd{fdelm} \fdelm
+\end{description}
+
These macros for example can be used with the \cmd{ox} command or with the \paket{chemfig} package:
-\begin{LTXexample}[pos=b]
+\begin{beispiel}
\chemsetup{
option/circled = all,
ox/parse = false
}
- \ox{\delp,H}\ox{\delm,Cl} \hspace*{1cm}
+ \ce{\ox{\delp,H}-\ox{\delm,Cl}} \hspace*{1cm}
\chemfig{\chemabove[3pt]{\lewis{246,Br}}{\delm}-\chemabove[3pt]{H}{\delp}}
-\end{LTXexample}
+\end{beispiel}
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=]
+\begin{description}
+ \item \cmd{scrp} \scrp (\textbf{scr}iptstyle + \textbf{p}lus)
+ \item \cmd{scrm} \scrm (\textbf{scr}iptstyle + \textbf{m}inus)
+ \item \cmd{fscrp} \fscrp
+ \item \cmd{fscrm} \fscrm
+ \item \cmd{fsscrp} \fsscrp (using \lstinline+\scriptscriptstyle+)
+ \item \cmd{fsscrm} \fsscrm
+\end{description}
+
+\begin{beispiel}
\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:
+\end{beispiel}
+\secidx*{Partial Charges}
+
+\section{Reaction Mechanisms}\label{sec:mechanismen}\secidx{Reaction Mechanisms}
+With the command
+\begin{description}
+ \item\cmd{mech}[<type>]
+\end{description}
+one can specify the most common reaction mechanisms. \texttt{<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]
+ \item\cmd{mech}[1] unimolecular nucleophilic substitution \mech[1]
+ \item\cmd{mech}[2] bimolecular nucleophilic substitution \mech[2]
+ \item\cmd{mech}[se] electrophilic substitution \mech[se]
+ \item\cmd{mech}[1e] unimolecular electrophilic substitution \mech[1e]
+ \item\cmd{mech}[2e] bimolecular electrophilic substitution \mech[2e]
+ \item\cmd{mech}[ar] electrophilic aromatic substitution \mech[ar]
+ \item\cmd{mech}[e] elimination \mech[e]
+ \item\cmd{mech}[e1] unimolecular elimination \mech[e1]
+ \item\cmd{mech}[e2] bimolecular elimination \mech[e2]
+ \item\cmd{mech}[cb] unimolecular elimination “conjugated base”, \ie via carbanion \mech[cb]
\end{itemize}
+\secidx*{Reaction Mechanisms}
-\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=]
+\section{Redox Reactions}\label{sec:redoxreaktionen}\secidx{Redox Reactions}
+\chemmacros 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{description}
+ \item \cmd{OX}{<name>,<atom>}
+ \item \cmd{redox}(<name1>,<name2>)[<tikz>][<num>]{<text>}
+\end{description}
+
+
+\cmd{OX} places \texttt{<atom>} into a node, which is named with \texttt{<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 \texttt{remember picture,overlay}, the document needs to be \emph{compiled at least two times}.
+\begin{beispiel}[ox]
\OX{a,Na} $\rightarrow$ \OX{b,Na}\pch\redox(a,b){oxidation}
-\end{LTXexample}
+\end{beispiel}
This line can be customized using \TikZ keys in \oa{<tikz>}:
-\begin{LTXexample}[rframe=]
+\begin{beispiel}[ox]
\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=]
+\end{beispiel}
+
+With the argument \oa{<num>} the length of the vertical parts of the line can be adjusted. The default length is \texttt{.6em}. This length is multiplied with \texttt{<num>}. If you use a negative value the line is placed \emph{below} the text.
+\begin{beispiel}[ox]
\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=]
+\end{beispiel}
+The default length of the vertical lines can be customized with the option
+\begin{description}
+ \item \key[redox]{dist}{<dim>} A \TeX\ dimension. Default = \texttt{.6em}
+\end{description}
+\begin{beispiel}[ox]
\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=]
+\end{beispiel}
+
+Additionally the option
+\begin{description}
+ \item\key[redox]{sep}{<dim>} Default = \texttt{.2em}
+\end{description}
+can be used to change the distance between the atom and the beginning of the line.
+\begin{beispiel}[ox]
\chemsetup{redox/sep=.5em}
\OX{a,Na} $\rightarrow$ \OX{b,Na}\pch\redox(a,b)[->,red]{ox}
-\end{LTXexample}
+\end{beispiel}
Examples:
-\begin{LTXexample}[rframe=]
- \ce{ 2 \OX{o1,Na} + \OX{r1,Cl2} -> 2 \OX{o2,Na}\pch + 2 \OX{r2,Cl}\mch }
+\begin{beispiel}[ox]
+ \ch{ 2 "\OX{o1,Na}" + "\OX{r1,Cl}" {}2 -> 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 }
+\end{beispiel}
+\begin{beispiel}[ox]
+ \ch{ 2 "\OX{o1,\ox{0,Na}}" + "\OX{r1,\ox{0,Cl}}" {}2 -> 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 }
+\end{beispiel}
+\begin{beispiel}[ox]
+ \ch{ 2 "\OX{o1,\ox{0,Na}}" + "\OX{r1,\ox{0,Cl}}" {}2 -> 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}
+ \end{beispiel}
+\begin{beispiel}[ox]
+ \ch{ 2 "\OX{o1,\ox{0,Na}}" + "\OX{r1,\ox{0,Cl}}" {}2 -> 2 "\OX{o2,\ox{+1,Na}}" \pch{} + 2 "\OX{r2,\ox{-1,Cl}}" \mch }
+ \redox(o1,o2)[green,-stealth]{\small OX}
+ \redox(r1,r2)[purple,-stealth][-1]{\small RED}
+\end{beispiel}
+\secidx*{Redox Reactions}
+
+\section{(Standard) State, Thermodynamics}\label{sec:standardstate}\secidx{Thermodynamics}
\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}
+The following commands use \paket{siunitx}:
+\begin{description}
+ \item \cmd{Enthalpy}[<keyval>](<subscript>){<value>}
+ \item \cmd{Entropy}[<keyval>](<subscript>){<value>}
+ \item \cmd{Gibbs}[<keyval>](<subscript>){<value>}
+\end{description}
+
Their usage is pretty much self-explaining:
-\begin{LTXexample}
+\begin{beispiel}
\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}.
+\end{beispiel}
+The argument \da{<subscript>} adds a subscript for specification: \cmd{Enthalpy}(r){123} \Enthalpy(r){123}.
+
+There are several keys to customize the commands.
+\begin{description}
+ \item \key*{exponent}{<anything>}
+ \item \key*{delta}{<anything>/false}
+ \item \key*{subscript}{left/right}
+ \item \key*{unit}{<unit>}
+\end{description}
-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}
+\begin{beispiel}
\Enthalpy[unit=\kilo\joule]{-285} \\
\Gibbs[delta=false]{0} \\
\Entropy[delta=\Delta,exponent=]{56.7}
-\end{LTXexample}
+\end{beispiel}
The unit is set corresponding to the rules of \paket{siunitx} and depends on its settings:
-\begin{LTXexample}[pos=b]
+\begin{beispiel}
\Enthalpy{-1234.56e3} \\
\sisetup{per-mode=symbol,exponent-product=\cdot,output-decimal-marker={,},group-four-digits=true}
\Enthalpy{-1234.56e3}
-\end{LTXexample}
+\end{beispiel}
\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}
+You can use the command
+\begin{description}
+ \item \cmd{setnewstate}[<keyval>]{<name>}{<symbol>}\ma{<unit>}
+\end{description}
+
to create new corresponding commands:
-\begin{LTXexample}
+\begin{beispiel}
\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}
+ \ElPot[exponent=0]($\ch{Sn}|\ch{Sn^2+}||\ch{Pb^2+}|\ch{Pb}$){0.01}
+\end{beispiel}
-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}
+The command has some keys with which the default behaviour of the new command can be set.
+\begin{description}
+ \item \key*{exponent}{<anything>}
+ \item \key*{delta}{<anything>/false}
+ \item \key*{subscript-left}{true/false}
+ \item \key*{subscript}{<anything>}
+\end{description}
\subsubsection{Redefine Variables}
-With\changed{renewstate}
-\begin{framed}
- \cmd{renewstate\oa{<keyval>}\ma{<name>}\ma{<symbol>}\ma{<unit>}}
-\end{framed}
+With
+\begin{description}
+ \item \cmd{renewstate}[<keyval>]{<name>}{<symbol>}\ma{<unit>}
+\end{description}
+
you can redefine the already existing commands:
-\begin{LTXexample}
+\begin{beispiel}
\renewstate{Enthalpy}{h}{\joule}
\Enthalpy(f){12.5}
-\end{LTXexample}
+\end{beispiel}
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}
+So \textendash\ for following thermodynamic conventions \textendash\ one could define a molar and an absolute variable:
+\begin{beispiel}
\setnewstate[exponent=]{enthalpy}{h}{\kilo\joule\per\mole}% molar
- \renewstate[exponent=]{Enthalpy}{H}{\kilo\joule}% absolut
+ \renewstate[exponent=]{Enthalpy}{H}{\kilo\joule}% absolute
\enthalpy{-12.3} \Enthalpy{-12.3}
-\end{LTXexample}
+\end{beispiel}
\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}
+The commands presented in section \ref{ssec:siunitx} internally all use the command\footnote{Please note that \ma{<subscript>} is an \emph{optional} argument.}
+\begin{description}
+ \item \cmd{State}[<keyval>]{<symbol>}\ma{<subscript>}
+\end{description}
+
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}
+\begin{beispiel}
+ \State{A}, \State{G}{f}, \State[subscript-left=false]{E}{\ch{Na}}, \State[exponent=\SI{1000}{\celsius}]{H}
+\end{beispiel}
-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}
+Again there are some keys to customize the command:
+\begin{description}
+ \item \key[state]{exponent}{<anything>}
+ \item \key[state]{subscript-left}{true/false}
+ \item \key[state]{delta}{<anything>/false}
+\end{description}
+\secidx*{Thermodynamics}
-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}\secidx{Spectroscopy}
+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\ \chemmacros provides a command which simplifies writing this down (uses \paket{siunitx}).
+\begin{description}
+ \item \cmd{NMR}{<num>,<elem>}\da{<num>,<unit>}\oa{<solvent>}
+ \item \cmd{NMR*}{<num>,<elem>}\da{<num>,<unit>}\oa{<solvent>}
+\end{description}
-\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}
+\emph{All} arguments are optional! Without arguments we get\footnote{All arguments can be combined freely, the command can also be used in math mode.}:
+\begin{beispiel}
\NMR \\
\NMR*
-\end{LTXexample}
+\end{beispiel}
With the first argument you can specify the kind of NMR:
-\begin{LTXexample}
+\begin{beispiel}
\NMR{13,C}
-\end{LTXexample}
+\end{beispiel}
With the second argument the frequency (in \si{\mega\hertz}) can be specified:
-\begin{LTXexample}
+\begin{beispiel}
\NMR(400)
-\end{LTXexample}
+\end{beispiel}
You also can change the unit:
-\begin{LTXexample}
+\begin{beispiel}
\NMR(4e8,\hertz)
-\end{LTXexample}
+\end{beispiel}
Please note that the setup of \paket{siunitx} also has an impact on this command:
-\begin{LTXexample}
+\begin{beispiel}
\sisetup{exponent-product=\cdot}\NMR(4e8,\hertz)
-\end{LTXexample}
+\end{beispiel}
And finally with the third argument the solvent can be specified:
-\begin{LTXexample}
+\begin{beispiel}
\NMR[CDCl3]
-\end{LTXexample}
+\end{beispiel}
-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.
+With the keys
+\begin{description}
+ \item\key[nmr]{unit}{<unit>} Default = \lstinline=\mega\hertz=
+ \item\key[nmr]{nucleus}{\ma{<num>,<elem>}} Default = \ma{1,H}
+\end{description}
+the default unit and the default nucleus can be changed.
Examples:
-\begin{LTXexample}
+\begin{beispiel}
{\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}
+\end{beispiel}
+\secidx*{Spectroscopy}
+
+\section{Commands for \textsf{mhchem}}\label{sec:mhchem}\secidx{Commands for mhchem}
+\paket{mhchem} isn't loaded automatically any more but only if you've specified \key[option]{method}{mhchem} in the preamble. In the default settings \chemmacros uses \chemformula instead.
+
+\chemmacros provides only one command specifically for \paket{mhchem}\footnote{\chemformula provides its own possibility.}. It is meant to place text below of compounds.
+\begin{description}
+ \item \cmd{mhName}[<keyval>]{<formula>}\ma{<text>}
+\end{description}
+
+For example:
+\begin{beispiel}
+ \ce{4 C2H5Cl + Pb / Na -> \mhName{Pb(C2H5)4}{former antiknock additive} + NaCl}
+\end{beispiel}
+
+There are several keys to customize \cmd{mhName}.
+\begin{description}
+ \item \key[mhName]{align}{<alignment command>} the alignment of the text in the box it is placed in, default = \lstinline+\centering+
+ \item \key[mhName]{format}{<anything>} the format of the text
+ \item \key[mhName]{fontsize}{<font size command>} the fontsize of the text, default = \lstinline+\tiny+
+ \item \key[mhName]{width}{<dim>/auto} the width of the box the text is placed in, default = \texttt{auto}
+\end{description}
+\begin{beispiel}
+ \ce{4 C2H5Cl + Pb / Na -> \mhName[fontsize=\footnotesize]{Pb(C2H5)4}{former antiknock additive} + NaCl}\\
+ \chemsetup[mhName]{align=\raggedright,fontsize=\small,format=\bfseries\color{red},width=3cm}
+ \ce{4 C2H5Cl + Pb / Na -> \mhName{Pb(C2H5)4}{former antiknock additive} + NaCl}
+\end{beispiel}
+\secidx*{Commands for mhchem}
+
+\section{Reaction Environments}\label{ssec:mhchem_reaktionen}\secidx{Reaction Environments}
+\subsection{Defined by \chemmacros}
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}
+\begin{description}
+ \item \env{reaction}{<formula or mhchem code>}
+ \item \env{reactions}{<formula or mhchem code>}
+\end{description}
+
\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}
+\begin{description}
+ \item \env{reaction*}{<formula or mhchem code>}
+ \item \env{reactions*}{<formula or mhchem code>}
+\end{description}
+
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.
+The environments \texttt{reaction}/\texttt{reaction*} use the \texttt{equation}/\texttt{equation*} environments and the environments \texttt{reactions}/\texttt{reactions*} use the \texttt{align}/\texttt{align*} environments to display the reactions.
-\begin{LTXexample}[pos=b]
+\begin{beispiel}
Reaction with counter:
\begin{reaction}
A -> B
\end{reaction}
-\end{LTXexample}
+\end{beispiel}
-\begin{LTXexample}[pos=b]
+\begin{beispiel}
Reaction without counter:
\begin{reaction*}
C -> D
\end{reaction*}
-\end{LTXexample}
+\end{beispiel}
-\begin{LTXexample}[pos=b]
+\begin{beispiel}
Several aligned reactions with counter:
\begin{reactions}
A &-> B + C \\
D + E &-> F
\end{reactions}
-\end{LTXexample}
+\end{beispiel}
-\begin{LTXexample}[pos=b]
+\begin{beispiel}
Several aligned reactions without counter:
\begin{reactions*}
G &-> H + I \\
J + K &-> L
\end{reactions*}
-\end{LTXexample}
+\end{beispiel}
+
+If you want to change the layout of the counter tags, you can use
+
+\cmd{renewtagform}{<tagname>}\oa{<format>}\ma{<right delim>}\ma{<left delim>}\footnote{Provided by the \paket*{mathtools} package}.
-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]
+\begin{beispiel}
\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.
+\end{beispiel}
+
+\subsection{Own Reactions}
+You can create new types of reactions with the command:
+\begin{description}
+ \item \cmd{newreaction}[<keyval>]{<name>}\ma{<math name>}
+\end{description}
-\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.
+\texttt{<name>} will be the name of the new environment. \texttt{<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.
+The command has two keys.
+\begin{description}
+ \item\key*{star}{\uline{true}/false}
+ \item\key*{arg}{\uline{true}/false}
+\end{description}
+There is \key*{star}, 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 \key*{arg}, 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.
-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
+\begin{description}
+ \item \cmd{newreaction}[star]{reaction}\ma{equation} and
+ \item \cmd{reaction}[star]{reactions}\ma{align}.
+\end{description}
-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 \texttt{alignat} environment for \chemformula/\paket{mhchem} reactions. You could do the following:
-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}}
+\cmd{newreaction}[star,arg]{reactionsat}{alignat}
-With this the \code{reactionsat} environment is defined.
-\begin{LTXexample}[pos=b]
+With this the \texttt{reactionsat} environment is defined.
+\begin{beispiel}
\newreaction[star,arg]{reactionsat}{alignat}
\begin{reactionsat}{3}
A &-> B &&-> C &&-> D \\
@@ -830,142 +886,147 @@ With this the \code{reactionsat} environment is defined.
A &-> B & C &-> D \\
aaaaa &-> bbbbb &\quad{} ccccc &-> ddddd
\end{reactionsat*}
-\end{LTXexample}
+\end{beispiel}
-\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.
+\subsection{List of Reactions}
+\chemmacros also provides a command to display a list of the reactions created with the \lstinline+reaction+ environment.
+\begin{description}
+ \item\cmd{listofreactions}
+\end{description}
+\begin{beispiel}[below]
+ \listofreactions
+\end{beispiel}
+
+The Output of this list can be modified by two options:
+\begin{description}
+ \item\key[reaction]{list-name}{<name of the list>} Let's you set the name of the list manually. Default = \texttt{List of reactions}
+ \item\key[reaction]{list-entry}{<prefix to each entry>} Let's you set a prefix to each list entry. Default = \texttt{Reaction}
+\end{description}
+Both default option values recognize the package option \key[option]{german}.
-\begin{LTXexample}[pos=b]
- \ce{C\sld{} + 2 H2O\lqd{} -> CO2\gas{} + 2 H2\gas}\\
+Instead of using the option \key{list-name} you also could redefine \cmd{reactionlistname}.
+
+The list lists all reactions with a number and disregards reactions without number. All reaction environments without star have an optional argument which let's you add a description (or caption) for the entry in the list.
+\begin{beispiel}
+ \begin{reaction}[Autoprotolyse]
+ 2 H2O <<=> H3O+ + OH-
+ \end{reaction}
+\end{beispiel}
+\secidx*{Reaction Environments}
+
+\section{Phases}\label{sec:phasen}\secidx{Phases}
+These commands are intended to indicate the phase of a compound.
+\begin{description}
+ \item \cmd{sld}[<anything>] \sld
+ \item \cmd{lqd}[<anything>] \lqd
+ \item \cmd{gas} \gas
+ \item \cmd{aq} \aq
+\end{description}
+
+Please notice, that the commands \cmd{solid} and \cmd{liquid} are now called \cmd{sld} and \cmd{lqd}, respectively. Also notice that they \emph{don't} have an optional argument inside \cmd{ch}!
+
+\begin{beispiel}
+ \ch{C\sld{} + 2 H2O\lqd{} -> CO2\gas{} + 2 H2\gas}\\
To make it complete: NaCl\aq.
-\end{LTXexample}
+\end{beispiel}
-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]
+With the package option \texttt{german} (see section \ref{sec:optionen}) or by using the optional arguments you get the german versions:
+\begin{beispiel}
{\chemsetup[option]{german=true}
- \ce{C\sld{} + 2 H2O\lqd{} -> CO2\gas{} + 2 H2\gas} }\\
+ \ch{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}
+\end{beispiel}
-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.
+If you looked closely, you have probably noticed that the german \cmd{lqd} isn't identical to \cmd{lqd}[fl] but to \cmd{lqd}[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}}.
+Of course it doesn't matter which command with optional argument you use. Both of them just write a subscript with braces. \cmd{sld}[f] is identical to \cmd{lqd}[f].
One can think of other uses, too:
-\begin{LTXexample}
+\begin{beispiel}
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.
+\end{beispiel}
+\secidx*{Phases}
-\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]
+\section{Newman Projections}\label{sec:newman}\secidx{Newman Projections}
+\chemmacros provides the command
+\begin{description}
+ \item \cmd{newman}[<keyval>]\da{<angle>}\ma{<1>,<2>,<3>,<4>,<5>,<6>}
+\end{description}
+which allows you to create newman projections (uses \TikZ). With \texttt{<angle>} the back atoms are rotated counter clockwise with respect to the front atoms.
+\begin{beispiel}
\newman{} \newman(170){}
\newman{1,2,3,4,5,6} \newman{1,2,3} \newman{,,,4,5,6}
-\end{LTXexample}
+\end{beispiel}
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]
+\begin{description}
+ \item \key[newman]{angle}{<angle>} default angle
+ \item \key[newman]{scale}{<factor>} scale the whole projection
+ \item \key[newman]{ring}{<tikz>} customize the ring with \TikZ keys
+ \item \key[newman]{atoms}{<tikz>} customize the nodes within which the atoms are set
+ \item \key[newman]{back-atoms}{<tikz>} explicitly customize the back atoms
+\end{description}
+
+\begin{beispiel}
\chemsetup[newman]{angle=45} \newman{}
\newman[scale=.75,ring={draw=blue,fill=blue!20}]{}
-\end{LTXexample}
-\begin{LTXexample}
+\end{beispiel}
+\begin{beispiel}
\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]
+\end{beispiel}
+\begin{beispiel}
\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}
+\end{beispiel}
+\secidx*{Newman Projections}
-\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
+\section{s, p, and Hybrid Orbitals}\label{sec:orbitale}\secidx{Orbitals}
+\chemmacros provides the following command to create orbitals:
+\begin{description}
+ \item \cmd{orbital}[<keyval>]{<type}
+\end{description}
-\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]
+There are the following types available for \texttt{<type>}:
+\begin{description}
+ \item \texttt{s}
+ \item \texttt{p}
+ \item \texttt{sp}
+ \item \texttt{sp2}
+ \item \texttt{sp3}
+\end{description}
+
+\begin{beispiel}
\orbital{s} \orbital{p} \orbital{sp} \orbital{sp2} \orbital{sp3}
-\end{LTXexample}
+\end{beispiel}
-\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]
+Depending on the type you have different keys to modify the orbitals:
+\begin{description}
+ \item \key[orbital]{phase}{\uline{+}/-} changes the phase of the orbital (all types)
+ \item \key[orbital]{scale}{<factor>} changes the size of the orbital (all types)
+ \item \key[orbital]{color}{<color>} changes the color of the orbital (all types)
+ \item \key[orbital]{angle}{<angle>} rotates the orbitals with a p contribution counter clockwise (all types except \texttt{s})
+ \item \key[orbital]{half}{\uline{true}/false} displays only half an orbital (only \texttt{p})
+\end{description}
+
+\begin{beispiel}
\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}
+\end{beispiel}
-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]
+Additionally there are two keys, with which the \TikZ behaviour can be changed.
+\begin{description}
+ \item \key[orbital]{overlay}{\uline{true}/false} the orbital “doesn't need space”; it is displayed with the \TikZ option \texttt{overlay}.
+ \item \key[orbital]{opacity}{<num>} the orbital becomes transparent; \texttt{<value>} can have values between \texttt{1} (fully opaque) to \texttt{0} (invisible).
+\end{description}
+
+\begin{beispiel}
\vspace{1cm}\hspace{1cm}
\chemsetup[orbital]{
overlay,
@@ -974,8 +1035,8 @@ Additionally there are two keys, with which the \TikZ behaviour can be changed.\
\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]
+\end{beispiel}
+\begin{beispiel}
\vspace{2cm}\hspace{2cm}
\setbondoffset{0pt}
\chemsetup[orbital]{
@@ -987,32 +1048,57 @@ Additionally there are two keys, with which the \TikZ behaviour can be changed.\
}
\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}
+\end{beispiel}
+\secidx*{Orbitals}
-\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>}}.
+\section{\chemformula support}
+\chemformula and \chemmacros are designed to work together closely. This is not perfect, though. There are even some restrictions. If you want to avoid them simply use \key[option]{method}{mhchem} and forget about this section and the next part.
+\begin{description}
+ \item You don't need to use \lstinline+\mch+ and related commands inside \cmd{ch}. Indeed, you shouldn't use them as they might mess with the subscript and superscript alignment. The \chemmacros option \texttt{circled} is obeyed by \cmd{ch}.
+\begin{beispiel}
+ \chemsetup[option]{circled=all}
+ \ch{H+ + OH- <=> H2O}
+\end{beispiel}
+ \item The commands \cmd{sld} and \cmd{lqd} don't have an optional argument inside \cmd{ch}.
+\begin{beispiel}
+ \ch{Ba^{2+}\aq{} + SO4^{2-}\aq{} -> BaSO4\sld{} v} \\
+ \ch{Ba^2+ \aq{} + SO4^2- \aq{} -> BaSO4\sld{} v}
+\end{beispiel}
+ \item The option \key[option]{synchronize} recognizes the format and font selections made for \chemformula.
+\end{description}
+\section{Key Overview}\label{sec:overview}\secidx{Option Overview (chemmacros)}
+In the table below all keys provided by \chemmacros for customization are listed. All keys that belong to a module can be set with
+\begin{description}
+ \item \cmd{chemsetup}[<module>]{<keyval>} or
+ \item \cmd{chemsetup}{<module>/<keyval>}.
+\end{description}
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}
+\small
+\begin{longtable}{>{\ttfamily\color{key}\hspace{5mm}}l>{\ttfamily\color{module}}l>{\ttfamily}l>{\ttfamily}ll}
\toprule
- \normalfont\bfseries key & \normalfont\bfseries module & \normalfont\bfseries values & \normalfont\bfseries default & \\
+ \normalfont\normalcolor\bfseries key & \normalfont\normalcolor\bfseries module & \normalfont\bfseries values & \normalfont\bfseries default & \\
\midrule
\endhead
\bottomrule
\endfoot
- \multicolumn{5}{l}{Paket-Optionen:} \\
+ \multicolumn{5}{l}{package options:} \\
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} \\
+ detect-bold & option & \uline{true}/false & false & page \pageref{key:option_detect-bold} \\
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} \\
+ ghs & option & \uline{true}/false & true & page \pageref{key:option_ghs} \\
+ method & option & \uline{chemformula}/formula & formula & page \pageref{key:option_method} \\
+ strict & option & \uline{true}/false & false & page \pageref{key:option_strict} \\
+ synchronize & option & \uline{true}/false & false & page \pageref{key:option_synchronize} \\
+ version & option & 1/2/bundle & bundle & 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} \\
+ elpair & particle & \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} \\
+ append & charges & \uline{true}/false & false & page \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} \\
@@ -1023,28 +1109,30 @@ Some keys can be set without value. Then the \uline{underlined} value is used.
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} \\
+ exponent & & <anything> & \cmd{standardstate} & page \pageref{key:none_exponent} \\
+ delta & & <anything>/false & & page \pageref{key:none_delta} \\
+ subscript & & left/right & & page \pageref{key:none_subscript} \\
+ unit & & <unit> & & page \pageref{key:none_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} \\
+ exponent & & <anything> & \cmd{standardstate} & page \pageref{key:none_exponent} \\
+ delta & & <anything>/false & & page \pageref{key:none_delta} \\
+ subscript & & <anything> & & page \pageref{key:none_subscript} \\
+ subscript-left & & true/false & & page \pageref{key:none_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} \\
+ exponent & state & <anything> & \cmd{standardstate} & page \pageref{key:state_exponent} \\
+ delta & state & <anything>/false & & page \pageref{key:state_delta} \\
+ subscript-left & state & 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} \\
+ star & & \uline{true}/false & false & page \pageref{key:none_star} \\
+ arg & & \uline{true}/false & false & page \pageref{key:none_arg} \\
+ list-name & reaction & <anything> & List of reactions & page \pageref{key:reaction_list-name} \\
+ list-entry & reaction & <anything> & Reaction & page \pageref{key:reaction_list-entry} \\
\multicolumn{5}{l}{\cmd{mhName}:} \\
align & mhName & <alignment> & \cmd{centering} & page \pageref{key:mhName_align} \\
- fontattr & mhName & <commands> & & page \pageref{key:mhName_fontattr} \\
+ format & mhName & <commands> & & page \pageref{key:mhName_format} \\
fontsize & mhName & <fontsize> & \cmd{tiny} & page \pageref{key:mhName_fontsize} \\
width & mhName & <dim> & & page \pageref{key:mhName_width} \\
\multicolumn{5}{l}{\cmd{newman}:} \\
@@ -1062,11 +1150,814 @@ Some keys can be set without value. Then the \uline{underlined} value is used.
overlay & orbital & \uline{true}/false & false & page \pageref{key:orbital_overlay} \\
opacity & ornital & <num> & 1 & page \pageref{key:orbital_opacity}
\end{longtable}
-\end{fullwidth}
+\normalsize\secidx*{Option Overview (chemmacros)}
+\secidx*{CHEMMACROS}
+
+\part{\texorpdfstring{\Chemformula}{chemformula}}\chemsetup[chemformula]{format=}\secidx{CHEMFORMULA}
+\section{Setup}
+All of \chemformula's options belong to the module \textcolor{module}{\texttt{chemformula}}. This means they can be setup with
+\begin{beispiel}[code only]
+ \chemsetup[chemformula]{<options>} or
+ \chemsetup{chemformula/<option1>,chemformula/<option2>}
+\end{beispiel}
+
+\section{The Basic Principle}
+\chemformula offers one main command.
+\begin{description}
+ \item\cmd{ch}[<options>]{<input>}
+\end{description}
+The usage will seem very familiar to you if you're familiar with \paket{mhchem}:
+\begin{beispiel}
+ \ch{H2O} \\
+ \ch{Sb2O3} \\
+ \ch{H+} \\
+ \ch{CrO4^2-} \\
+ \ch{AgCl2-} \\
+ \ch{[AgCl2]-} \\
+ \ch{Y^{99}+} \\
+ \ch{Y^{99+}} \\
+ \ch{H2_{(aq)}} \\
+ \ch{NO3-} \\
+ \ch{(NH4)2S} \\
+ \ch{^{227}_{90}Th+} \\
+ $V_{\ch{H2O}}$ \\
+ \ch{Ce^{IV}} \\
+ \ch{KCr(SO4)2 * 12 H2O}
+\end{beispiel}
+
+However, there are differences. The most notable one: \chemformula distinguishes between different types of input. These different parts \emph{have} to be seperated with blanks:
+\begin{description}
+ \item\cmd{ch}{part1 part2 part3 part4}
+\end{description}
+A blank in the input \emph{never} is a blank in the output. This role of the blank strictly holds and disregarding it can have unexpected results and even lead to errors.
+
+Another notable difference: \chemformula tries to avoid math mode whenever possible:
+\begin{beispiel}
+ \ch{A + B ->[a] C} \\
+ \ce{A + B ->[a] C}
+\end{beispiel}
+
+This means that \cmd{ch}{2H2O} is recognized as a \emph{single} part, which in this case is recognized as a compound.
+\begin{beispiel}
+ \ch{2H2O} \\
+ \ch{2 H2O}
+\end{beispiel}
+This also means, that a part cannot contain a blank since this will automatically divide it into two parts. If you need an extra blank in the output you need to use \lstinline+~+. However, since commands in most cases gobble a space after them a input like \cmd{ch}{\textbackslash command ABC} will be treated as a single part. If you want or need to divide them you need to add an empty group: \cmd{ch}{\textbackslash command\{\} ABC}. The different input types are described in the following sections.
+
+There are some options to customize the output of the \cmd{ch} command. They can either be applied locally using the optional argument or can be set globally using the setup command. All options of \chemformula belong to the module \textcolor{module}{\texttt{chemformula}}.
+\begin{description}
+ \item\cmd{chemsetup}[chemformula]{<options>}
+\end{description}
+
+\section{Stoichiometric Factors}\secidx{Stoichiometric Factors}
+A stoichiometric factor may only contain of numbers and the signs \lstinline+.,_/+
+\begin{beispiel}
+ \ch{2} \\
+ \ch{12}
+
+ % decimals:
+ \ch{3.5} \\
+ \ch{5,75}
+
+ % fractions:
+ \ch{3/2} \\
+ \ch{1_1/2}
+\end{beispiel}
-\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.
+You have to be a little bit careful with the right syntax but I believe it is rather intuitive.
+\begin{beispiel}[code only]
+ this won't work but will result in an error: \ch{1/1_1}
+\end{beispiel}
+
+There are a few possibilities to customize the output.
+\begin{description}
+ \item \key{decimal-marker}{<marker>} the symbol to indicate the decimal. Default = \texttt{.}
+ \item \key{frac-style}{math/xfrac/nicefrac} determines how fractions are displayed. Default = \texttt{math}
+ \item \key{stoich-space}{<dim>} The space that is placed after the stoichiometric factor. Default = \lstinline=.1667em=
+\end{description}
+\begin{beispiel}
+ \ch[decimal-marker={,}]{3.5} \ch[decimal-marker={$\cdot$}]{3,5}
+\end{beispiel}
+
+The option \key{frac-style}{xfrac} uses the \lstinline+\sfrac+ command of the \paket{xfrac} package. The output strongly depends on the font you use.\secidx[xfrac]{Stoichiometric Factors}
+\begin{beispiel}
+ \ch[frac-style=xfrac]{3/2} \ch[frac-style=xfrac]{1_1/2}
+\end{beispiel}
+\chemformula defines the instance \lstinline=formula-text-frac= which you can redefine to your needs. See the \paket{xfrac} documentation for further information. The default definition is this:
+\begin{beispiel}[code only]
+ \DeclareInstance{xfrac}{chemformula-text-frac}{text}
+ {
+ slash-left-kern = -.15em ,
+ slash-right-kern = -.15em
+ }
+\end{beispiel}
+This document uses the font Linux Libertine and the following definition:
+\begin{beispiel}[code only]
+ \DeclareInstance{xfrac}{chemformula-text-frac}{text}
+ {
+ scale-factor = 1 ,
+ denominator-bot-sep = -.2ex ,
+ denominator-format = \scriptsize #1 ,
+ numerator-top-sep = -.2ex ,
+ numerator-format = \scriptsize #1
+ }
+\end{beispiel}
+
+The option \key{frac-style}{nicefrac} uses the \lstinline+\nicefrac+ command of the \paket{nicefrac} package.\secidx[nicefrac]{Stoichiometric Factors}
+\begin{beispiel}
+ \ch[frac-style=nicefrac]{3/2} \ch[frac-style=nicefrac]{1_1/2}
+\end{beispiel}
+
+The option \key{stoich-space} allows you to customize the space between stoichiometric factor and the group following after it.\secidx[space]{Stoichiometric Factors}
+\begin{beispiel}
+ \ch{2 H2O} \\
+ \ch[stoich-space=.2em]{2 H2O}
+\end{beispiel}
+\secidx*{Stoichiometric Factors}
+
+\section{Compounds}\label{ssec:compounds}\secidx{Compounds}
+\chemformula determines compounds as the type that “doesn't fit in anywhere else”. This point will become more clear when you know what the other types are.
+\begin{beispiel}
+ \ch{H2SO4} \\
+ \ch{[Cu(NH3)4]^2+}
+\end{beispiel}
+
+\subsection{Adducts}\secidx[adducts]{Compounds}
+\chemformula has two identifiers which will create adducts.
+\begin{description}
+ \item \cmd{ch}{A.B}
+ \item \cmd{ch}{A*B}
+\end{description}
+\begin{beispiel}
+ \ch{CaSO4.H2O} \\
+ \ch{CaSO4*H2O}
+\end{beispiel}
+Since numbers in a compound always are treated as subscripts (see section \ref{ssec:subscripts}) you sometimes need to introduce stoichiometric factors for the right output:
+\begin{beispiel}
+ \ch{Na3PO4*12H2O} \\
+ \ch{Na3PO4* 12 H2O} \\
+ \ch{Na3PO4 * 12 H2O}
+\end{beispiel}
+
+\subsection{Subscripts}\label{ssec:subscripts}\secidx[subscripts]{Compounds}
+\emph{All} numbers in a compound are treated as subscripts.
+\begin{beispiel}
+ \ch{H2SO4}
+\end{beispiel}
+If you want a letter to be a subscript you can use the math syntax:
+\begin{beispiel}
+ \ch{A_nB_m}
+\end{beispiel}
+The subscript recognizes groups. You can also use math inside it.
+\begin{beispiel}
+ \ch{A_{$n$}B_{$m$}} \\
+ \ch{NaCl_{(aq)}}
+\end{beispiel}
+
+\subsection{Commands}\secidx[commands]{Compounds}
+Commands are allowed in a compound:
+\begin{beispiel}
+ \ch{\textbf{A2}B3} \ch{A2\color{red}B3}
+\end{beispiel}
+However, if the commands demand numbers as argument, \eg space commands or \paket{chemmacros}' \lstinline+\ox+ command the direct use will fail. This is because the numbers are treated as subscripts \emph{before} the command expands.
+\begin{beispiel}[code only]
+ \ch{A\hspace{2mm}B} will raise an error because \hspace sees something like this: \hspace{$_2$mm}.
+\end{beispiel}
+See section \ref{ssec:text} for a way around this.
+
+\subsection{Charges and Other Superscripts}\secidx[charges]{Compounds}\secidx[superscripts]{Compounds}
+If a compound \emph{ends} with a plus or minus sign it will be treated as charge sign and typeset as superscript. In other places a plus is treated as a triple bond and a dash will be used as a single bond, see section \ref{ssec:bonds}.
+\begin{beispiel}
+ \ch{A+B} \ch{AB+} \\
+ \ch{A-B} \ch{AB-}
+\end{beispiel}
+
+For longer charge groups or other superscripts you can use the math syntax. It recognizes groups and you can use math inside them. Inside these groups neither \texttt{+} nor \texttt{-} are treated as bonds. If a dot \texttt{.} is inside a superscript it is treated as indicator for a radical.
+\begin{beispiel}
+ \ch{A^{x-}} \\
+ \ch{A^x-} \\
+ \ch{A^{x}-} \\
+ \ch{A^{$x-$}} \\
+ \ch{RNO2^{-.}} \\
+ \ch{^31H} \\
+ \ch{^{14}6C} \\
+ \ch{^{58}_{26}Fe}
+\end{beispiel}
+
+Ions and ion composites with more than one charge can be typeset quite as easy:
+\begin{beispiel}
+ \ch{SO4^2-} \ch{Ca^2+ SO4^2-}
+\end{beispiel}
+
+\subsection{Bonds}\label{ssec:bonds}\secidx[bonds]{Compounds}
+There are three kinds of bonds:
+\begin{beispiel}
+ single: \ch{CH3-CH3} \\
+ double: \ch{CH2=CH2} \\
+ triple: \ch{CH+CH}
+\end{beispiel}
+
+\subsection{Customization}\secidx[customization]{Compounds}
+These options allow you to customize the ouptut of the compounds:
+\begin{description}
+ \item \key{subscript-vshift}{<dim>} Extra vertical shift of the subscripts. Default = \texttt{0pt}
+ \item \key{subscript-style}{text/math} Style that is use to typeset the subscripts. Default = \texttt{text}
+ \item \key{charge-hshift}{<dim>} Shift of superscripts when following a subscript. Default = \texttt{.3ex}
+ \item \key{charge-style}{text/math} Style that is use to typeset the superscripts. Default = \texttt{text}
+ \item \key{adduct-space}{<dim>} Space to the left and the right of the adduct point. Default = \lstinline+.1333em+
+ \item \key{bond-length}{<dim>} The length of the bonds. Default is the length of an endash as measured by \lstinline+\settowidth{<len>}{\textendash}+.
+\end{description}
+Maybe you have noticed that charges of certain ions are a little bit shifted to the right:\secidx[charges!shift]{Compounds}
+\begin{beispiel}
+ \ch{SO4^2-} \ch{NH4+} \ch{Na+}
+\end{beispiel}
+They are shifted if they \emph{follow} a subscript. The amount of the shift can be set with the option \key{charge-hshift}.
+\begin{beispiel}
+ \chemsetup[chemformula]{charge-hshift=0pt}
+ \ch{SO4^2-} \ch{NH4+} \ch{Na+} \\
+ \chemsetup[chemformula]{charge-hshift=1ex}
+ \ch{SO4^2-} \ch{NH4+} \ch{Na+}
+\end{beispiel}
+
+If you don't want the charges to be typeset in text mode you can switch to math mode:
+\begin{beispiel}
+ \ch{M^x+} \ch{SO4^2-} \\
+ \chemsetup[chemformula]{charge-style = math}
+ \ch{M^x+} \ch{SO4^2-}
+\end{beispiel}
+
+The option \key{subscript-vshift} can be used to adjust the vertical shift of the subscripts:\secidx[subscripts!shift]{Compounds}
+\begin{beispiel}
+ \ch{H2SO4} \ch{Na3PO4} \\
+ \chemsetup[chemformula]{subscript-vshift=.5ex}
+ \ch{H2SO4} \ch{Na3PO4} \\
+ \chemsetup[chemformula]{subscript-vshift=-.2ex}
+ \ch{H2SO4} \ch{Na3PO4}
+\end{beispiel}
+
+You can choose the mode subscripts are typeset in the same way as it is possible for the charges:
+\begin{beispiel}
+ \ch{A_nB_m} \ch{H2SO4} \\
+ \chemsetup[chemformula]{subscript-style = math}
+ \ch{A_nB_m} \ch{H2SO4}
+\end{beispiel}
+
+The option \key{adduct-space} sets the space left and right to the adduct symbol $\cdot$.
+\begin{beispiel}
+ \ch{Na3PO3*H2O} \\
+ \chemsetup[chemformula]{adduct-space=.2em}
+ \ch{Na3PO3*H2O}
+\end{beispiel}
+
+Changing the length of the bonds:\secidx[bonds!length]{Compounds}
+\begin{beispiel}
+ \chemsetup[chemformula]{bond-length=4mm}%
+ single: \ch{CH3-CH3} \\
+ double: \ch{CH2=CH2} \\
+ triple: \ch{CH+CH}
+\end{beispiel}
+\secidx*{Compounds}
+
+\section{Special Input Types}\secidx{Special Types}
+There are some “special type” input groups. These are groups which consist of only one token, namely of the following ones:
+\begin{description}
+ \item \cmd{ch}{ + } \ch{+} creates the plus sign between compounds with space around it:\\
+ \cmd{ch}{2 Na + Cl2} \ch{2 Na + Cl2}
+ \item \cmd{ch}{ v } \ch{v} sign for precipitate: \cmd{ch}{BaSO4 v} \ch{BaSO4 v}
+ \item \cmd{ch}{ \lstinline+^+ } \ch{^} sign for escaping gas\footnotemark: \cmd{ch}{\lstinline=H2 ^=} \ch{H2 ^}
+\end{description}
+\footnotetext{Is this the correct English term? Please correct me if it isn't.}
+
+The space left and right of the plus sign can be set with this option:
+\begin{description}
+ \item \key{plus-space}{<dim>} Default = \lstinline+.3em+
+\end{description}
+\begin{beispiel}
+ \ch{A + B}\\
+ \ch[plus-space=4pt]{A + B}
+\end{beispiel}
+\secidx*{Special Types}
+
+\section{Escaped Input}\secidx{Escaped Input}
+In some cases it may be desirable to prevent \chemformula from parsing the input. This can be done in two ways.
+\subsection{Text}\label{ssec:text}\secidx[text]{Escaped Input}
+If you put something between \lstinline+" "+ or \lstinline+' '+ then the input will be treated as normal text, except that spaces are not allowed and have to be input with \lstinline+~+.
+\begin{description}
+ \item \cmd{ch}{ "<escaped text>" }
+ \item \cmd{ch}{ '<escaped text>' }
+\end{description}
+\begin{beispiel}
+ \ch{"\ox{2,Ca}" O} \\
+ \ch{"\ldots\," Na + "\ldots\," Cl2 -> "\ldots\," NaCl} \\
+ \ch{'A~->~B'}
+\end{beispiel}
+In many cases you won't need to escape the input. But when you get into trouble when using a command inside \cmd{ch} try hiding it.
+
+\subsection{Math}\secidx[math]{Escaped Input}
+If you espacially want to input math you just enclose it with \lstinline+$ $+. This output is different from the escaped text as it is followed by a space.
+\begin{description}
+ \item \cmd{ch}{ \lstinline"$<escaped math>$" }
+\end{description}
+\begin{beispiel}
+ escaped text: \ch{"$x$" H2O} \\
+ escaped math: \ch{$x$ H2O} \\
+ \ch{$2n$ Na + $n$ Cl2 -> $2n$ NaCl}
+\end{beispiel}
+
+The space that is inserted after a math group can be edited:
+\begin{description}
+ \item \key{math-space}{<dim>} Default = \lstinline=.1667em=
+\end{description}
+\begin{beispiel}
+ \ch{$2n$ Na + $n$ Cl2 -> $2n$ NaCl} \\
+ \chemsetup[chemformula]{math-space=.2em}
+ \ch{$2n$ Na + $n$ Cl2 -> $2n$ NaCl} \\
+ \ch{$A->B$}
+\end{beispiel}
+\secidx*{Escaped Input}
+
+\section{Arrows}\label{sec:arrows}\secidx{Arrows}
+\subsection{Arrow types}\secidx[types]{Arrows}
+Arrows are input in the same intuitive way they are with \paket{mhchem}. There are six different types:
+\begin{description}
+ \item \cmd{ch}{ -> } \ch{->} standard right arrow
+ \item \cmd{ch}{ <- } \ch{<-} standard left arrow
+ \item \cmd{ch}{ <-> } \ch{<->} mesomeric arrow
+ \item \cmd{ch}{ <=> } \ch{<=>} equilibrium arrow
+ \item \cmd{ch}{ \lstinline+<=>>+ } \ch{<=>>} unbalanced equilibrium arrow to the right
+ \item \cmd{ch}{ \lstinline+<<=>+ } \ch{<<=>} unbalanced equilibrium arrow to the left
+\end{description}
+All these arrows are drawn with \TikZ.
+\begin{beispiel}
+ \ch{H2 + Cl2 -> 2 HCl} \\
+ \ch{H2O + CO3^2- <=> OH- + HCO3-} \\
+ \ch{A <- B} \\
+ \ch{\{[CH2=CH-CH2]- <-> [CH2-CH=CH2]- \}} \\
+ \ch{H+ + OH- <=>> H2O} \\
+ \ch{2 NO2 <<=> N2O4}
+\end{beispiel}
+
+\subsection{Labels}\secidx[labels]{Arrows}
+The arrows take two optional arguments to label them.
+\begin{description}
+ \item\cmd{ch}{ ->[<above>][<below>] }
+\end{description}
+\begin{beispiel}
+ \ch{A ->[a] B} \\
+ \ch{A ->[a][b] B} \\
+ \ch{A ->[\SI{100}{\celsius}] B}
+\end{beispiel}
+The label text can be parsed seperately from the arrow. The recipe is easy: leave blanks.
+\begin{beispiel}
+ \ch{A ->[H2O] B} \\
+ \ch{A ->[ H2O ] B} \\
+ \ch{A ->[ "\ox{2,Ca}" F2 ] B} \\
+ \ch{A ->[$\Delta$,~ [H+ ] ] B}
+\end{beispiel}
+If you leave the blanks \chemformula treats the groups inside the square brackets as seperated input types. The arrow reads its arguments \emph{afterwards}. As you can see the arrows “grow” with the length of the labels. What stays constant is the part that protrudes the labels.
+\begin{beispiel}
+ \ch{A ->[a] B} \\
+ \ch{A ->[ab] B} \\
+ \ch{A ->[abc] B} \\
+ \ch{A ->[abc~abc] B} \\
+ % needs the `chemfig' package:
+ \setatomsep{15pt}
+ \ch{A ->[ "\chemfig{-[:30]-[:-30]OH}" ] B}
+\end{beispiel}
+
+\subsection{Customization}\secidx[customization]{Arrows}
+These are the options which enable you to customize the arrows:
+\begin{description}
+ \item \key{arrow-offset}{<dim>} This is the length that an arrow protrudes a label on both sides. This means an empty arrow's length is two times \texttt{arrow-offset}. Default = \texttt{1.5ex}
+ \item \key{arrow-yshift}{<dim>} Shifts an arrow up (positive value) or down (negative value). Default = \texttt{0pt}
+ \item \key{arrow-ratio}{<factor>} The ratio of the arrow lengths of the unbalanced equilibrium. \texttt{.4} would mean that the length of the shorter arrow is $0.4\times$ the length of the longer arrow. Default = \texttt{.6}
+ \item \key{arrow-tips}{<type>} This specifies the arrow tips. In principle all of \TikZ' arrows could be used. However, this option requires \texttt{<type>} to be an arrow tip itself \emph{and} to have a \texttt{left <type>} and \texttt{right <type>} to be defined. This means if you don't define any arrow tips yourself you can only choose between \texttt{cf} and \texttt{to}. Default = \texttt{cf}
+ \item \key{arrow-style}{<tikz>} \TikZ keys for free customization of the arrows.
+ \item \key{compound-sep}{<dim>} The space between compounds and the arrows. Default = \texttt{1ex}
+ \item \key{label-offset}{<dim>} The space between the labels and the arrows. Default = \texttt{2pt}
+ \item \key{label-style}{<font command>} The relative font size of the labels. Default = \lstinline+\footnotesize+
+\end{description}
+
+The following code shows the effect of the different options on the \lstinline+<=>>+ arrow:
+\begin{beispiel}
+ standard: \ch{A <=>>[x][y] B} \\
+ longer: \ch[arrow-offset=12pt]{A <=>>[x][y] B} \\
+ higher: \ch[arrow-yshift=2pt]{A <=>>[x][y] B} \\
+ more balanced: \ch[arrow-ratio=.8]{A <=>>[x][y] B} \\
+ other arrow tips: \ch[arrow-tips=to]{A <=>>[x][y] B} \\
+ labels further away: \ch[label-offset=4pt]{A <=>>[x][y] B} \\
+ larger distance to compounds: \ch[compound-sep=2ex]{A <=>>[x][y] B} \\
+ other TikZ: \ch[arrow-style={thick,red}]{A <=>>[x][y] B} \\
+ smaller labels: \ch[label-style=\tiny]{A <=>[x][y] B}
+\end{beispiel}
+
+If you define own pgfarrows\footnote{See the pgfmanual for details.} or the suiting aliases so that you have the arrow tips \texttt{<type>}, \texttt{left <type>} and \texttt{right <type>} available you can use them with the option \key{arrow-tips}:
+\begin{beispiel}
+ % `left hook' and `right hook' are already defined in the tikzlibrary `arrows'
+ \pgfarrowsdeclarealias{hook}{hook}{hooks}{hooks}%
+ % `left hook reversed' and `right hook reversed' are already defined in the tikzlibrary `arrows'
+ \pgfarrowsdeclarealias{hook reversed}{hook reversed}{hooks reversed}{hooks reversed}%
+ \ch[arrow-tips=hook]{A -> B <=> C} \\
+ \ch[arrow-tips=hook reversed]{A -> B <=> C}
+\end{beispiel}
+\secidx*{Arrows}
+
+\section{Names}\secidx{Names}
+\subsection{Syntax}\secidx[syntax]{Names}
+\chemformula has a built-in syntax to write text under a compound. In a way it works very similar to the arrows.
+\begin{description}
+ \item\cmd{ch}{ !(<name>)( <formula> ) }
+\end{description}
+If an exclamation mark is followed by a pair of parentheses \chemformula will parse it this way:
+\begin{beispiel}
+ \ch{!(ethanol)( CH2CH2OH )}
+\end{beispiel}
+The same what's true for the arrows arguments holds for these arguments: if you leave blanks the different parts will be treated according to their input type before the text is set below the formula.
+\begin{beispiel}
+ \ch{!(water)(H2O)} \quad
+ \ch{!( "\textcolor{blue}{water}" )( H2O )} \quad
+ \ch{!( $2n-1$ )( H2O )} \quad
+ \ch{!( H2O )( H2O )} \quad
+ \ch{!(oxonium)( H3O+ )}
+\end{beispiel}
+If for some reason you want to insert an exclamation mark \emph{without} it creating a name you only have to make sure it isn't followed by parentheses.
+\begin{beispiel}
+ \ch{H2O~(!)} \\
+ \ch{A!{}()}
+\end{beispiel}
+
+\subsection{Customization}\secidx[customization]{Names}
+\chemformula provides two options to customize the output of the names:
+\begin{description}
+ \item \key{name-format}{<commands>} The format of the name. This can be arbitrary input. Default = \lstinline+\scriptsize\centering+
+ \item \key{name-width}{<dim>/auto} The width of the box where the label is put into. \texttt{auto} will detect the width of the name and set the box to this width. Default = \texttt{auto}
+\end{description}
+\begin{beispiel}
+ \ch{!(acid)( H2SO4 ) -> B} \\
+ \ch[name-format=\sffamily\small]{!(acid)( H2SO4 ) -> B} \\
+ \ch[name-format=\scriptsize N:~]{!(acid)( H2SO4 ) -> B} \\
+ \ch[name-width=3em,name-format=\scriptsize\raggedright]{!(acid)( H2SO4 ) -> B}
+\end{beispiel}
+\secidx*{Names}
+
+\section{Format and Font}\secidx{Format and Font}
+In the standard setting \chemformula doesn't make any default changes to the font of the formula output. Let's take a look at a nonsense input which shows all features:
+\begin{beispiel}
+ \newcommand*\sample{\ch{H2C-C+C-CH=CH+ + CrO4^2- <=>[x][y] 2.5 Cl^{-.} + 3_1/2 Na*OH_{(aq)} + !(name)( A^n ) "\LaTeXe"}}
+ \sample
+\end{beispiel}
+\newcommand*\sample{\ch{H2C-C+C-CH=CH+ + CrO4^2- <=>[x][y] 2.5 Cl^{-.} + 3_1/2 Na*OH_{(aq)} + !(name)( A^n ) "\LaTeXe"}}
+Now we're going to change different aspects of the font a look what happens:
+\begin{beispiel}[below]
+ \sffamily Hallo \sample \\
+ \ttfamily Hallo \sample \normalfont \\
+ \bfseries Hallo \sample \normalfont \\
+ \itshape Hallo \sample
+\end{beispiel}
+As you can see most features adapt to the surrounding font.
+
+If you want to change the default format you need to use this option:
+\begin{description}
+ \item \key{format}{<anything>} Adds arbitrary code before the output of \cmd{ch}.
+\end{description}
+\begin{beispiel}
+ \definecolor{newblue}{rgb}{.1,.1,.5}\chemsetup[chemformula]{format=\color{newblue}\sffamily}
+ \sffamily Hallo \sample \\
+ \ttfamily Hallo \sample \normalfont \\
+ \bfseries Hallo \sample \normalfont \\
+ \itshape Hallo \sample
+\end{beispiel}
+
+You can also specifically change the fontfamily, fontseries and fontshape of the output.
+\begin{description}
+ \item \key{font-family}{<family>} Changes the fontfamily of the output with \lstinline+\fontfamily{<family>}\selectfont+.
+ \item \key{font-series}{<series>} Changes the fontseries of the output with \lstinline+\fontseries{<series>}\selectfont+.
+ \item \key{font-shape}{<shape>} Changes the fontshape of the output with \lstinline+\fontshape{<shape>}\selectfont+.
+\end{description}
+\begin{beispiel}
+ \chemsetup[chemformula]{font-series=bx}
+ Hallo \sample \\
+ \sffamily Hallo \sample \normalfont \\
+ \chemsetup[chemformula]{font-family=lmr,font-series=m} Hallo \sample \normalfont \\
+ \itshape Hallo \sample
+\end{beispiel}
+
+If you're using \XeLaTeX\ or \LuaLaTeX\ and have loaded \paket{fontspec} you have the possibilty to set the font with it:
+\begin{description}
+ \item \key{font-spec}{\{<font>\}} or with options
+ \item \key{font-spec}{\{[<options>]<font>\}}
+\end{description}
+\begin{beispiel}
+ \chemsetup[chemformula]{font-spec={Linux Biolinum O}} \sample \\
+ \chemsetup[chemformula]{font-spec={[Color=darkgray]Augie}} \sample \\
+ \chemsetup[chemformula]{font-spec={Tipbrush Script}} \sample \\
+ \chemsetup[chemformula]{font-spec={Latin Modern Sans}} \sample \\
+ \bfseries \sample \normalfont \\
+ \chemsetup[chemformula]{font-spec={Feathergraphy Decoration}} \sample
+\end{beispiel}
+\secidx*{Format and Font}
+
+\section{Usage In Math Equations}\secidx{Math Environments}
+The \cmd{ch} command can be used inside math equations. It recognizes \lstinline+\\+ and \lstinline+&+ and passes them on. However, you can't use the optional arguments of \lstinline+\\+ inside \cmd{ch}.
+\begin{beispiel}
+ \begin{align}
+ \ch[arrow-tips=to]{
+ H2O & ->[a] H2SO4 \\
+ Cl2 & ->[x][y] CH4
+ }
+ \end{align}
+ \begin{align*}
+ \ch{
+ RNO2 &<=>[ + e- ] RNO2^{-.} \\
+ RNO2^{-.} &<=>[ + e- ] RNO2^2-
+ }
+ \end{align*}
+\end{beispiel}
+\secidx*{Math Environments}
+
+\section{Further Examples}
+This section just presents some examples of a possible usage.
+
+\begin{beispiel}
+ \begin{reaction}[Synthese von Alkanen]
+ !(Synthesegas)( $n$ CO + $(2n+1)$ H2 ) ->[\SI{200}{\celsius}][ [ CoNi ] ] C_{$n$}H_{$2n+2$} + $n$ H2O
+ \end{reaction}
+\end{beispiel}
+
+\begin{beispiel}
+ \begin{reactions*}
+ "a)" && CH4 + Cl2 &-> CH3Cl + HCl && "{\small Chlormethan/Methylchlorid}" \\
+ "b)" && CH3Cl + Cl2 &-> CH2Cl2 + HCl && "{\small Dichlormethan/Methylenchlorid}" \\
+ "c)" && CH2Cl2 + Cl2 &-> CHCl3 + HCl && "{\small Trichlormethan/Chloroform}" \\
+ "d)" && CHCl3 + Cl2 &-> CCl4 + HCl && "{\small Tetrachlormethan/Tetrachlorkohlenstoff}"
+ \end{reactions*}
+\end{beispiel}
+
+\begin{beispiel}
+ \chemsetup[ox]{parse=false}\ch{"\ox{\delm,C}" -{} "\ox{\delp,M}" \qquad ( <-> "\ox{\delp,C}" -{} "\ox{\delm,Br}" )} \\
+ \ch[adduct-space=0pt]{X. + .Y <=> X-Y + Bindungsenergie} \\
+ \ch[name-format=\normalsize]{!(\State{H}{f}\qquad)() !(\textcolor{red}{??})( CH4\gas{} ) + !(\num{0})( 2 O2\gas{} ) -> !(\num{-94.3})( CO2\gas{} ) + !(\num{-57.9})( H2O\lqd{} ) + !(\num{-192.1})( "\State{H}" )}
+\end{beispiel}
+
+\begin{beispiel}
+ \begin{reactions*}
+ CH3MgBr + "\ox*{1,Cu}" X &-> "\glqq" CH3 "\ox*{1,Cu}\grqq" + MgBrX "\qquad X~$=$~Br,I,CN" \\
+ 2 MeLi + CuI &-> !(Dimethylcuprat~(Gilmann-Cuprat))( Me2CuLi ) + Li
+ \end{reactions*}
+\end{beispiel}
+
+\begin{beispiel}
+ % needs `chemfig'
+ \begin{reactions*}
+ H3C-CH3 + Cl2 &->[$\Delta$][$h\nu$] H3CCH2Cl + HCl & &"\Enthalpy{-27.1}" \\
+ H3C-CH3 + "\Lewis{0.,Cl}" &-> H3CCH2 "\Lewis{0.,\vphantom{H}}" + HCl & &"\Enthalpy{-5.0}" \\
+ H3C-CH2 "\Lewis{0.,\vphantom{H}}" + Cl2 &-> H3CCH2Cl + "\Lewis{0.,Cl}" & &"\Enthalpy{-23.0}"
+ \end{reactions*}
+\end{beispiel}
+\secidx*{CHEMFORMULA}
+
+\part{\texorpdfstring{\Ghsystem}{ghsystem}}\secidx{GHSYSTEM}
+\section{Setup}
+All of \ghsystem' options belong to the module \textcolor{module}{\texttt{ghsystem}}. This means they can be setup with
+\begin{beispiel}[code only]
+ \chemsetup[ghsystem]{<options>} or
+ \chemsetup{ghsystem/<option1>,ghsystem/<option2>}
+\end{beispiel}
+
+\section{Get Hazard and Precautionary Statements}\secidx{Hazard and Precautionary Statements}
+\subsection{Simple Statements}\secidx[get statements]{GHSYSTEM}
+The general usage is simple: you use the command
+\begin{description}
+ \item\cmd{ghs}[<options>]{<type>}{<number>}
+ \item\cmd[ghsa]{ghs*}[<options>]{<type>}{<number>}
+\end{description}
+There are three types available: \texttt{h}, \texttt{euh} and \texttt{p}. The \ma{<type>} argument is case insensitive, so just type them in as you like.
+\begin{beispiel}
+ \ghs{h}{200} \\
+ \ghs{H}{224} \\
+ \ghs{euh}{001} \\
+ \ghs{Euh}{202} \\
+ \ghs{p}{201}
+\end{beispiel}
+
+The starred version hides the identifier and only gives the statement. If you want to hide the statement itself instead you can use the option:
+\begin{description}
+ \item\key{hide}{\uline{true}/false}
+\end{description}
+
+There is an option to customize the output, too.
+\begin{description}
+ \item\key{space}{<space command>} Space between \texttt{<type>} and \texttt{<number>}.
+\end{description}
+\begin{beispiel}
+ \ghs{h}{200} \\
+ \ghs[space=\,]{h}{200} \\
+ \ghs*{h}{200} \\
+ \ghs[hide]{h}{200}
+\end{beispiel}
+
+\subsection{Statements with Placeholders}\secidx[statements with placeholders]{GHSYSTEM}
+Some of the statements contain placeholders. They can be one of the following:
+\begin{itemize}
+ \item \textit{\textless state route of exposure if it is conclusively proven that no other routes of exposure cause the hazard\textgreater}
+ \item \textit{\textless state specific effect if known\textgreater}
+ \item \textit{\textless or state all organs affected, if known\textgreater}
+ \item \textit{\textless name of sensitising substance\textgreater}
+\end{itemize}
+
+Except the last one which needs to be filled in, they are hidden per default. They can be made visible with the option
+\begin{description}
+ \item\key{fill-in}{\uline{true}/false} Show placeholders. Default = \texttt{false}
+\end{description}
+\begin{beispiel}[below]
+ \ghs{h}{340} \\
+ \ghs[fill-in]{h}{340} \\
+ \ghs{h}{360} \\
+ \ghs[fill-in]{h}{360} \\
+ \ghs{h}{370} \\
+ \ghs[fill-in]{h}{370} \\
+ \ghs{euh}{208} \\
+ \ghs[fill-in]{euh}{208}
+\end{beispiel}
+
+These placeholders can be replaced with one of these options:
+\begin{description}
+ \item\key{exposure}{<text>} exposure placeholder
+ \item\key{effect}{<text>} effect placeholder
+ \item\key{organs}{<text>} organ placeholder
+ \item\key{substance}{<text>} substance placeholder
+\end{description}
+\begin{beispiel}
+ \ghs[exposure=This is how you get exposed.]{h}{340} \\
+ \ghs[effect=These are the effects.]{h}{360} \\
+ \ghs[organs=to this organ]{h}{370} \\
+ \ghs[substance=substance]{euh}{208}
+\end{beispiel}
+
+\subsection{Statements with Gaps}\secidx[statements with gaps]{GHSYSTEM}
+Some of the statements have gaps that can be filled.
+\begin{beispiel}
+ \ghs{p}{301} \\
+ \ghs{p}{401} \\
+ \ghs{p}{411} \\
+ \ghs{p}{413}
+\end{beispiel}
+
+These gaps can be filled using these options:
+\begin{description}
+ \item\key{text}{<text>}
+ \item\key{dots}{<text>}
+ \item\key{C-temperature}{<num>}
+ \item\key{F-temperature}{<num>}
+ \item\key{kg-mass}{<num>}
+ \item\key{lbs-mass}{<num>}
+\end{description}
+\begin{beispiel}
+ \ghs[dots=contact physician!]{p}{301} \\
+ \ghs[text=here]{p}{401} \\
+ \ghs[C-temperature=50, F-temperature=122]{p}{411} \\
+ \ghs[kg-mass=5.0, lbs-mass=11, C-temperature=50, F-temperature=122]{p}{413}
+\end{beispiel}
+
+\subsection{Combined Statements}\secidx[combined statements]{GHSYSTEM}
+There are some combinations of statements. They are input with a \texttt{+} between the numbers:
+\begin{beispiel}[below]
+ \ghs{p}{235+410} \\
+ \ghs{p}{301+330+331}
+\end{beispiel}
+
+Note that you can only get combinations that officially exist. \emph{You can't combine freely}.
+\secidx*{Hazard and Precautionary Statements}
+
+\section{Pictograms}\secidx{Pictograms}
+\subsection{The Pictures}
+The GHS defines a number of pictograms:
+
+\ghspic{explos} \ghspic{flame} \ghspic{flame-O} \ghspic{bottle} \ghspic{acid} \ghspic{skull} \ghspic{exclam} \ghspic{health} \ghspic{aqpol}
+
+The command
+\begin{description}
+ \item\cmd{ghspic}[<options>]{<name>}
+\end{description}
+loads them. \ref{tab:ghs_pictograms} shows all available pictograms and their names.
+\begin{beispiel}
+ \ghspic{skull}
+\end{beispiel}
+
+If you don't like the default size you can change it using this option:
+\begin{description}
+ \item\key{scale}{<factor>} Scales the pictogram. Default = \texttt{1}
+\end{description}
+The pictures are actually quite large. The default setting scales them by a factor of $\frac{1}{20}$.
+\begin{beispiel}
+ \ghspic[scale=2]{skull}
+\end{beispiel}
+
+If you want to use some specific \lstinline=\includegraphics= options, \eg if you want to rotate the pictogram for soma reason, use this option:
+\begin{description}
+ \item\key{includegraphics}{\{<includegraphics keyvals>\}}
+\end{description}
+\begin{beispiel}
+ \ghspic[includegraphics={angle=90}]{skull}
+\end{beispiel}
+
+\begin{longtable}{>{\ttfamily}ll>{\ttfamily}ll}
+ \caption{All available GHS pictograms.\label{tab:ghs_pictograms}} \\
+ \toprule
+ \normalfont\bfseries name & \bfseries pictogram & \normalfont\bfseries name & \bfseries pictogram \\
+ \midrule\endfirsthead
+ \toprule
+ \normalfont\bfseries name & \bfseries pictogram & \normalfont\bfseries name & \bfseries pictogram \\
+ \midrule\endhead
+ \bottomrule\endfoot
+ explos & \ghspic{explos} & explos-1 & \ghspic{explos-1} \\
+ explos-2 & \ghspic{explos-2} & explos-3 & \ghspic{explos-3} \\
+ explos-4 & \ghspic{explos-4} & explos-5 & \ghspic{explos-5} \\
+ explos-6 & \ghspic{explos-6} & & \\
+ flame & \ghspic{flame} & flame-2-white & \ghspic{flame-2-white} \\
+ flame-2-black & \ghspic{flame-2-black} & flame-3-white & \ghspic{flame-3-white} \\
+ flame-3-black & \ghspic{flame-3-black} & flame-4-1 & \ghspic{flame-4-1} \\
+ flame-4-2 & \ghspic{flame-4-2} & flame-4-3-white & \ghspic{flame-4-3-white} \\
+ flame-4-3-black & \ghspic{flame-4-3-black} & flame-5-2-white & \ghspic{flame-5-2-white} \\
+ flame-5-2-black & \ghspic{flame-5-2-black} & & \\
+ flame-O & \ghspic{flame-O} & flame-O-5-1 & \ghspic{flame-O-5-1} \\
+ bottle & \ghspic{bottle} & bottle-2-black & \ghspic{bottle-2-white} \\
+ bottle-2-white & \ghspic{bottle-2-black} & & \\
+ acid & \ghspic{acid} & acid-8 & \ghspic{acid-8} \\
+ skull & \ghspic{skull} & skull-2 & \ghspic{skull-2} \\
+ skull-6 & \ghspic{skull-6} & & \\
+ exclam & \ghspic{exclam} & & \\
+ health & \ghspic{health} & & \\
+ aqpol & \ghspic{aqpol} & & \\
+\end{longtable}
+
+\subsection{Picture Type Depending on Engine}
+As you probably know you can't use every picture type with every compiler engine. \pdfTeX\ in \textsc{dvi} mode \emph{needs} \texttt{eps} pictures while \pdfTeX\ in \textsc{pdf} mode, \XeTeX\ and \LuaTeX\ convert \texttt{eps} pictures into \texttt{pdf} files, given they have the rights to write in the directory the pictures are saved in.
+
+However, the latter can include \texttt{jpg} and \texttt{png} without any problems, while \pdfTeX\ in \textsc{dvi} mode can't.
+
+To resolve this \ghsystem tests which engine is used and if \pdfTeX\ which mode is used and then chooses either \texttt{eps} or \texttt{png} for the pictograms. You are free to choose the picture type yourself with the option
+\begin{description}
+ \item\key{pic-type}{eps/jpg/png}
+\end{description}
+\secidx*{Pictograms}
+
+\section{Available Languages}
+Right now the H and P statements are only available in English or German. The package adapts the package option \key[option]{german} but does not (yet) recognize language settings by \paket{babel} or \paket{polyglossia}.
+
+You can also choose the language explicitly.
+\begin{description}
+ \item\key{language}{english/german}
+\end{description}
+\begin{beispiel}
+ \ghs{h}{201}
+
+ \chemsetup[ghsystem]{language=german}
+ \ghs{h}{201}
+\end{beispiel}
+
+I will add other languages some time in future. This may take a while, though. If you would be willing to contribute and write the statements of another language please feel free to contact me\footnote{\href{mailto:contac@mychemistry.eu}{contact@mychemistry.eu}}. I would provide you with a template file, a \texttt{pdf} containing the official translations, and help to all your questions.
+
+\section{List of All Statements}\secidx{List of All Statements}
+If for some reason you want to list all sentences you can use
+\begin{description}
+ \item\cmd{ghslistall}[<options>]
+\end{description}
+
+This command has a number of options to customize the table, which is created with the \lstinline=longtable= environment of the \paket{longtable} package.
+\begin{description}
+ \item\key{table-head-number}{<text>} Default = \texttt{Identifier}
+ \item\key{table-head-text}{<text>} Default = \texttt{Statement}
+ \item\key{table-next-page}{<text>} Default = \texttt{continues on next page}
+ \item\key{table-caption}{<text>} As \texttt{<text>} in \lstinline=\caption{<text>}=. Default = \texttt{All H, EUH, and P Statements.}
+ \item\key{table-caption-short}{<text>} As \texttt{<short>} in \lstinline=\caption[<short>]{<text>}=.
+ \item\key{table-label}{<text>} The label to refer to the table with \lstinline=\ref= and similar commands. Default = \texttt{tab:ghs-hp-statements}
+ \item\key{table-row-sep}{<dim>} The separation of the table rows. A \TeX\ dimension. Default = \texttt{3pt}
+ \item\key{table-rules}{\uline{default}/booktabs/none} The style of the horizontal rules in the table. \texttt{default} uses \lstinline=\hline=, \texttt{booktabs} uses \lstinline=\toprule=, \lstinline=\midrule= or \lstinline=\bottomrule=, resp. This option needs the \paket{booktabs} package which you have to load yourself then. Default = \texttt{default}
+ \item\key{table-top-head-rule}{\uline{default}/booktabs/none} Change top rule explicitly. Default = \texttt{default}
+ \item\key{table-head-rule}{\uline{default}/booktabs/none} Change rule below head explicitly. Default = \texttt{default}
+ \item\key{table-foot-rule}{\uline{default}/booktabs/none} Change foot rule explicitly. Default = \texttt{default}
+ \item\key{table-last-foot-rule}{\uline{default}/booktabs/none} Change last foot rule explicitly. Default = \texttt{default}
+\end{description}
+
+The code below shows how \ref{tab:ghs-hp-statements} was created:
+\begin{beispiel}[code only]
+ \ghslistall[fill-in,table-rules=booktabs]
+\end{beispiel}
+
+\ghslistall[fill-in,table-rules=booktabs]
+\secidx*{List of All Statements}\secidx*{GHSYSTEM}
+
+\appendix
+\part{Appendix}\index{APPENDIX@\textbf{APPENDIX}}
+\section*{Suggestions and Bug Reports}\addcontentsline{toc}{section}{Suggestions and Bug Reports}
+Feedback on \chemmacros, \chemformula and \ghsystem is highly appreciated and welcome! If you have suggestions for macros, missing features \etc, please don't hesitate to contact me. If you recognize any errors, be it chemical ones, wrong documentation and the like, I'd be grateful about a short email\footnote{\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. You can also submit an issue on \url{https://bitbucket.org/cgnieder/chemmacros/} instead.
Many thanks to all the people, who already provided me with feedback!
+\printindex
+
+% \listoftodos
\end{document} \ No newline at end of file