%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % --------------------------------------------------------------------------- % % - the CHEMMACROS bundle - % % - chemmacros_doc_en.tex - % % - macros and commands for chemists - % % --------------------------------------------------------------------------- % % - Clemens Niederberger - % % - 2012/02/03 - % % --------------------------------------------------------------------------- % % - http://www.mychemistry.eu/ - % % - contact@mychemistry.eu - % % --------------------------------------------------------------------------- % % - If you have any ideas, questions, suggestions or bugs to report, please - % % - feel free to contact me. - % % --------------------------------------------------------------------------- % % - Copyright 2011-2012 Clemens Niederberger - % % - - % % - This work may be distributed and/or modified under the - % % - conditions of the LaTeX Project Public License, either version 1.3 - % % - of this license or (at your option) any later version. - % % - The latest version of this license is in - % % - http://www.latex-project.org/lppl.txt - % % - and version 1.3 or later is part of all distributions of LaTeX - % % - version 2005/12/01 or later. - % % - - % % - This work has the LPPL maintenance status `maintained'. - % % - - % % - The Current Maintainer of this work is Clemens Niederberger. - % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[DIV11,toc=index]{scrartcl} \usepackage{fontspec,xltxtra} \usepackage{polyglossia} \setmainlanguage{english} \usepackage[normalem]{ulem} \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} { scale-factor = 1 , denominator-bot-sep = -.2ex , denominator-format = \scriptsize #1 , numerator-top-sep = -.2ex , numerator-format = \scriptsize #1 } \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} } \newcommand*\chemmacros{{\scshape\textcolor{myblue}{chemmacros}}\xspace} \newcommand*\chemformula{{\scshape\textcolor{myblue}{chemformula}}\xspace} \newcommand*\ghsystem{{\scshape\textcolor{myblue}{ghsystem}}\xspace} \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{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. 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{Installation, Loading the Bundle}\secidx{Loading the Bundle}\secidx{Installation} The bundle comes with three style files\footnote{Those ending \texttt{sty}.}, a directory called \texttt{language/} containing the language-definition files for GHS (ending \texttt{def}), and a directory \texttt{pictures/} containing \texttt{eps}, \texttt{jpg} and \texttt{png} files (the GHS pictogramms). If you install the bundle manually \emph{please make sure to place the directories \texttt{language/} and \texttt{pictures/} in the \emph{same} directory as the style files}. 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*{Installation}\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 = , option2 = ]{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}). This option can only be chosen in the preamble. \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]{Nu}{\uline{chemmacros}/mathspec} The package \paket{mathspec} also defines a macro \cmd{Nu}. This option chooses which definition holds, see page \pageref{Nu}. (default = \texttt{chemmacros}). 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}\label{sec:setup}\secidx{Setup} Various of \chemmacros', \chemformula's and \ghsystem's 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}[]{ = } or \item \cmd{chemsetup}{/ = } \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{beispiel} Keys \emph{not} belonging to a module \emph{cannot} be used with \cmd{chemsetup}! All options of \chemformula belong to the module \textcolor{module}{\texttt{chemformula}} and all of \ghsystem's 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} \subsection{Predefined}\secidx[predefined]{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). The package \paket{mathspec} also defines a macro \cmd{Nu}. If you chose package option \key[option]{Nu}{mathspec} \chemmacros defines \cmd{Nuc} instead\label{Nu}. \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{description} \item \cmd{R}[]{} \end{description} \begin{beispiel} \R[+]{tert} \R[-]{sek} \R{prim} \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} \subsection{Own Particles}\secidx[own]{Particles, Ions and Symbols} If you like you can define your own particles using \begin{description} \item \cmd{DeclareParticle}{}\ma{} \end{description} Depending on the \key{method} you chose as option the \texttt{} will either be formula defined with \paket{mhchem} or with \chemformula. The particle defined this way behaves like the predefined ones with one exception: if you chose \key{method}{mhchem} the particle \emph{will not} obey the option \key{circled}. If you want formal charges with this method you need to use \chemmacros' commands (see section \ref{sec:ladungen}) explicitly. If you chose \key{method}{chemformula} the partictle \emph{will} obey the \key{circled} option. \begin{beispiel} \DeclareParticle{\Sod}{Na+} \DeclareParticle{\Pot}{K+} \Sod \Pot \chemsetup[option]{circled=all} \Sod \Pot \end{beispiel} The particles are only defined if the \texttt{} you chose is not already used by any other command. If it is already used \chemmacros will either give a warning or an error, depending on the option \key{strict}. \secidx*{Particles, Ions and Symbols} \section{Stereo Descriptors, Nomenclature, Latin Phrases}\label{sec:stereo} \subsection{IUPAC Names}\secidx{IUPAC Names} Similar to the \paket{bpchem} package \chemmacros provides a command\footnote{The idea and the implementation is shamelessly 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}{} 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}{} \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}[] \cmd{Rconf}: \Rconf \quad\cmd{Rconf}[]: \Rconf[] \item \cmd{Sconf}[] \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{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{beispiel} If \paket{chemstyle} hasn't been loaded, they're always in \textit{italics}. \secidx*{Latin Phrases} \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{}{}+ to add arbitrary units. \chemmacros uses that command to provide some units. Like all \paket{siunitx} units they're only valid inside \lstinline+\SI{}{}+ and \lstinline+\si{}+. \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}[] \cmd{pKa}: \pKa, \cmd{pKa}[1]: \pKa[1] \item \cmd{pKb}[] \cmd{pKb}: \pKb, \cmd{pKb}[1]: \pKb[1] \item \cmd{p}{} \eg \cmd{p}{\cmd{Kw}} \p{\Kw} \end{description} \begin{beispiel} \Ka \Kb \pKa \pKa[1] \pKb \pKb[1]\\ \chemsetup[option]{german=true} \Ka \Kb \pKa \pKa[1] \pKb \pKb[1] \end{beispiel} \secidx*{Acid/Base} \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{description} \item \cmd{pch}[] positive charge (\textbf{p}lus + \textbf{ch}arge) \item \cmd{mch}[] 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{beispiel} The same for formal charges: \begin{description} \item \cmd{fpch}[] positive charge \item \cmd{fmch}[] negative charge \end{description} \begin{beispiel} \fpch\ \fmch\ \fpch[3] \fmch[3] \end{beispiel} 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{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{beispiel} \secidx*{Ion Charges} \subsection{Oxidation Numbers}\label{ssec:oxidationszahlen}\secidx{Oxidation Numbers} Typesetting oxidation numbers: \begin{description} \item \cmd{ox}[]{,} places \texttt{} above \texttt{}; \texttt{} has to be a (rational) number! \end{description} \begin{beispiel} \ox{+1,Na}, \ox{2,Ca}, \ox{-2,S}, \ox{-1,F} \end{beispiel} 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{}. \item \key[ox]{roman}{\uline{true}/false} switches from roman to arabic numbers. \item \key[ox]{pos}{top/super/side}; \texttt{top} places \texttt{} above \texttt{}, \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{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{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}, \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{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{beispiel} \chemsetup{ option/circled = all, ox/parse = false } \ce{\ox{\delp,H}-\ox{\delm,Cl}} \hspace*{1cm} \chemfig{\chemabove[3pt]{\lewis{246,Br}}{\delm}-\chemabove[3pt]{H}{\delp}} \end{beispiel} The following macros are useful together with \paket{chemfig}, too. \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{beispiel} \secidx*{Partial Charges} \section{Reaction Mechanisms}\label{sec:mechanismen}\secidx{Reaction Mechanisms} With the command \begin{description} \item\cmd{mech}[] \end{description} one can specify the most common reaction mechanisms. \texttt{} can have one of the following values: \begin{itemize} \item\cmd{mech} (empty, no opt. argument) nucleophilic substitution \mech \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}\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}{,} \item \cmd{redox}(,)[][]{} \end{description} \cmd{OX} places \texttt{} into a node, which is named with \texttt{}. 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{beispiel} This line can be customized using \TikZ keys in \oa{}: \begin{beispiel}[ox] \OX{a,Na} $\rightarrow$ \OX{b,Na}\pch\redox(a,b)[->,red]{ox} \end{beispiel} With the argument \oa{} the length of the vertical parts of the line can be adjusted. The default length is \texttt{.6em}. This length is multiplied with \texttt{}. 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{beispiel} The default length of the vertical lines can be customized with the option \begin{description} \item \key[redox]{dist}{} 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{beispiel} Additionally the option \begin{description} \item\key[redox]{sep}{} 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{beispiel} Examples: \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{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{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{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}: \begin{description} \item \cmd{Enthalpy}[](){} \item \cmd{Entropy}[](){} \item \cmd{Gibbs}[](){} \end{description} Their usage is pretty much self-explaining: \begin{beispiel} \Enthalpy{123} \\ \Entropy{123} \\ \Gibbs{123} \end{beispiel} The argument \da{} 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}{} \item \key*{delta}{/false} \item \key*{subscript}{left/right} \item \key*{unit}{} \end{description} The default values depend on the command. \begin{beispiel} \Enthalpy[unit=\kilo\joule]{-285} \\ \Gibbs[delta=false]{0} \\ \Entropy[delta=\Delta,exponent=]{56.7} \end{beispiel} The unit is set corresponding to the rules of \paket{siunitx} and depends on its settings: \begin{beispiel} \Enthalpy{-1234.56e3} \\ \sisetup{per-mode=symbol,exponent-product=\cdot,output-decimal-marker={,},group-four-digits=true} \Enthalpy{-1234.56e3} \end{beispiel} \subsubsection{Create New Variables} You can use the command \begin{description} \item \cmd{setnewstate}[]{}{}\ma{} \end{description} to create new corresponding commands: \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]($\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. \begin{description} \item \key*{exponent}{} \item \key*{delta}{/false} \item \key*{subscript-left}{true/false} \item \key*{subscript}{} \end{description} \subsubsection{Redefine Variables} With \begin{description} \item \cmd{renewstate}[]{}{}\ma{} \end{description} you can redefine the already existing commands: \begin{beispiel} \renewstate{Enthalpy}{h}{\joule} \Enthalpy(f){12.5} \end{beispiel} The command is analogous to \cmd{setnewstate}, \ie it has the same keys. 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}% absolute \enthalpy{-12.3} \Enthalpy{-12.3} \end{beispiel} \subsection{State}\label{ssec:state} The commands presented in section \ref{ssec:siunitx} internally all use the command\footnote{Please note that \ma{} is an \emph{optional} argument.} \begin{description} \item \cmd{State}[]{}\ma{} \end{description} It can be used to write the thermodynamic variables without value and unit. Examples: \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: \begin{description} \item \key[state]{exponent}{} \item \key[state]{subscript-left}{true/false} \item \key[state]{delta}{/false} \end{description} \secidx*{Thermodynamics} \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}{,}\da{,}\oa{} \item \cmd{NMR*}{,}\da{,}\oa{} \end{description} \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{beispiel} With the first argument you can specify the kind of NMR: \begin{beispiel} \NMR{13,C} \end{beispiel} With the second argument the frequency (in \si{\mega\hertz}) can be specified: \begin{beispiel} \NMR(400) \end{beispiel} You also can change the unit: \begin{beispiel} \NMR(4e8,\hertz) \end{beispiel} Please note that the setup of \paket{siunitx} also has an impact on this command: \begin{beispiel} \sisetup{exponent-product=\cdot}\NMR(4e8,\hertz) \end{beispiel} And finally with the third argument the solvent can be specified: \begin{beispiel} \NMR[CDCl3] \end{beispiel} With the keys \begin{description} \item\key[nmr]{unit}{} Default = \lstinline=\mega\hertz= \item\key[nmr]{nucleus}{\ma{,}} Default = \ma{1,H} \end{description} the default unit and the default nucleus can be changed. Examples: \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{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}[]{}\ma{} \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}{} the alignment of the text in the box it is placed in, default = \lstinline+\centering+ \item \key[mhName]{format}{} the format of the text \item \key[mhName]{fontsize}{} the fontsize of the text, default = \lstinline+\tiny+ \item \key[mhName]{width}{/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{description} \item \env{reaction}{} \item \env{reactions}{} \end{description} \ldots and their starred versions for unnumbered reactions. \begin{description} \item \env{reaction*}{} \item \env{reactions*}{} \end{description} With them you can create (un)numbered reaction equations similar to mathematical equations. 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{beispiel} Reaction with counter: \begin{reaction} A -> B \end{reaction} \end{beispiel} \begin{beispiel} Reaction without counter: \begin{reaction*} C -> D \end{reaction*} \end{beispiel} \begin{beispiel} Several aligned reactions with counter: \begin{reactions} A &-> B + C \\ D + E &-> F \end{reactions} \end{beispiel} \begin{beispiel} Several aligned reactions without counter: \begin{reactions*} G &-> H + I \\ J + K &-> L \end{reactions*} \end{beispiel} If you want to change the layout of the counter tags, you can use \cmd{renewtagform}{}\oa{}\ma{}\ma{}\footnote{Provided by the \paket*{mathtools} package}. \begin{beispiel} \renewtagform{reaction}[R \textbf]{[}{]} \begin{reaction} H2O + CO2 <<=> H2CO3 \end{reaction} \end{beispiel} \subsection{Own Reactions} You can create new types of reactions with the command: \begin{description} \item \cmd{newreaction}[]{}\ma{} \end{description} \texttt{} will be the name of the new environment. \texttt{} is the used math environment. 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. 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} 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: \cmd{newreaction}[star,arg]{reactionsat}{alignat} With this the \texttt{reactionsat} environment is defined. \begin{beispiel} \newreaction[star,arg]{reactionsat}{alignat} \begin{reactionsat}{3} A &-> B &&-> C &&-> D \\ aaaaa &-> bbbbb &&-> ccccc &&-> ddddd \end{reactionsat} \begin{reactionsat*}{2} A &-> B & C &-> D \\ aaaaa &-> bbbbb &\quad{} ccccc &-> ddddd \end{reactionsat*} \end{beispiel} \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}{} Let's you set the name of the list manually. Default = \texttt{List of reactions} \item\key[reaction]{list-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}. 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}[] \sld \item \cmd{lqd}[] \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{beispiel} 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} \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{beispiel} 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}[f] is identical to \cmd{lqd}[f]. One can think of other uses, too: \begin{beispiel} C\sld[graphite] \end{beispiel} \secidx*{Phases} \section{Newman Projections}\label{sec:newman}\secidx{Newman Projections} \chemmacros provides the command \begin{description} \item \cmd{newman}[]\da{}\ma{<1>,<2>,<3>,<4>,<5>,<6>} \end{description} which allows you to create newman projections (uses \TikZ). With \texttt{} 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{beispiel} Several keys allow customization: \begin{description} \item \key[newman]{angle}{} default angle \item \key[newman]{scale}{} scale the whole projection \item \key[newman]{ring}{} customize the ring with \TikZ keys \item \key[newman]{atoms}{} customize the nodes within which the atoms are set \item \key[newman]{back-atoms}{} explicitly customize the back atoms \end{description} \begin{beispiel} \chemsetup[newman]{angle=45} \newman{} \newman[scale=.75,ring={draw=blue,fill=blue!20}]{} \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{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{beispiel} \secidx*{Newman Projections} \section{s, p, and Hybrid Orbitals}\label{sec:orbitale}\secidx{Orbitals} \chemmacros provides the following command to create orbitals: \begin{description} \item \cmd{orbital}[]{}: \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{beispiel} 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}{} changes the size of the orbital (all types) \item \key[orbital]{color}{} changes the color of the orbital (all types) \item \key[orbital]{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{beispiel} 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}{} the orbital becomes transparent; \texttt{} can have values between \texttt{1} (fully opaque) to \texttt{0} (invisible). \end{description} \begin{beispiel} \vspace{1cm}\hspace{1cm} \chemsetup[orbital]{ overlay, p/color = black!70 } \setbondoffset{0pt} \chemfig{?\orbital{p}-[,1.3]{\orbital[phase=-]{p}}-[:30,1.1]\orbital{p}-[:150,.9]{\orbital[phase=-]{p}}-[4,1.3]\orbital{p}-[:-150,1.1]{\orbital[phase=-]{p}}?} \vspace{1cm} \end{beispiel} \begin{beispiel} \vspace{2cm}\hspace{2cm} \setbondoffset{0pt} \chemsetup[orbital]{ overlay , opacity = .75 , p/scale = 1.6 , s/color = blue!50 , s/scale = 1.6 } \chemfig{\orbital{s}-[:-20]{\orbital[scale=2]{p}}{\orbital[half,angle=0]{p}}{\orbital[angle=170,half]{p}}{\orbital[angle=-150,half]{p}}(-[:-150]\orbital{s})-\orbital{s}} \vspace{2cm} \end{beispiel} \secidx*{Orbitals} \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}[]{} or \item \cmd{chemsetup}{/}. \end{description} Some keys can be set without value. Then the \uline{underlined} value is used. \small \begin{longtable}{>{\ttfamily\color{key}\hspace{5mm}}l>{\ttfamily\color{module}}l>{\ttfamily}l>{\ttfamily}ll} \toprule \normalfont\normalcolor\bfseries key & \normalfont\normalcolor\bfseries module & \normalfont\bfseries values & \normalfont\bfseries default & \\ \midrule \endhead \bottomrule \endfoot \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} \\ ghs & option & \uline{true}/false & true & page \pageref{key:option_ghs} \\ method & option & \uline{chemformula}/formula & formula & page \pageref{key:option_method} \\ Nu & option & \uline{chemmacros}/mathspec & chemmacros & page \pageref{key:option_Nu} \\ 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 & 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 & 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} \\ pos & ox & top/super/side & top & page \pageref{key:ox_pos} \\ explicit-sign & ox & \uline{true}/false & false & page \pageref{key:ox_explicit-sign} \\ decimal-marker & ox & comma/point & point & page \pageref{key:ox_decimal-marker} \\ \multicolumn{5}{l}{\cmd{OX}, \cmd{redox}:} \\ dist & redox & & .6em & page \pageref{key:redox_dist} \\ sep & redox & & .2em & page \pageref{key:redox_sep} \\ \multicolumn{5}{l}{\cmd{Enthalpy}, \cmd{Entropy}, \cmd{Gibbs}:} \\ exponent & & & \cmd{standardstate} & page \pageref{key:none_exponent} \\ delta & & /false & & page \pageref{key:none_delta} \\ subscript & & left/right & & page \pageref{key:none_subscript} \\ unit & & & & page \pageref{key:none_unit} \\ \multicolumn{5}{l}{\cmd{setnewstate}, \cmd{renewstate}:} \\ exponent & & & \cmd{standardstate} & page \pageref{key:none_exponent} \\ delta & & /false & & page \pageref{key:none_delta} \\ subscript & & & & page \pageref{key:none_subscript} \\ subscript-left & & true/false & & page \pageref{key:none_subscript-left} \\ \multicolumn{5}{l}{\cmd{State}:} \\ exponent & state & & \cmd{standardstate} & page \pageref{key:state_exponent} \\ delta & state & /false & & page \pageref{key:state_delta} \\ subscript-left & state & true/false & & page \pageref{key:state_subscript-left} \\ \multicolumn{5}{l}{\cmd{NMR}:} \\ unit & nmr & & \cmd{mega}\cmd{hertz} & page \pageref{key:nmr_unit} \\ nucleus & nmr & \{,\} & \{1,H\} & page \pageref{key:nmr_nucleus} \\ \multicolumn{5}{l}{\cmd{newreaction}:} \\ star & & \uline{true}/false & false & page \pageref{key:none_star} \\ arg & & \uline{true}/false & false & page \pageref{key:none_arg} \\ list-name & reaction & & List of reactions & page \pageref{key:reaction_list-name} \\ list-entry & reaction & & Reaction & page \pageref{key:reaction_list-entry} \\ \multicolumn{5}{l}{\cmd{mhName}:} \\ align & mhName & & \cmd{centering} & page \pageref{key:mhName_align} \\ format & mhName & & & page \pageref{key:mhName_format} \\ fontsize & mhName & & \cmd{tiny} & page \pageref{key:mhName_fontsize} \\ width & mhName & & & page \pageref{key:mhName_width} \\ \multicolumn{5}{l}{\cmd{newman}:} \\ angle & newman & & 0 & page \pageref{key:newman_angle} \\ scale & newman & & 1 & page \pageref{key:newman_scale} \\ ring & newman & & & page \pageref{key:newman_ring} \\ atoms & newman & & & page \pageref{key:newman_atoms} \\ back-atoms & newman & & & page \pageref{key:newman_back-atoms} \\ \multicolumn{5}{l}{\cmd{orbital} \ttfamily = s/p/sp/sp2/sp3:} \\ phase & orbital/ & \uline{+}/- & + & page \pageref{key:orbital_phase} \\ scale & orbital/ & & 1 & page \pageref{key:orbital_scale} \\ color & orbital/ & & black & page \pageref{key:orbital_color} \\ angle & orbital/ & & 90 & page \pageref{key:orbital_angle} \\ half & orbital/p & \uline{true}/false & false & page \pageref{key:orbital_half} \\ overlay & orbital & \uline{true}/false & false & page \pageref{key:orbital_overlay} \\ opacity & ornital & & 1 & page \pageref{key:orbital_opacity} \end{longtable} \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]{} or \chemsetup{chemformula/,chemformula/} \end{beispiel} \section{The Basic Principle} \chemformula offers one main command. \begin{description} \item\cmd{ch}[]{