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.tex177
1 files changed, 127 insertions, 50 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 1706a1f3d0c..56a2303fb32 100644
--- a/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex
+++ b/Master/texmf-dist/doc/latex/chemmacros/chemmacros_doc_en.tex
@@ -5,7 +5,7 @@
% - macros and commands for chemists - %
% --------------------------------------------------------------------------- %
% - Clemens Niederberger - %
-% - 2012/02/26 - %
+% - 2012/03/03 - %
% --------------------------------------------------------------------------- %
% - https://bitbucket.org/cgnieder/chemmacros/ - %
% - contact@mychemistry.eu - %
@@ -40,7 +40,7 @@
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage[normalem]{ulem}
-\usepackage{chemfig,chemstyle,upgreek,multicol,makeidx,booktabs,csquotes}
+\usepackage{chemfig,chemstyle,upgreek,textgreek,multicol,makeidx,booktabs,csquotes}
\usepackage{chemmacros}
\usepackage[version=3]{mhchem}
\usepackage[para]{footmisc}
@@ -73,10 +73,10 @@
\begin{filecontents}{\jobname.bib}
@book{iupac:greenbook,
author = {E. Richard Cohan and Tomislav Cvita\v{s} and Jeremy G. Frey and Bertil Holmström and Kozo Kuchitsu and Roberto Marquardt and Ian Mills and Franco Pavese and Martin Quack and Jürgan Stohner and Herbert L. Strauss and Michio Takami and Anders J Thor},
- title = {“Quantities, Symbols and Units in Physical Chemistry”, IUPAC Green Book},
+ title = {“Quantities, Symbols and Units in Physical Chemistry”, \IUPAC Green Book},
edition = {3rd Edition. 2nd Printing},
year = {2008},
- publisher = { IUPAC \&\ RSC Publishing, Cambridge}
+ publisher = { \IUPAC \&\ RSC Publishing, Cambridge}
}
@misc{eu:ghsystem_regulation,
author = {{The European Parliament and The Council of the European Union}},
@@ -173,7 +173,7 @@ The package \ghsystem needs the packages \chemmacros, \paket{tabu}, \paket{longt
\section{Motivation and Background}
\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. There have always been some difficulties intertwining it with \chemmacros, though. Also, some other 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. The challenge and the fun of creating a new package and the wish for a highly customizable alternative led to \chemformula.
+I would guess that nearly every chemist using \LaTeXe\ is aware of the great \paket{mhchem} package by Martin Hensel. There have always been some difficulties intertwining it with \chemmacros, though. Also, some other 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. The challenge and the fun of creating a new package and the wish for a highly customizable alternative led to \chemformula after all.
\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 possibilities to customize the output that \paket{mhchem} does not. Since \chemformula is meant as an \emph{alternative} to \paket{mhchem} \chemmacros offers a package option allowing you to choose which one of the two is used.
@@ -181,12 +181,21 @@ As a chemist you are probably aware of the fact that the \textsc{United Nations}
The package \ghsystem now enables you to typeset all the hazard and precautionary statements and pictograms in a very easy way. The statements are taken from EU regulation 1272/2008 \cite{eu:ghsystem_regulation}.
+There are four points I hope I have achieved with this bundle:
+\begin{itemize}
+ \item intuitive usage as far as the syntax of the commands is concerned
+ \item the commands shall not only make typesetting easier and faster but also the document source more readable with respect to semantics (\lstinline=\ortho-dichlorobenzene= is easier to read and understand than \lstinline=\textsl{o}-dichlorobenzene=)
+ \item as much customizability as I could think of so every user can adapt the commands to his or her own wishes
+ \item \IUPAC compliant default settings
+\end{itemize}
+Especially the last point needed some pushing from users\footnote{Many thanks to Dr.~Paul~King!} to get things right in many places. If you find anything not compliant with \IUPAC recommendations\footnote{This does not convern the \cmd{ox} command. The \IUPAC version is \cmd[oxa]{ox*}.} I would welcome an email very much!
+
\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
+ \usepackage{chemmacros} % `chemmacros', `chemformula' and `ghsystem' are loaded
\end{beispiel}
will also load \chemformula and \ghsystem. However, you can prevent \chemmacros from loading \ghsystem:
\begin{beispiel}[code only]
@@ -224,6 +233,7 @@ Both \chemformula and \ghsystem don't have package options of their own. If you
\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]{upgreek}{none/textgreek/\uline{upgreek}} This Options determines how the letters \ch{Chemalpha} and friends are typeset. See page \pageref{key:upgreek} for more information. This option can only be chosen in the preamble. (default = \texttt{upgreek})
\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}
@@ -270,15 +280,16 @@ All options of \chemformula belong to the module \textcolor{module}{\texttt{chem
\item \cmd{fminus} \fminus
\item \cmd{transitionstatesymbol} \transitionstatesymbol
\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{Rad}[<sign>]{<subscript>}
+ \item \cmd{Chemalpha} \Chemalpha
+ \item \cmd{Chembeta} \Chembeta
+ \item \cmd{Chemgamma} \Chemgamma
+ \item \cmd{Chemdelta} \Chemdelta
+ \item \cmd{Chemomega} \Chemomega
+ \item \cmd{ChemDelta} \ChemDelta
\end{description}
-\begin{beispiel}
- \Rad[+]{tert} \Rad[-]{sek} \Rad{prim}
-\end{beispiel}
+\achtung{The command \cmd{Rad} has been dropped!}
+
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}.
@@ -292,11 +303,34 @@ It only has any effect, if the package \paket{chemfig} is loaded, since it uses
\ba \Nu
\end{beispiel}
+\label{key:upgreek}The greek letters aren't newly defined symbols but are defined differently depending on the packages you've loaded. The default definition is the corresponding math letter. If you have loaded the \paket{textgreek} package the letters are taken from there, and if you have loaded the package \paket{upgreek} the macros of that package are used. This documentation uses \paket{upgreek} for instance. If you load both \paket{upgreek} and \paket{textgreek} the letters from \paket{upgreek} are used.
+
+If you don't want \chemmacros to use a package automatically but want to decide for yourself, there is the option \key[option]{upgreek}. \ref{tab:upgreek_mode} shows the different styles for some of the letters.
+
+\begin{table}[h]
+ \centering
+ \begin{tabular}{lccc}\toprule
+ & none & upgreek & textgreek \\\midrule
+ \cmd{Chemalpha} & $\alpha$ & $\upalpha$ & \textalpha \\
+ \cmd{Chembeta} & $\beta$ & $\upbeta$ & \textbeta \\
+ \cmd{ChemDelta} & $\Delta$ & $\Updelta$ & \textDelta \\ \bottomrule
+ \end{tabular}
+ \caption{The greek letters}\label{tab:upgreek_mode}
+\end{table}
+
+The reason why \chemmacros defines these macros in the first place is \IUPAC compliance. \IUPAC recommends to use upright greek letters in nomenclature.
+
+\begin{myquote}[\IUPAC Green Book \cite[][p.\,9]{iupac:greenbook}]
+ Greek letters are used in systematic organic, inorganic, macromolecular and biochemical nomenclature. These should be roman (upright), since they are not symbols for physical quantities.
+\end{myquote}
+
+\chemmacros uses these commands now to defined nomenclature commands, see page \pageref{par:greek_letters}.
+
\subsection{Own Particles}\secidx[own]{Particles, Ions and Symbols}
Surely sometimes it can be handy to have other particle macros defined such as \lstinline+\positron+ or \lstinline+\photon+. This can easily be done with this command:
\begin{description}
\item \cmd{DeclareChemParticle}{<cmd>}\ma{<definition>}
- \item \cmd{RenewChemParticle}{<cmd>}\ma{definition}
+ \item \cmd{RenewChemParticle}{<cmd>}\ma{<definition>}
\end{description}
Depending on the \key{method} you chose as option the \texttt{<definition>} will either be a 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}
@@ -310,8 +344,8 @@ Depending on the \key{method} you chose as option the \texttt{<definition>} will
\secidx*{Particles, Ions and Symbols}
\section{Nomenclature, Stereo Descriptors, 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.
+\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}{<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}
@@ -322,7 +356,7 @@ Similar to the \paket{bpchem} package \chemmacros provides a command\footnote{Th
\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}.
-The command \cmd{iupac} serves another purpose, too. Regardless of the setting of the \key[option]{iupac} option all the commands presented in this section are always defined \emph{inside} \cmd{iupac}. Quite a number of the naming commands have very general names: \cmd{meta}, \cmd{D}, \cmd{E}, \cmd{L}, \cmd{R}, \cmd{S}, \cmd{trans} and so forth. This means they either are predefined already (\cmd{L} \L) or are easily defined by another package or class (the \paket{cool} package defines both \cmd{D} and \cmd{E}, for example). In order to give you control which commands are defined in which way, there is the package option \key[option]{iupac}\label{key:iupac}. It has three modes:
+The command \cmd{iupac} serves another purpose, too, however. Regardless of the setting of the \key[option]{iupac} option all the commands presented in this section are always defined \emph{inside} \cmd{iupac}. Quite a number of the naming commands have very general names: \cmd{meta}, \cmd{D}, \cmd{E}, \cmd{L}, \cmd{R}, \cmd{S}, \cmd{trans} and so forth. This means they either are predefined already (\cmd{L} \L) or are easily defined by another package or class (the \paket{cool} package defines both \cmd{D} and \cmd{E}, for example). In order to give you control which commands are defined in which way, there is the package option \key[option]{iupac}\label{key:iupac}. It has three modes:
\begin{itemize}
\item \key{iupac}{auto}: if the commands are \emph{not} defined by any package or class you're using they are available generally, otherwise only \emph{inside} \cmd{iupac}.
\item \key{iupac}{restricted}: all naming commands are \emph{only} defined inside \cmd{iupac}. If the commands are defined by another package they of course have that meaning outside. They're not defined outside otherwise.
@@ -343,7 +377,36 @@ The command \cmd{iupac} serves another purpose, too. Regardless of the setting o
\end{table}
\subsubsection{Predefined Commands}\secidx[predefined]{IUPAC Names}\secidx{Stereo Descriptors and Nomenclature}
-The macros in this section are intended to make the writing of IUPAC names more convenient.
+The macros in this section are intended to make the writing of \IUPAC names more convenient.
+\paragraph{Greek Letters}\label{par:greek_letters}\secidx[greek letters]{IUPAC Names}
+Greek letters in compound names are typeset upright. For this there are the packages \paket{upgreek} and \paket{textgreek}. If you have loaded one of them \chemmacros typesets the following commands upright:
+\begin{description}
+ \item \cmd{a} \iupac{\a}
+ \item \cmd{b} \iupac{\b}
+ \item \cmd{g} \iupac{\g}
+ \item \cmd{d} \iupac{\d}
+ \item \cmd{w} \iupac{\w}
+\end{description}
+\begin{beispiel}
+ \iupac{5\a\-androstan\-3\b\-ol} \\
+ \iupac{\a\-(tri\|chloro\|methyl)\-\w\-chloro\|poly(1,4\-phenylene\|methylene)}
+\end{beispiel}
+
+\paragraph{Hetero Atoms and added Hydrogen}\secidx[hetero atoms]{IUPAC Names}
+Attachments to hetero atoms and added hydrogen atoms are indicated by italic letters \cite{iupac:greenbook}. \chemmacros defines a few shortcuts for the most common ones.
+\begin{description}
+ \item \cmd{H} \iupac{\H}
+ \item \cmd{O} \iupac{\O}
+ \item \cmd{N} \iupac{\N}
+ \item \cmd{Sf} \iupac{\Sf}
+ \item \cmd{P} \iupac{\P}
+\end{description}
+\begin{beispiel}
+ \iupac{\N\-methyl\|benz\|amide} \\
+ \iupac{3\H\-pyrrole} \\
+ \iupac{\O\-ethyl hexanethioate}
+\end{beispiel}
+
\paragraph{Cahn-Ingold-Prelog}\index{Cahn-Ingold-Prelog}\secidx[Cahn-Ingold-Prelog]{IUPAC Names}
\begin{description}
\item \cmd{cip}{<conf>} \eg: \cmd{cip}{R,S} \cip{R,S}
@@ -404,7 +467,7 @@ If you find any commands missing you can define them using
\item \cmd{DeclareChemIUPAC}{<cmd>}\ma{<declaration>}
\item \cmd{RenewChemIUPAC}{<cmd>}\ma{<declaration>}
\end{description}
-A command defined in this way will obey the setting of the option \key[option]{iupac}. This means any existing command is only overwritten with \key{iupac}{strict}. However, \cmd{DeclareChemIUPAC} will \emph{not} change the definition of an existing IUPAC naming command but issue a warning/an error (depending on the package option \key{strict}) if the IUPAC naming command already exists.
+A command defined in this way will obey the setting of the option \key[option]{iupac}. This means any existing command is only overwritten with \key{iupac}{strict}. However, \cmd{DeclareChemIUPAC} will \emph{not} change the definition of an existing \IUPAC naming command but issue a warning/an error (depending on the package option \key{strict}) if the \IUPAC naming command already exists.
\begin{beispiel}
% uses the `upgreek' package
\DeclareChemIUPAC\hapto{$\upeta$}
@@ -474,8 +537,8 @@ Easy representation of \pH, \pKa \ldots (the command \cmd{pKa} depends on the pa
\Ka \Kb \pKa \pKa[1] \pKb \pKb[1]
\end{beispiel}
-\achtung{The default appearance of the \p{}-commands has changed to follow IUPAC recommendations.}
-\begin{myquote}[IUPAC Green Book \cite[][p.\,103]{iupac:greenbook}]
+\achtung{The default appearance of the \p{}-commands has changed to follow \IUPAC recommendations.}
+\begin{myquote}[\IUPAC Green Book \cite[][p.\,103]{iupac:greenbook}]
The operator \p{} […] shall be printed in Roman type.
\end{myquote}
@@ -551,11 +614,11 @@ Typesetting oxidation numbers:
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}.
+ \item \key[ox]{parse}{\uline{true}/false} when \texttt{false} an arbitrary entry can be used for \texttt{<number>}. Default = \texttt{true}
+ \item \key[ox]{roman}{\uline{true}/false} switches from roman to arabic numbers. Default = \texttt{true}
+ \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. Default = \texttt{top}
+ \item \key[ox]{explicit-sign}{\uline{true}/false} shows the $+$ for positiv numbers and the $\pm$ for $0$. Default = \texttt{false}
+ \item \key[ox]{decimal-marker}{comma/point} choice for the decimal marker for formal oxidation numbers like \ox{1.2,X}. Default = \texttt{point}
\end{description}
\begin{beispiel}
@@ -1039,7 +1102,7 @@ These commands are intended to indicate the phase of a compound.
\item \cmd{aq} \aq
\end{description}
-\achtung{The default behaviour of the phases commands has changed to be consistent with IUPAC recommendations. Both \cmd{sld} and \cmd{lqd} have lost their optional argument.}
+\achtung{The default behaviour of the phases commands has changed to be consistent with \IUPAC recommendations. Both \cmd{sld} and \cmd{lqd} have lost their optional argument.}
\begin{beispiel}
\ch{C\sld{} + 2 H2O\lqd{} -> CO2\gas{} + 2 H2\gas}\\
@@ -1052,9 +1115,9 @@ With the package option \key{german} (see section \ref{sec:optionen}) you get th
\ch{C\sld{} + 2 H2O\lqd{} -> CO2\gas{} + 2 H2\gas}
\end{beispiel}
-The IUPAC recommendation\footnote{Thanks to Paul King for pointing this out.} to indicate the state of aggregation is to put it in parentheses after the compound \cite{iupac:greenbook}. However, you might want to put it as a subscript which is also very common.
+The \IUPAC recommendation\footnote{Thanks to Paul King for pointing this out.} to indicate the state of aggregation is to put it in parentheses after the compound \cite{iupac:greenbook}. However, you might want to put it as a subscript which is also very common.
-\begin{myquote}[{IUPAC Green Book \cite[][p.\,54]{iupac:greenbook}}]
+\begin{myquote}[{\IUPAC Green Book \cite[][p.\,54]{iupac:greenbook}}]
The [\ldots] symbols are used to represent the states of aggregation of chemical species. The letters are appended to the formula in parentheses and should be printed in Roman (upright) type without a full stop (period).
\end{myquote}
@@ -1210,7 +1273,6 @@ Some keys can be set without value. Then the \uline{underlined} value is used.
bpchem & option & \uline{true}/false & false & page \pageref{key:option_bpchem} \\
circled & option & formal/\uline{all}/none & formal & page \pageref{key:option_circled} \\
circletype & option & chem/math & chem & page \pageref{key:option_circletype} \\
-% detect-bold & option & \uline{true}/false & false & page \pageref{key:option_detect-bold} \\
german & option & \uline{true}/false & false & page \pageref{key:option_german} \\
ghs & option & \uline{true}/false & true & page \pageref{key:option_ghs} \\
iupac & option & auto/restricted/strict & auto & page \pageref{key:option_iupac} \\
@@ -1218,6 +1280,7 @@ Some keys can be set without value. Then the \uline{underlined} value is used.
Nu & option & 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} \\
+ upgreek & option & none/textgreek/\uline{upgreek} & upgreek & page \pageref{key:option_upgreek} \\
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}:} \\
@@ -1340,7 +1403,7 @@ There are some options to customize the output of the \cmd{ch} command. They can
\end{description}
\section{Stoichiometric Factors}\secidx{Stoichiometric Factors}
-A stoichiometric factor may only contain of numbers and the signs \lstinline+.,_/+
+A stoichiometric factor may only contain of numbers and the signs \lstinline+.,_/()+
\begin{beispiel}
\ch{2} \\
\ch{12}
@@ -1359,6 +1422,14 @@ You have to be a little bit careful with the right syntax but I believe it is ra
this won't work but will result in an error: \ch{1/1_1}
\end{beispiel}
+If stoichiometric factors are enclosed with parentheses the fractions are not recognized. What's inside the parenthesis is typeset as is. \begin{beispiel}
+ \ch{(1/2) H2O} \ch{1/2 H2O} \ch{0.5 H2O}
+\end{beispiel}
+You can find many examples like the following for stoichiometric factors in parentheses in the \IUPAC Green Book \cite{iupac:greenbook}:
+\begin{reaction*}
+ (1/5) K "\ox*{7,Mn}" O4 + (8/5) HCl == (1/5) "\ox*{2,Mn}" Cl2 + (1/2) Cl2 + (1/5) KCl + (4/5) H2O
+\end{reaction*}
+
There are a few possibilities to customize the output.
\begin{description}
\item \key{decimal-marker}{<marker>} the symbol to indicate the decimal. Default = \texttt{.}
@@ -1401,7 +1472,7 @@ The option \key{frac-style}{nicefrac} uses the \lstinline+\nicefrac+ command of
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}
+ \ch[stoich-space=.3em]{2 H2O}
\end{beispiel}
\secidx*{Stoichiometric Factors}
@@ -1491,17 +1562,17 @@ You don't need to use \cmd{mch} and related commands inside \cmd{ch}. Indeed, yo
\paragraph{Behaviour}\secidx[superscripts!behaviour]{Compounds}
The supercripts behave differently depending on their position in a compound, if there are super- and subscripts following each other directly.
\begin{beispiel}
- \ch{^33B} \ch{{}^33B} \ch{3^3B} \\
- \ch{^{23}_{123}B} \ch{{}^{23}_{123}B} \ch{_{123}^{23}B} \\
- \ch{^{123}_{23}B} \ch{{}^{123}_{23}B} \ch{_{23}^{123}B}
+ \ch{^33B} \ch{{}^33B} \ch{3^3B} \ch{B^3} \ch{B3^3} \\
+ \ch{^{23}_{123}B} \ch{{}^{23}_{123}B} \ch{_{123}^{23}B} \ch{B^{23}} \ch{B_{123}^{23}} \\
+ \ch{^{123}_{23}B} \ch{{}^{123}_{23}B} \ch{_{23}^{123}B} \ch{B^{123}} \ch{B23^{123}}
\end{beispiel}
\begin{itemize}
- \item If a compound \emph{starts} with a superscript both sub- and superscript are aligned to the \emph{right} else to the \emph{left}.
- \item If a superscript \emph{follows} a subscript it is shifted additionally by a length determined from the option \key{charge-hshift}{<dim>}, also see page \pageref{key:charge-hshift}f.
+ \item If a compound \emph{starts} with a sub- or superscript both sub- and superscript are aligned to the \emph{right} else to the \emph{left}.
+ \item If a \emph{does not start} with a sub- or superscript and there is both a sub- and a superscript, the superscript is shifted additionally by a length determined from the option \key{charge-hshift}{<dim>}, also see page \pageref{key:charge-hshift}f.
\end{itemize}
-The second point follows IUPAC's recommendations:
-\begin{myquote}[{IUPAC Green Book \cite[][p.\,51]{iupac:greenbook}}]
- In writing the formula for a complex ion, spacing for charge number can be added (staggered arrangement), as well as parentheses: \ch[charge-hshift=1ex]{SO4^2-}, \ch{(SO4)^2-} The staggered arrangement is now recommended.
+The second point follows \IUPAC's recommendations:
+\begin{myquote}[{\IUPAC Green Book \cite[][p.\,51]{iupac:greenbook}}]
+ In writing the formula for a complex ion, spacing for charge number can be added (staggered arrangement), as well as parentheses: \ch[charge-hshift=full]{SO4^2-}, \ch{(SO4)^2-} The staggered arrangement is now recommended.
\end{myquote}
\subsection{Bonds}\label{ssec:bonds}\secidx[bonds]{Compounds}
@@ -1516,13 +1587,14 @@ There are three kinds of bonds:
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{1ex}\label{key:charge-hshift}
- \item \key{charge-style}{text/math} Style that is use to typeset the superscripts. Default = \texttt{text}
+ \item \key{subscript-style}{text/math} Style that is used to typeset the subscripts. Default = \texttt{text}
+ \item \key{charge-hshift}{<dim>} Shift of superscripts when following a subscript. Default = \texttt{.5ex}\label{key:charge-hshift}
+ \item \key{charge-vshift}{<dim>} Extra vertical shift of the superscripts. Default = \texttt{0pt}
+ \item \key{charge-style}{text/math} Style that is used 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 shifted to the right.\secidx[charges!shift]{Compounds} They are shifted if they \emph{follow} a subscript which follows IUPAC recommendations \cite[][p.\,51]{iupac:greenbook}. The amount of the shift can be set with the option \key{charge-hshift}.
+Maybe you have noticed that charges of certain ions are shifted to the right.\secidx[charges!shift]{Compounds} They are shifted if they \emph{follow} a subscript which follows \IUPAC recommendations \cite[][p.\,51]{iupac:greenbook}. The amount of the shift can be set with the option \key{charge-hshift}.
\begin{beispiel}
\ch{SO4^2-} \ch{NH4+} \ch{Na+} \\
\chemsetup[chemformula]{charge-hshift=.5ex}
@@ -1531,6 +1603,14 @@ Maybe you have noticed that charges of certain ions are shifted to the right.\se
\ch{SO4^2-} \ch{NH4+} \ch{Na+}
\end{beispiel}
+Despite \IUPAC's recommendation \chemformula does not make a fully staggered arrangements in the default setting as I find it hard to read in some cases and ugly in others. Since this is a subjective decision \chemformula not only let's you define the absolute amount of the shift but also provides a possibility for full staggered arrangements. For this you have to use \key{charge-hshift}{full}.
+\begin{beispiel}
+ \ch[charge-hshift=0pt]{C5H11+} \ch[charge-hshift=0pt]{SO4^2-} \\
+ \ch{C5H11+} \ch{SO4^2-} \\
+ \ch[charge-hshift=1ex]{C5H11+} \ch[charge-hshift=1ex]{SO4^2-} \\
+ \ch[charge-hshift=full]{C5H11+} \ch[charge-hshift=full]{SO4^2-}
+\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-} \\
@@ -1638,6 +1718,7 @@ Arrows are input in the same intuitive way they are with \paket{mhchem}. There a
\item \cmd{ch}{ </- } \ch{</-} does not react (left)
\item \cmd{ch}{ <-> } \ch{<->} resonance arrow
\item \cmd{ch}{ <> } \ch{<>} reaction in both directions
+ \item \cmd{ch}{ == } \ch{==} stoichiometric equation
\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
@@ -1728,11 +1809,7 @@ In order to define arrows yourself you need to know the basics of \TikZ\footnote
\begin{beispiel}
\DeclareChemArrow{.>}{\draw[-cf,dotted,red] (cf_arrow_start) -- (cf_arrow_end);}
\DeclareChemArrow{n>}{\draw[-cf] (cf_arrow_start) .. controls ([yshift=3ex]cf_arrow_mid) .. (cf_arrow_end);}
- \DeclareChemArrow{==}{
- \draw ([yshift=.2ex]cf_arrow_mid_start) -- ([yshift=.2ex]cf_arrow_mid_end);
- \draw ([yshift=-.2ex]cf_arrow_mid_start) -- ([yshift=-.2ex]cf_arrow_mid_end);
- }
- \ch{A .> B} \ch{A .>[a][b] B} \ch{A n> B} \ch{A == B}
+ \ch{A .> B} \ch{A .>[a][b] B} \ch{A n> B}
\end{beispiel}
If you want to redefine an existing arrow there are two commands you can use:
\begin{description}
@@ -1866,7 +1943,7 @@ 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
+ !(Synthesegas)( $n$ CO + $(2n+1)$ H2 ) ->[\SI{200}{\celsius}][\[CoNi\]] C_{$n$}H_{$2n+2$} + $n$ H2O
\end{reaction}
\end{beispiel}