summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-06-24 23:45:09 +0000
committerKarl Berry <karl@freefriends.org>2013-06-24 23:45:09 +0000
commitcbcdf6683e607495b67f3ff5798ac79be73758a5 (patch)
tree1c0c485421ead5cca7dd0de66afdf39f416ed200 /Master/texmf-dist
parent1aeba500ea40082474f38f3ec6d3fee4fd69de5e (diff)
mhchem (24jun13)
git-svn-id: svn://tug.org/texlive/trunk@30910 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/README26
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/lppl-1-3c.txt (renamed from Master/texmf-dist/doc/latex/mhchem/legal.txt)42
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/manifest.txt17
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/mhchem.pdfbin280242 -> 223206 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/mhchem.tex1608
-rw-r--r--Master/texmf-dist/tex/latex/mhchem/hpstatement.sty547
-rw-r--r--Master/texmf-dist/tex/latex/mhchem/mhchem.sty1815
-rw-r--r--Master/texmf-dist/tex/latex/mhchem/rsphrase.sty78
8 files changed, 3140 insertions, 993 deletions
diff --git a/Master/texmf-dist/doc/latex/mhchem/README b/Master/texmf-dist/doc/latex/mhchem/README
new file mode 100644
index 00000000000..3328b0aa9bb
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mhchem/README
@@ -0,0 +1,26 @@
+The mhchem Bundle 2013-06-23
+
+containing
+- mhchem v3.13
+- hpstatement v1.00
+- rsphrase v3.11
+
+The mhchem package provides commands for typesetting
+chemical molecular formulae and equations.
+
+The hpstatement package provides commands for the official
+hazard statements and precautionary statements (H and P
+statements) that are used to label chemicals.
+
+The rsphrase package provides commands for the official
+Risk and Safety (R and S) Phrases that are used to label
+chemicals.
+
+
+Copyright 2004-2013 Martin Hensel
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License version 1.3c
+which can be found at
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+and is included as lppl-1-3c.txt.
diff --git a/Master/texmf-dist/doc/latex/mhchem/legal.txt b/Master/texmf-dist/doc/latex/mhchem/lppl-1-3c.txt
index 0b189f11805..22443139013 100644
--- a/Master/texmf-dist/doc/latex/mhchem/legal.txt
+++ b/Master/texmf-dist/doc/latex/mhchem/lppl-1-3c.txt
@@ -1,42 +1,9 @@
-%% The mhchem bundle
-%% Copyright 2004-2011 M.a-r.t-i.n H.e-n.s-e.l
-%
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License version 1.3c
-% which can be found at
-% http://www.latex-project.org/lppl/lppl-1-3c.txt
-%
-% This work has the LPPL maintenance status "maintained".
-% The Current Maintainer of this work is M.a-r.t-i.n H.e-n.s-e.l.
-%
-% ( In order to fight spam, the maintainer's contact )
-% ( information is "encrypted" with ROT13. )
-% ( If you do not know ROT13 yet and have no tool for )
-% ( decryption, simply do an Internet search for "ROT13". )
-%
-% ,---[ ROT 13 ]---
-% | Gur Pheerag Znvagnvare bs guvf jbex vf Znegva Urafry
-% | jub pna or pbagnpgrq ivn
-% | zupurz@ZnegvaUrafry.qr
-% | be ivn znvy
-% | Znegva Urafry
-% | Cbfgfge. 20
-% | 09232 Unegznaafqbes
-% | Treznal
-% `----------
-%
-% This work consists of the files mhchem.sty, rsphrase.sty,
-% mhchem.pdf and legal.txt.
-
-
-
-
The LaTeX Project Public License
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-LPPL Version 1.3c 2006-05-20
+LPPL Version 1.3c 2008-05-04
-Copyright 1999 2002-2006 LaTeX3 Project
+Copyright 1999 2002-2008 LaTeX3 Project
Everyone is allowed to distribute verbatim copies of this
license document, but modification of it is not allowed.
@@ -45,7 +12,7 @@ PREAMBLE
========
The LaTeX Project Public License (LPPL) is the primary license under
-which the the LaTeX kernel and the base LaTeX packages are distributed.
+which the LaTeX kernel and the base LaTeX packages are distributed.
You may use this license for any work of which you hold the copyright
and which you wish to distribute. This license may be particularly
@@ -445,4 +412,5 @@ Important Recommendations
impossible for the licensee to determine what is considered by you
to comprise the Work and, in such a case, the licensee would be
entitled to make reasonable conjectures as to which files comprise
- the Work. \ No newline at end of file
+ the Work.
+
diff --git a/Master/texmf-dist/doc/latex/mhchem/manifest.txt b/Master/texmf-dist/doc/latex/mhchem/manifest.txt
new file mode 100644
index 00000000000..254c932431e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mhchem/manifest.txt
@@ -0,0 +1,17 @@
+This work consists of the files
+
+ mhchem.sty (Copyright Martin Hensel)
+ hpstatement.sty (Copyright Martin Hensel, except the contained statements)
+ rsphrase.sty (Copyright Martin Hensel, except the contained phrases)
+
+ README (Copyright Martin Hensel)
+ mhchem.pdf (Copyright Martin Hensel)
+ mhchem.tex (Copyright Martin Hensel)
+
+ manifext.txt (Copyright Maritn Hensel)
+ lppl-1-3c.txt (Copyright LaTeX3 Project)
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License version 1.3c
+which is included as lppl-1-3c.txt
+
diff --git a/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf b/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf
index 38a749f4481..c286ea45208 100644
--- a/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf
+++ b/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mhchem/mhchem.tex b/Master/texmf-dist/doc/latex/mhchem/mhchem.tex
new file mode 100644
index 00000000000..e1358741978
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mhchem/mhchem.tex
@@ -0,0 +1,1608 @@
+%% mhchem.tex
+%% Copyright 2004-2013 Martin Hensel
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License version 1.3c
+% which is included as lppl-1-3c.txt.
+%
+% This work has the LPPL maintenance status "maintained".
+% The Current Maintainer of this work is Martin Hensel.
+%
+% ( In order to fight spam, the maintainer's contact )
+% ( information is "encrypted" with ROT13. )
+% ( If you do not know ROT13 yet and have no tool for )
+% ( decryption, simply do an Internet search for "ROT13". )
+%
+% ,---[ ROT 13 ]---
+% | Gur Pheerag Znvagnvare bs guvf jbex vf Znegva Urafry
+% | jub pna or pbagnpgrq ivn
+% | zupurz@ZnegvaUrafry.qr
+% | be ivn znvy
+% | Znegva Urafry
+% | Cbfgfge. 20
+% | 09232 Unegznaafqbes
+% | Treznal
+% `----------
+%
+% This work consists of all files listed in manifest.txt.
+%
+%
+\documentclass[a4paper,notitlepage]{scrreprt}
+\usepackage{fontspec}
+\usepackage[danish,french,ngerman,italian,spanish,UKenglish]{babel}
+\usepackage{mathpazo}% math font
+\setmainfont[Mapping=tex-text]{TeX Gyre Pagella}% URWPalladioL
+ % http://www.ctan.org/tex-archive/fonts/tex-gyre/fonts
+\addtokomafont{disposition}{\rmfamily}
+\linespread{1.1}
+\setmonofont[Mapping=tex-text]{Source Code Pro}
+ % http://sourceforge.net/projects/sourcecodepro.adobe/
+\usepackage[bookmarks,bookmarksopen,pdfstartview=FitH]{hyperref}
+\usepackage[alwaysadjust]{paralist}
+\usepackage{ragged2e}
+\usepackage{fvrb-ex}% example environments
+\usepackage{color}
+
+\usepackage[version=3]{mhchem}
+\usepackage{hpstatement}
+\usepackage{rsphrase}
+\usepackage{tikz}
+
+
+\setcounter{secnumdepth}{-1}
+\newcommand\macro[1]{{\ttfamily\textbackslash#1}}
+\newcommand\fromversion[1]{\marginpar{{\scriptsize version$\geq$#1}}}
+\newenvironment{annotation}{\bgroup\footnotesize}{\par\egroup}
+
+
+
+\begin{document}
+
+\title{%
+ The mhchem Bundle\\[0.3em]
+ \Large\textmd{%
+ Documentation for the Packages\\
+ mhchem v3.13,\\% check
+ hpstatement v1.00 and\\
+ rsphrase v3.11}%
+}
+\author{%
+ Martin Hensel\\
+ mhchem\makebox[0pt][l]{\textcolor{white}{NOSPAM}}@MartinHensel\makebox[1pt][l]{\textcolor{white}{.}}.de%
+}
+\date{%
+ 2013-06-23% check
+}
+\maketitle
+
+\vfill
+
+\begin{abstract}
+ \noindent
+ The \textbf{mhchem} package provides commands for typesetting chemical molecular formulae and equations.
+ \medskip
+
+ \noindent The \textbf{hpstatement} package provides commands for the official hazard statements and precautionary statements (H and P statements) that are used to label chemicals.
+ \medskip
+
+ \noindent
+ The \textbf{rsphrase} package provides commands for the official Risk and Safety (R and S) Phrases that are used to label chemicals.
+\end{abstract}
+
+
+
+\clearpage
+\tableofcontents
+
+
+
+\clearpage
+
+\chapter{The mhchem Package}
+
+\section{Currently under development}
+
+\begin{annotation}
+The mhchem package is still under development. Admittedly, very slow development with large breaks in between, but still progressing. Version 4 will be a major rewrite of the code with some new features and slight syntax changes (this will be the reason for the new number). While I try to support the old syntaxes via the \verb|version| option, please note that slight changes in spacing (and therefore changed line breaks and page breaks) can occur from release to release.
+\end{annotation}
+
+
+
+\section{Why that package?}
+
+\noindent
+For typesetting a single chemical formula from time to time, one can use \LaTeX's math mode, manually setting the letters in an upright font.
+
+\begin{addmargin}[4em]{0em}
+\begin{SideBySideExample}[xrightmargin=3cm]
+ $\frac{1}{2}\,\mathrm{H}_2\mathrm{O}$
+\end{SideBySideExample}
+\end{addmargin}
+
+\noindent
+In addition, one has to care about the height of subscripts, as the following example shows. The 2 and the 7 are not aligned properly.
+
+\begin{addmargin}[4em]{0em}
+\begin{SideBySideExample}[xrightmargin=3cm]
+ $3\,\mathrm{Cr}_2\mathrm{O}_7^{2-}$
+\end{SideBySideExample}
+\end{addmargin}
+
+\noindent
+So one would have to write
+
+\begin{addmargin}[4em]{0em}
+\begin{SideBySideExample}[xrightmargin=3cm]
+ $3\,\mathrm{Cr}_2^{\strut}\mathrm{O}_7^{2-}$
+\end{SideBySideExample}
+\end{addmargin}
+
+\noindent
+But this in turn changes the line height. That has to be compensated. And so on and so forth. At the end, you have to write long commands and may be lost eventually, when a formula should appear inside a section header with a different font.
+
+\bigskip
+
+\noindent
+mhchem is here to assist you. To mention a few of its features:
+\smallskip
+
+\begin{compactitem}
+ \item Adaptation to the surrounding environment\\
+ If used inside normal text or a section header, the formula is displayed using the current text font. If used inside a math environment, the current math font is used in the appropriate size.
+
+ \item More natural input\\
+ I am convinced that (when expecting a chemical formula) it is easier to read and write \verb|H3PO4| than \verb|H_3PO_4|. The latter is grouped wrongly according to the Gestalt rules. Furthermore, you can copy formulas from text e-mails and even Word documents and save a lot of time as you do not have to insert underscores. (One could argue that this is inconsistend with math mode and could lead to confusions. I believe, however that \verb|O2| and \verb|x_2| are sufficiently distinct concepts.)
+
+ \item Easy input of amount numbers\\
+ with automatic spacing; easy input of fractions
+
+ \item Fine typographic corrections\\
+ fine correction of the height of subscripts and superscripts; right-aligned left-side sub- and superscripts
+\end{compactitem}
+
+\noindent
+\ldots{} and a lot more. But let us end the ad block here and see ourselves how easy it can be to typeset chemical formulae.
+
+
+\section{Preamble}
+
+\noindent
+In order to use all of mhchem's features, request it in your document's preamble with the command
+
+\smallskip
+
+{\Large\verb|\usepackage|{\ttfamily\bfseries [version=3]}\verb|{mhchem}|}
+\marginpar{\Large !}
+
+\medskip
+
+\begin{annotation}
+\noindent
+What about the \verb|version=3|? During development, I became aware that additional functionality could not be added without changing the user-interface slightly. But what about backward compatibility? I could, of course, have freezed mhchem and published an mhchem2 package. However, I decided to use an option in order to switch to the new interface. One can use \verb|version=3| for the most-recent version of mhchem, but \verb|version=2| and \verb|version=1| (or no option at all, but this will yield a warning) are still there for existing documents that use an old user-interface of mhchem. Those old documents should still produce the same results. However, spacing might differ slightly.
+\end{annotation}
+
+\medskip
+
+\noindent
+mhchem includes the following packages: amsmath, calc, graphics, ifthen, keyval, pdftexcmds, twoopt.
+
+
+
+\section{Basics}
+
+\noindent
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{H2O}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{Sb2O3}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{H+}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{CrO4^2-}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{AgCl2-}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{[AgCl2]-}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{Y^{99}+}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{Y^{99+}}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{H2_{(aq)}}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{NO3-}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{(NH4)2S}
+\end{SideBySideExample}
+
+
+\subsection{Amounts}
+
+Place amounts directly in front of a formula. A small space will be inserted
+automatically.
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{2H2O}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{0.5H2O}
+\end{SideBySideExample}
+\fromversion{3.13}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{1/2H2O}
+\end{SideBySideExample}
+
+
+\subsection{Isotopes}
+
+\begin{SideBySideExample}[xrightmargin=2cm]
+ \ce{^{227}_{90}Th+}
+\end{SideBySideExample}
+
+
+\subsection{Fonts}
+
+A few words about fonts. LaTeX distinguishes between text fonts and math fonts. In general, the math fonts have much more glyphs: alphas, nabla operators and all that kind of suff. Ideally, the math font looks very similar to the text font and that is why many LaTeX users do not know about the two kinds of fonts. However, the distinction is important for the use of mhchem.
+
+\medskip
+
+\noindent
+In the following examples, I will switch the text font to sans serif. This way, one can easily distinguish \textsf{text font (sans serif)} from $\mathrm{math\ font\ (with\ serifs)}$.
+
+\medskip
+
+\noindent
+When you are in a math environment (e.g. opened and closed with a \$), you could simply use \macro{ce}. Its content will be set in an upright math font. (Remember: all variables---like $V$ for volume---are set using an italic font, physical units and chemical elements are set using an upright font.)
+
+\medskip
+
+\begin{SideBySideExample}[xrightmargin=5cm]
+ $V_{\ce{H2O}}$
+\end{SideBySideExample}
+
+\medskip
+
+\noindent
+When used in text mode, \macro{ce} adapts to the current text font. You could simply write a formula in one of your section titles it would be set with the correct font, no matter where is appears (section title, header, table of contents, references, \dots).
+
+\medskip
+
+\begin{SideBySideExample}[xrightmargin=5cm]
+ £\sffamily
+ \ce{H2O}, $\ce{H2O}$
+\end{SideBySideExample}
+
+\medskip
+
+\begin{SideBySideExample}[xrightmargin=5cm]
+ £\sffamily
+ \ce{Ce^{IV}}, $\ce{Ce^{IV}}$
+\end{SideBySideExample}
+\fromversion{2.04}
+
+\medskip
+
+\noindent
+There are some special cases. A negative charge in text mode is replaced with a dash (--, normally input as \verb|--|), because a text minus sign is often too short (compare $\text{Cl}^{\text{-}}$ and \ce{Cl-}). All `operators' in equations, e.g. `+' and reaction arrows, are taken from the math font.
+
+
+\subsection{Special Symbols}
+
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{KCr(SO4)2*12H2O}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{KCr(SO4)2.12H2O}
+\end{SideBySideExample}
+
+\medskip
+\noindent\ce{[Cd\{SC(NH2)2\}2].[Cr(SCN)4(NH3)2]2}\par
+\noindent\hspace{5cm}\verb|\ce{[Cd\{SC(NH2)2\}2].[Cr(SCN)4(NH3)2]2}|
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ $\ce{RNO2^{-.}}$, \ce{RNO2^{-.}}
+\end{SideBySideExample}
+\fromversion{2}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{$\mu\hyphen$Cl}
+\end{SideBySideExample}
+\fromversion{3.05}
+
+
+\subsection{Bonds}
+
+\noindent
+Horizontal \fromversion{2} bonds can be set using the characters \verb|-|, \verb|=| and \verb|#| (single, double, triple bond) inside a formula (a \verb|-| at the end of a formula yields a negative charge).
+
+\medskip
+
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{C6H5-CHO}
+\end{SideBySideExample}
+
+\medskip
+
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{X=Y#Z}
+\end{SideBySideExample}
+
+\medskip
+
+\noindent
+Different books visualise bonds in extremely different ways. Here, the minus sign from the math font is used to display the bonds (even in text mode). The bonds are vertically aligned on the math axis. For most math fonts, this is slightly lower than half the height of a capital letter.
+
+\medskip
+
+\noindent
+The \macro{bond} \fromversion{3} command allows you to typeset special bonds.
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{A\bond{-}B\bond{=}C\bond{#}D}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{A\bond{~}B\bond{~-}C}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{A\bond{~--}B\bond{~=}C\bond{-~-}D}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{A\bond{...}B\bond{....}C}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{A\bond{->}B\bond{<-}C}
+\end{SideBySideExample}
+
+\medskip
+
+\noindent
+Please be aware, that the dashed bonds use the \macro{scalebox} macro internally, which may not be visualised correctly by some DVI viewers. If you switch to another math font, the sidebearing of the minus sign may vary, which would cause the dashed bonds to align badly (in \verb|\bond{~--}|, for instance). In that case, you may want to adjust the layout by using the command \verb|\mhchemoptions{minus-sidebearing-left=0.06em,| \verb|minus-sidebearing-right=0.11em}| with the appropriate values.
+
+
+\subsection{Using Math}
+
+To
+\fromversion{3.05}
+use math commands inside \macro{ce}, these commands can be enclosed by \verb|$|.
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{Fe(CN)_{$\frac{6}{2}$}}
+\end{SideBySideExample}
+
+\medskip
+\noindent\ce{$x\,$ Na(NH4)HPO4 ->[\Delta] (NaPO3)_{$x$} + $x\,$ NH3 ^ + $x\,$ H2O}\par
+\noindent\hspace{5cm}\verb|\ce{$x\,$ Na(NH4)HPO4 ->[\Delta]|\par
+\noindent\hspace{5cm}\verb| (NaPO3)_{$x$} +|\par
+\noindent\hspace{5cm}\verb| $x\,$ NH3 ^ + $x\,$ H2O}|
+
+
+
+\section{Formulae}
+
+\subsection{Reaction Arrows}
+
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{CO2 + C -> 2CO}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{CO2 + C <- 2CO}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{CO2 + C <=> 2CO}
+\end{SideBySideExample}
+
+\medskip
+%\begin{SideBySideExample}[xrightmargin=5cm]
+% \ce{H+ + OH- <=>> H2O}
+%\end{SideBySideExample}
+\noindent
+\makebox[5cm][l]{\ce{H+ + OH- <=>> H2O}}\verb|\ce{H+ + OH- <=>> H2O}|
+
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{$A$ <-> $A'$}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{CO2 + C ->[\alpha] 2CO}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{CO2 + C ->[\alpha][\beta] 2CO}
+\end{SideBySideExample}
+
+\medskip
+
+\noindent
+As with \verb|^| and \verb|_|, the content above and below reaction arrows is set in math font. When you want to put descriptive text there, use the \macro{text} command. Or, as a shortcut, you could type a `T' between reaction arrow and opening bracket.
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{CO2 + C ->[\text{above}] 2CO}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{CO2 + C
+ ->[\text{above}][\text{below}] 2CO}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{CO2 + C ->T[above][below] 2CO}
+\end{SideBySideExample}
+
+\medskip
+
+\noindent
+Similarly, there is a shortcut for using \macro{ce} with reaction arrows:
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{$A$ ->[\ce{+H2O}] $B$}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{$A$ ->C[+H2O] $B$}
+\end{SideBySideExample}
+
+
+\subsection{Precipitate and Gas}
+
+\noindent Use \verb|v| or \verb|(v)| for precipitate (arrow down) and \verb|^| or \verb|(^)| for gas (arrow up), all of them separated by spaces.
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{SO4^2- + Ba^2+ -> BaSO4 v}
+\end{SideBySideExample}
+
+
+\subsection{Watch Out!}
+
+\noindent
+Please be aware that you sometimes have to enclose spaces in braces. In particular, you have to do so, when they appear between brackets that belong to an reaction arrow.
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \ce{$A$ <->T[{Enclose spaces!}] $A'$}
+\end{SideBySideExample}
+
+
+\subsection{Further Examples}
+
+\begin{Example}[xrightmargin=15cm]
+ \ce{Zn^2+
+ <=>[\ce{+ 2OH-}][\ce{+ 2H+}]
+ $\underset{\text{amphoteres Hydroxid}}{\ce{Zn(OH)2 v}}$
+ <=>C[+2OH-][{+ 2H+}]
+ $\underset{\text{Hydroxozikat}}{\ce{[Zn(OH)4]^2-}}$
+ }
+\end{Example}
+\fromversion{3.05}
+
+\bigskip
+
+\begin{Example}[xrightmargin=5cm]
+ $K = \frac{[\ce{Hg^2+}][\ce{Hg}]}{[\ce{Hg2^2+}]}$
+\end{Example}
+
+\medskip
+\begin{Example}[xrightmargin=5cm]
+ \ce{Hg^2+ ->[\ce{I-}]
+ $\underset{\mathrm{red}}{\ce{HgI2}}$
+ ->C[I-]
+ $\underset{\mathrm{red}}{\ce{[Hg^{II}I4]^2-}}$
+ }
+\end{Example}
+\fromversion{3.05}
+
+
+\subsection{Tips and Tricks}
+
+When you use equation environments contining a \macro{ce} very often, you may want to create your own command. Then you could (in your preamble, preferably) define the following two commands
+
+\begin{Verbatim}
+ \newcommand\reaction[1]{\begin{equation}\ce{#1}\end{equation}}
+ \newcommand\reactionnonumber[1]%
+ {\begin{equation*}\ce{#1}\end{equation*}}
+\end{Verbatim}
+
+\noindent
+and then use them as follows.
+
+\begin{SideBySideExample}[xrightmargin=5cm]
+ £\newcommand\reaction[1]{\begin{equation}\ce{#1}\end{equation}}
+ £\newcommand\reactionnonumber[1]%
+ £ {\begin{equation*}\ce{#1}\end{equation*}}
+ \reaction{CO2 + C}
+ \reactionnonumber{CO2 + C}
+\end{SideBySideExample}
+
+\bigskip
+
+\noindent
+The advanced \LaTeX\ user could replace the two definitions by
+\begin{Verbatim}
+ \makeatletter
+ \newcommand\reaction@[1]{\begin{equation}\ce{#1}\end{equation}}
+ \newcommand\reaction@nonumber[1]%
+ {\begin{equation*}\ce{#1}\end{equation*}}
+ \newcommand\reaction{\@ifstar{\reaction@nonumber}{\reaction@}}
+ \makeatother
+\end{Verbatim}
+and then write
+\begin{SideBySideExample}[xrightmargin=5cm]
+ £\makeatletter
+ £ \newcommand\reaction@[1]{\begin{equation}\ce{#1}\end{equation}}
+ £ \newcommand\reaction@nonumber[1]%
+ £ {\begin{equation*}\ce{#1}\end{equation*}}
+ £ \newcommand\reaction{\@ifstar{\reaction@nonumber}{\reaction@}}
+ £\makeatother
+ \reaction{CO2 + C}
+ \reaction*{CO2 + C}
+\end{SideBySideExample}
+
+\smallskip
+
+\noindent
+for the same result.
+
+\minisec{}
+
+So far, so good. All reactions will be labelled exactly as all the equations. A few people asked for a diffent set of numbers for equations and reactions. One could use this code:
+
+\begin{Verbatim}
+ \makeatletter
+ \newcounter{reaction}
+ %%% >> for article <<
+ %\renewcommand\thereaction{C\,\arabic{reaction}}
+ %%% << for article <<
+ %%% >> for report and book >>
+ \renewcommand\thereaction{C\,\thechapter.\arabic{reaction}}
+ \@addtoreset{reaction}{chapter}
+ %%% << for report and book <<
+ \newcommand\reactiontag%
+ {\refstepcounter{reaction}\tag{\thereaction}}
+ \newcommand\reaction@[2][]%
+ {\begin{equation}\ce{#2}%
+ \ifx\@empty#1\@empty\else\label{#1}\fi%
+ \reactiontag\end{equation}}
+ \newcommand\reaction@nonumber[1]%
+ {\begin{equation*}\ce{#1}\end{equation*}}
+ \newcommand\reaction%
+ {\@ifstar{\reaction@nonumber}{\reaction@}}
+ \makeatother
+\end{Verbatim}
+
+\noindent
+With that, all reactions will be labelled independently of the equations.
+
+\begin{SideBySideExample}[xrightmargin=6.5cm]
+ £\makeatletter
+ £\newcounter{reaction}
+ £%%% >> for article <<
+ £%\renewcommand\thereaction{C\,\arabic{reaction}}
+ £%%% << for article <<
+ £%%% >> for report and book >>
+ £\renewcommand\thereaction{C\,\thechapter.\arabic{reaction}}
+ £\@addtoreset{reaction}{chapter}
+ £%%% << for report and book <<
+ £\newcommand\reactiontag%
+ £ {\refstepcounter{reaction}\tag{\thereaction}}
+ £\newcommand\reaction@[2][]%
+ £ {\begin{equation}\ce{#2}%
+ £ \ifx\@empty#1\@empty\else\label{#1}\fi%
+ £ \reactiontag\end{equation}}
+ £\newcommand\reaction@nonumber[1]%
+ £ {\begin{equation*}\ce{#1}\end{equation*}}
+ £\newcommand\reaction%
+ £ {\@ifstar{\reaction@nonumber}{\reaction@}}
+ £\makeatother
+ \begin{equation}a+b\end{equation}
+ \reaction{CO2 + C}
+ \reaction*{CO2 + C}
+ \reaction[react:co]{CO2 + C}
+ \begin{equation}a+b\end{equation}
+\end{SideBySideExample}
+
+
+
+\section[Equation Environments]{Equation Environments\fromversion{2}}
+
+When using equation environments, you can use the \macro{cee} command. The advantage is, that \macro{cee} can take the \verb|&| and \verb|\\| macros as input and passes them on to the surrounding environment.
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \begin{align*}
+ \cee{RNO2 &<=>C[+e] RNO2^{-.} \\
+ RNO2^{-.} &<=>C[+e] RNO2^2-}
+ \end{align*}
+\end{SideBySideExample}
+
+
+\section{Fine Tuning}
+
+In this section, several option switches will be explained. For instance,
+
+\begin{Verbatim}[commandchars=+\[\]]
+ \mhchemoptions{+textbf[option=abc]}
+\end{Verbatim}
+
+\noindent
+All options can also be used in the \macro{usepackage} command in your preamble, like
+
+\begin{Verbatim}[commandchars=+()]
+ \usepackage[version=3,+textbf(option=abc)]{mhchem}
+\end{Verbatim}
+
+
+\subsection{Fonts} \label{sec:Fonts}
+
+As mentioned previously, mhchem uses the current text font (if you use \macro{ce} in text mode) or the current math font (if you use \macro{ce} in math mode). If you want, however, you can set a font that will be used for all your formulae and equations.
+
+\medskip
+
+\noindent
+Inside your document, you can use
+
+\begin{Verbatim}[commandchars=+\[\]]
+ \mhchemoptions{+textbf[textfontcommand=\sffamily]}
+ \mhchemoptions{+textbf[mathfontcommand=\mathsf]}
+\end{Verbatim}
+
+\noindent
+in order to get sanf-serif fonts in both, text mode and math mode. There are two further options, that basically do the same, but only take the name of a single font command without the initial backslash.
+
+\begin{Verbatim}[commandchars=+\[\]]
+ \mhchemoptions{+textbf[textfontname=sffamily]}
+ \mhchemoptions{+textbf[mathfontname=mathsf]}
+\end{Verbatim}
+
+\noindent
+Only the latter options can be used with the \macro{usepackage} command when loading mhchem (as an optional argument in brackets), because the font commands are not properly defined in the preamble yet.
+
+\medskip
+
+\noindent
+Furthermore, there are two shortcuts:
+
+\begin{Verbatim}[commandchars=+\[\]]
+ \mhchemoptions{+textbf[font=sf]}
+\end{Verbatim}
+
+\noindent
+sets the two fonts to sans-serif, as mentioned above,
+
+\begin{Verbatim}[commandchars=+\[\]]
+ \mhchemoptions{+textbf[font=]}
+\end{Verbatim}
+
+\noindent
+switches back to the default, which is
+
+\begin{Verbatim}[commandchars=+\[\]]
+ \mhchemoptions{+textbf[textfontcommand=, mathfontcommand=\mathrm]}
+\end{Verbatim}
+
+
+\subsection{Arrows}
+
+By default, mhchem uses arrows that are composed of different font characters (as does the \verb|amsmath| package. This may lead to undesirable effects when dislayed on a screen. Helmut Hänsel kindly provided a patch that used the pgf graphics package instead. pgf arrows are activated by
+
+\begin{Verbatim}[commandchars=+\[\]]
+ \mhchemoptions{+textbf[arrows=pgf]}
+\end{Verbatim}
+
+\noindent
+As explained, you can set this option in the \macro{usepackage} as well. If you don't, please do not forget to load the \verb|tikz| package by hand. The \verb|tikz| package is a wrapper for (and included in) the pgf bundle. The default setting is
+
+\begin{Verbatim}[commandchars=+\[\]]
+ \mhchemoptions{+textbf[arrows=font]}
+\end{Verbatim}
+
+\noindent
+Here is how it looks:
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \mhchemoptions{arrows=font}%
+ \ce{$A$ <->T[description] $A'$}
+\end{SideBySideExample}
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \mhchemoptions{arrows=pgf}%
+ \ce{$A$ <->T[description] $A'$}
+\end{SideBySideExample}
+
+
+\subsubsection{Arrow Tips}
+
+If you do not like the standard LaTeX arrows (or the ones of your current math font, respectively), here is the option for you:
+
+\begin{Verbatim}[commandchars=+\[\]]
+ \mhchemoptions{+textbf[arrows=pgf-filled]}
+\end{Verbatim}
+
+\noindent
+The same considerations as for the \verb|pgf| option apply.
+
+\medskip
+\begin{SideBySideExample}[xrightmargin=5cm]
+ \mhchemoptions{arrows=pgf-filled}
+ \ce{$A$ <->T[description] $A'$}
+\end{SideBySideExample}
+
+
+\clearpage
+\section{Major Changes}
+\label{sec:WhatSNew}
+
+\subsection{Migration from version 1}
+
+Inner \verb|-| characters are considered to be bonds.\\
+Use \verb|$| for math mode inside \macro{ce} (no braces any more).
+
+\subsection{Migrating from version 2}
+
+Meaning and usage of \macro{bond} changed.
+
+
+\section{Most Recent Changes}% check
+
+\minisec{2013-06-23 mhchem v3.13}
+\begin{compactitem}
+\item compatibility with many more babel languages
+\item fraction possible in amounts (\verb|0.5H2O|)
+\end{compactitem}
+
+\minisec{2013-06-17 mhchem v3.12}
+\begin{compactitem}
+\item fixed: incompatibility with babel Czech
+\item major internal refactorings
+\end{compactitem}
+
+\minisec{2013-06-17 hpstatement v1.00}
+\begin{compactitem}
+\item initial release with English statements
+\end{compactitem}
+
+\minisec{2011-06-03 mhchem v3.11}
+\begin{compactitem}
+\item fixed: incompatibility with mathdesign and other font-related packages
+\end{compactitem}
+
+\minisec{2011-04-29 mhchem v3.10}
+\begin{compactitem}
+\item fixed: incompatibility with biblatex
+\end{compactitem}
+
+\minisec{2011-03-18 mhchem v3.09}
+\begin{compactitem}
+ \item fixed: \verb|_{$x$}| now works properly
+\end{compactitem}
+
+\minisec{2010-06-16 rsphrase v3.08}
+\begin{compactitem}
+ \item added: Italian phrases
+\end{compactitem}
+
+\minisec{2007-05-19 mhchem v3.0}
+\begin{compactitem}
+ \item fixed: loading tikz automatically when option pdf-filled is used
+ \item fixed: empty \verb|^{}| and \verb|_{}| work properly
+\end{compactitem}
+
+
+
+\chapter{The hpstatement Package and the rsphrase Package}\label{sec:rsphrase}
+
+The \textbf{hpstatement} package contains all official
+hazard statements and precautionary statements (H and P) of the
+Globally Harmonized System of Classification and Labeling of Chemicals (GHS)
+and of the CLP Regulation of the European Union.
+
+The statements are available in
+ English
+ German.
+If you are a native speaker of either
+Bulgarian,
+Czech,
+Danish,
+Dutch,
+Estonian,
+Finnish,
+French,
+Greek,
+Hungarian,
+Irish,
+Italian,
+Latvian,
+Lithuanian,
+Maltese,
+Polish,
+Portugese,
+Romanian,
+Slovak,
+Slovenian,
+Spanish or
+Swedish,
+and would like to help offering the statments in those languages, please contact me.
+
+\bigskip
+
+The \textbf{rsphrase} package contains the text of all official
+Risk and Safety (R and S) Phrases that were used to label chemicals.
+
+These phrases are
+available in Danish, Englisch, French, German (current spelling), Spanish, and Italian.
+
+\bigskip
+
+Please be advised that, as stated in the license, the authors provide no warranty of correctness.
+
+
+\section{Usage}
+
+The \textbf{hpstatement} package provides two commands: \verb|\hpstatement| and
+\verb|\hpnumber|. \verb|\hpstatement| insterts the statement's text,
+\verb|\hpnumber| it's formatted number.\bigskip
+
+\begin{addmargin}[1em]{0em}
+\begin{SideBySideExample}[xrightmargin=7cm]
+ The statement \hpnumber{H200}\\
+ is `\hpstatement{H200}'
+\end{SideBySideExample}
+\end{addmargin}
+\bigskip
+
+\noindent The \textbf{rsphrase} package works the same way, but provides two
+commands: \verb|\rsnumber| and \verb|\rsphrase|, respectively.
+
+\bigskip
+
+\noindent One can use the two commands with an empty argument. It is then
+assumed that the argument is equivalent to the one used previously. \bigskip
+
+\begin{addmargin}[1em]{0em}
+\begin{SideBySideExample}[xrightmargin=7cm]
+ The statement \hpnumber{H200}\\
+ is `\hpstatement{}'
+\end{SideBySideExample}
+\end{addmargin}
+\bigskip
+
+\begin{addmargin}[1em]{0em}
+\begin{SideBySideExample}[xrightmargin=7cm]
+ The statement \hpnumber{H200}\\
+ is `\hpstatement{}'
+\end{SideBySideExample}
+\end{addmargin}
+\bigskip
+
+%\noindent The commands add text in your currently selected language.
+%\bigskip
+%
+%\begin{addmargin}[1em]{0em}
+%\begin{SideBySideExample}[xrightmargin=7cm]
+% \selectlanguage{ngerman}% babel
+% \hpnumber[formaldehyde]{EUH208}:
+% \hpstatement{}
+%\end{SideBySideExample}
+%\end{addmargin}
+%\bigskip
+
+\noindent Some phrases allow you to choose between certain alternatives. In
+these cases, special numbers (<number>.1, <number>.2, \textellipsis) are
+available. Of course, the official number is typeset. \bigskip
+
+\begin{addmargin}[1em]{0em}
+\begin{SideBySideExample}[xrightmargin=7cm]
+ \hpnumber{P210.2}:
+ \hpstatement{}
+\end{SideBySideExample}
+\end{addmargin}
+\bigskip
+
+\noindent For phrases with selection, an additional special number is provided
+that refers to the original version as stated in the regulations: <number>.0
+(e.\,g. P210.0).
+\bigskip
+
+\noindent Some statements refer to `this label'. If you are creating other
+documents than labels, you might want to rephrase this. You can do so, by using
+the <number>.nolabel statement (e.\,g. P321.nolabel).
+\bigskip
+
+\begin{annotation}\RaggedRight Sources for the H and P statements are:
+Regulation (EC) No 1272/2008 of the European Parliament and of the Council of 16
+December 2008 on classification, labelling and packaging of substances and
+mixtures, amending and repealing Directives 67/548/EEC and 1999/45/EC, and
+amending Regulation (EC) No
+1907/2006\footnote{\url{http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2008:353:0001:1355:EN:PDF}},
+a database with the extracted phrases, kindly provided by the author of
+schoolscout24.de\footnote{\url{http://schoolscout24.de/cgi-bin/hpp/hppinput.cgi}},
+Commission Regulation (EU) No 286/2011 of 10 March 2011 amending, for the
+purposes of its adaptation to technical and scientific progress, Regulation (EC)
+No 1272/2008 of the European Parliament and of the Council on classification,
+labelling and packaging of substances and
+mixtures\footnote{\url{http://new.eur-lex.europa.eu/legal-content/EN/TXT/?qid=1369907325497\&uri=CELEX:32011R0286}},
+and the manual creation of placeholder statements and proof-reading.
+
+Sources for the R and S phrases are documents downloaded from
+\url{http://europa.eu.int}\footnote{Previously to be found under
+\url{http://europa.eu.int/comm/environment/dansub/pdfs/annex3_en.pdf} and
+\url{http://europa.eu.int/comm/environment/dansub/pdfs/annex4_en.pdf} which in
+turn were linked from
+\url{http://europa.eu.int/comm/environment/dansub/main67_548/index_en.htm}}.
+\end{annotation}
+
+
+
+\appendix
+\chapter{Appendix}
+
+\section{List of Implemented H and P Statements}
+
+\newcommand\hpmanual[2]{\textbf{#1} (\hpnumber#2): \hpstatement#2}
+
+\subsection{English}
+\bigskip\bgroup\footnotesize
+\hpmanual{EUH001}{{EUH001}}
+\hpmanual{EUH006}{{EUH006}}
+\hpmanual{EUH014}{{EUH014}}
+\hpmanual{EUH018.0}{{EUH018.0}}
+\hpmanual{EUH018.1}{{EUH018.1}}
+\hpmanual{EUH018.2}{{EUH018.2}}
+\hpmanual{EUH019}{{EUH019}}
+\hpmanual{EUH029}{{EUH029}}
+\hpmanual{EUH031}{{EUH031}}
+\hpmanual{EUH032}{{EUH032}}
+\hpmanual{EUH044}{{EUH044}}
+\hpmanual{EUH059}{{EUH059}}
+\hpmanual{EUH066}{{EUH066}}
+\hpmanual{EUH070}{{EUH070}}
+\hpmanual{EUH071}{{EUH071}}
+\hpmanual{EUH201}{{EUH201}}
+\hpmanual{EUH201A}{{EUH201A}}
+\hpmanual{EUH202}{{EUH202}}
+\hpmanual{EUH203}{{EUH203}}
+\hpmanual{EUH204}{{EUH204}}
+\hpmanual{EUH205}{{EUH205}}
+\hpmanual{EUH206}{{EUH206}}
+\hpmanual{EUH207}{{EUH207}}
+\hpmanual{EUH208.0}{{EUH208.0}}
+\hpmanual{EUH208[a]}{[{[a]}]{EUH208}}
+\hpmanual{EUH209}{{EUH209}}
+\hpmanual{EUH209A}{{EUH209A}}
+\hpmanual{EUH210}{{EUH210}}
+\hpmanual{EUH401}{{EUH401}}
+\hpmanual{H200}{{H200}}
+\hpmanual{H201}{{H201}}
+\hpmanual{H202}{{H202}}
+\hpmanual{H203}{{H203}}
+\hpmanual{H204}{{H204}}
+\hpmanual{H205}{{H205}}
+\hpmanual{H220}{{H220}}
+\hpmanual{H221}{{H221}}
+\hpmanual{H222}{{H222}}
+\hpmanual{H223}{{H223}}
+\hpmanual{H224}{{H224}}
+\hpmanual{H225}{{H225}}
+\hpmanual{H226}{{H226}}
+\hpmanual{H228}{{H228}}
+\hpmanual{H240}{{H240}}
+\hpmanual{H241}{{H241}}
+\hpmanual{H242}{{H242}}
+\hpmanual{H250}{{H250}}
+\hpmanual{H251}{{H251}}
+\hpmanual{H252}{{H252}}
+\hpmanual{H260}{{H260}}
+\hpmanual{H261}{{H261}}
+\hpmanual{H270}{{H270}}
+\hpmanual{H271}{{H271}}
+\hpmanual{H272}{{H272}}
+\hpmanual{H280}{{H280}}
+\hpmanual{H281}{{H281}}
+\hpmanual{H290}{{H290}}
+\hpmanual{H300}{{H300}}
+\hpmanual{H301}{{H301}}
+\hpmanual{H302}{{H302}}
+\hpmanual{H304}{{H304}}
+\hpmanual{H310}{{H310}}
+\hpmanual{H311}{{H311}}
+\hpmanual{H312}{{H312}}
+\hpmanual{H314}{{H314}}
+\hpmanual{H315}{{H315}}
+\hpmanual{H317}{{H317}}
+\hpmanual{H318}{{H318}}
+\hpmanual{H319}{{H319}}
+\hpmanual{H330}{{H330}}
+\hpmanual{H331}{{H331}}
+\hpmanual{H332}{{H332}}
+\hpmanual{H334}{{H334}}
+\hpmanual{H335}{{H335}}
+\hpmanual{H336}{{H336}}
+\hpmanual{H340.0}{{H340.0}}
+\hpmanual{H340}{{H340}}
+\hpmanual{H340[a]}{[{[a]}]{H340}}
+\hpmanual{H341.0}{{H341.0}}
+\hpmanual{H341}{{H341}}
+\hpmanual{H341[a]}{[{[a]}]{H341}}
+\hpmanual{H350.0}{{H350.0}}
+\hpmanual{H350}{{H350}}
+\hpmanual{H350[a]}{[{[a]}]{H350}}
+\hpmanual{H350i}{{H350i}}
+\hpmanual{H351.0}{{H351.0}}
+\hpmanual{H351}{{H351}}
+\hpmanual{H351[a]}{[{[a]}]{H351}}
+\hpmanual{H360.0}{{H360.0}}
+\hpmanual{H360}{{H360}}
+\hpmanual{H360[a]}{[{[a]}]{H360}}
+\hpmanual{H360F}{{H360F}}
+\hpmanual{H360D}{{H360D}}
+\hpmanual{H360f}{{H360f}}
+\hpmanual{H360d}{{H360d}}
+\hpmanual{H360FD}{{H360FD}}
+\hpmanual{H360fd}{{H360fd}}
+\hpmanual{H360Fd}{{H360Fd}}
+\hpmanual{H360Df}{{H360Df}}
+\hpmanual{H361.0}{{H361.0}}
+\hpmanual{H361}{{H361}}
+\hpmanual{H361[a]}{[{[a]}]{H361}}
+\hpmanual{H362}{{H362}}
+\hpmanual{H370.0}{{H370.0}}
+\hpmanual{H370}{{H370}}
+\hpmanual{H370[a]}{[{[a]}]{H370}}
+\hpmanual{H370[a][b]}{[{[a]}][{[b]}]{H370}}
+\hpmanual{H371.0}{{H371.0}}
+\hpmanual{H371}{{H371}}
+\hpmanual{H371[a]}{[{[a]}]{H371}}
+\hpmanual{H371[a][b]}{[{[a]}][{[b]}]{H371}}
+\hpmanual{H372.0}{{H372.0}}
+\hpmanual{H372}{{H372}}
+\hpmanual{H372[a]}{[{[a]}]{H372}}
+\hpmanual{H372[a][b]}{[{[a]}][{[b]}]{H372}}
+\hpmanual{H373.0}{{H373.0}}
+\hpmanual{H373}{{H373}}
+\hpmanual{H373[a]}{[{[a]}]{H373}}
+\hpmanual{H373[a][b]}{[{[a]}][{[b]}]{H373}}
+\hpmanual{H300+H310}{{H300+H310}}
+\hpmanual{H300+H330}{{H300+H330}}
+\hpmanual{H310+H330}{{H310+H330}}
+\hpmanual{H300+H310+H330}{{H300+H310+H330}}
+\hpmanual{H301+H311}{{H301+H311}}
+\hpmanual{H301+H331}{{H301+H331}}
+\hpmanual{H311+H331}{{H311+H331}}
+\hpmanual{H301+H311+H331}{{H301+H311+H331}}
+\hpmanual{H302+H312}{{H302+H312}}
+\hpmanual{H302+H332}{{H302+H332}}
+\hpmanual{H312+H332}{{H312+H332}}
+\hpmanual{H301+H312+H332}{{H301+H312+H332}}
+\hpmanual{H400}{{H400}}
+\hpmanual{H410}{{H410}}
+\hpmanual{H411}{{H411}}
+\hpmanual{H412}{{H412}}
+\hpmanual{H413}{{H413}}
+\hpmanual{H420}{{H420}}
+\hpmanual{P101}{{P101}}
+\hpmanual{P101.nolabel[a]}{[{[a]}]{P101.nolabel}}
+\hpmanual{P102}{{P102}}
+\hpmanual{P103}{{P103}}
+\hpmanual{P103.nolabel[a]}{[{[a]}]{P103.nolabel}}
+\hpmanual{P201}{{P201}}
+\hpmanual{P202}{{P202}}
+\hpmanual{P210.0}{{P210.0}}
+\hpmanual{P210[a]}{[{[a]}]{P210}}
+\hpmanual{P210.1}{{P210.1}}
+\hpmanual{P210.2}{{P210.2}}
+\hpmanual{P210.3}{{P210.3}}
+\hpmanual{P210.4}{{P210.4}}
+\hpmanual{P211}{{P211}}
+\hpmanual{P220.0}{{P220.0}}
+\hpmanual{P220.1.0}{{P220.1.0}}
+\hpmanual{P220.1[a]}{[{[a]}]{P220.1}}
+\hpmanual{P220.1.1}{{P220.1.1}}
+\hpmanual{P220.1.2}{{P220.1.2}}
+\hpmanual{P220.2.0}{{P220.2.0}}
+\hpmanual{P220.2[a]}{[{[a]}]{P220.2}}
+\hpmanual{P220.2.1}{{P220.2.1}}
+\hpmanual{P220.2.2}{{P220.2.2}}
+\hpmanual{P221.0}{{P221.0}}
+\hpmanual{P221[a]}{[{[a]}]{P221}}
+\hpmanual{P221.1}{{P221.1}}
+\hpmanual{P222}{{P222}}
+\hpmanual{P223}{{P223}}
+\hpmanual{P230.0}{{P230.0}}
+\hpmanual{P230[a]}{[{[a]}]{P230}}
+\hpmanual{P231}{{P231}}
+\hpmanual{P231+P232}{{P231+P232}}
+\hpmanual{P232}{{P232}}
+\hpmanual{P233}{{P233}}
+\hpmanual{P234}{{P234}}
+\hpmanual{P235}{{P235}}
+\hpmanual{P235+P410}{{P235+P410}}
+\hpmanual{P240}{{P240}}
+\hpmanual{P241.0}{{P241.0}}
+\hpmanual{P241[a]}{[{[a]}]{P241}}
+\hpmanual{P241.1}{{P241.1}}
+\hpmanual{P241.2}{{P241.2}}
+\hpmanual{P241.3}{{P241.3}}
+\hpmanual{P242}{{P242}}
+\hpmanual{P243}{{P243}}
+\hpmanual{P244}{{P244}}
+\hpmanual{P250.0}{{P250.0}}
+\hpmanual{P250[a]}{[{[a]}]{P250}}
+\hpmanual{P250.1}{{P250.1}}
+\hpmanual{P250.2}{{P250.2}}
+\hpmanual{P250.3}{{P250.3}}
+\hpmanual{P251}{{P251}}
+\hpmanual{P260.0}{{P260.0}}
+\hpmanual{P260[a]}{[{[a]}]{P260}}
+\hpmanual{P260.1}{{P260.1}}
+\hpmanual{P260.2}{{P260.2}}
+\hpmanual{P260.3}{{P260.3}}
+\hpmanual{P260.4}{{P260.4}}
+\hpmanual{P260.5}{{P260.5}}
+\hpmanual{P260.6}{{P260.6}}
+\hpmanual{P261}{{P261}}
+\hpmanual{P262}{{P262}}
+\hpmanual{P263.0}{{P263.0}}
+\hpmanual{P263[a]}{[{[a]}]{P263}}
+\hpmanual{P263.1}{{P263.1}}
+\hpmanual{P263.2}{{P263.2}}
+\hpmanual{P264.0}{{P264.0}}
+\hpmanual{P264[a]}{[{[a]}]{P264}}
+\hpmanual{P270}{{P270}}
+\hpmanual{P271}{{P271}}
+\hpmanual{P272}{{P272}}
+\hpmanual{P273}{{P273}}
+\hpmanual{P280.0}{{P280.0}}
+\hpmanual{P280[a]}{[{[a]}]{P280}}
+\hpmanual{P280.1}{{P280.1}}
+\hpmanual{P280.2}{{P280.2}}
+\hpmanual{P280.3}{{P280.3}}
+\hpmanual{P280.4}{{P280.4}}
+\hpmanual{P281}{{P281}}
+\hpmanual{P282.0}{{P282.0}}
+\hpmanual{P282[a]}{[{[a]}]{P282}}
+\hpmanual{P282.1}{{P282.1}}
+\hpmanual{P282.2}{{P282.2}}
+\hpmanual{P282.3}{{P282.3}}
+\hpmanual{P283.0}{{P283.0}}
+\hpmanual{P283[a]}{[{[a]}]{P283}}
+\hpmanual{P284}{{P284}}
+\hpmanual{P285}{{P285}}
+\hpmanual{P301}{{P301}}
+\hpmanual{P301+P310}{{P301+P310}}
+\hpmanual{P301+P312}{{P301+P312}}
+\hpmanual{P301+P330+P331}{{P301+P330+P331}}
+\hpmanual{P302}{{P302}}
+\hpmanual{P302+P334.0}{{P302+P334.0}}
+\hpmanual{P302+P334[a]}{[{[a]}]{P302+P334}}
+\hpmanual{P302+P334.1}{{P302+P334.1}}
+\hpmanual{P302+P334.2}{{P302+P334.2}}
+\hpmanual{P302+P350}{{P302+P350}}
+\hpmanual{P302+P352}{{P302+P352}}
+\hpmanual{P303}{{P303}}
+\hpmanual{P303+P361+P353}{{P303+P361+P353}}
+\hpmanual{P304}{{P304}}
+\hpmanual{P304+P340}{{P304+P340}}
+\hpmanual{P304+P341}{{P304+P341}}
+\hpmanual{P305}{{P305}}
+\hpmanual{P305+P351+P338}{{P305+P351+P338}}
+\hpmanual{P306}{{P306}}
+\hpmanual{P306+P360}{{P306+P360}}
+\hpmanual{P307}{{P307}}
+\hpmanual{P307+P311}{{P307+P311}}
+\hpmanual{P308}{{P308}}
+\hpmanual{P308+P313}{{P308+P313}}
+\hpmanual{P309}{{P309}}
+\hpmanual{P309+P311}{{P309+P311}}
+\hpmanual{P310}{{P310}}
+\hpmanual{P311}{{P311}}
+\hpmanual{P312}{{P312}}
+\hpmanual{P313}{{P313}}
+\hpmanual{P314}{{P314}}
+\hpmanual{P315}{{P315}}
+\hpmanual{P320.0}{{P320.0}}
+\hpmanual{P320[a]}{[{[a]}]{P320}}
+\hpmanual{P320.nolabel[a]}{[{[a]}]{P320.nolabel}}
+\hpmanual{P321.0}{{P321.0}}
+\hpmanual{P321[a]}{[{[a]}]{P321}}
+\hpmanual{P321.nolabel[a]}{[{[a]}]{P321.nolabel}}
+\hpmanual{P322.0}{{P322.0}}
+\hpmanual{P322[a]}{[{[a]}]{P322}}
+\hpmanual{P322.nolabel[a]}{[{[a]}]{P322.nolabel}}
+\hpmanual{P330}{{P330}}
+\hpmanual{P331}{{P331}}
+\hpmanual{P332}{{P332}}
+\hpmanual{P332+P313}{{P332+P313}}
+\hpmanual{P333}{{P333}}
+\hpmanual{P333+P313}{{P333+P313}}
+\hpmanual{P334.0}{{P334.0}}
+\hpmanual{P334.1}{{P334.1}}
+\hpmanual{P334.2}{{P334.2}}
+\hpmanual{P335}{{P335}}
+\hpmanual{P335+P334.0}{{P335+P334.0}}
+\hpmanual{P335+P334.1}{{P335+P334.1}}
+\hpmanual{P335+P334.2}{{P335+P334.2}}
+\hpmanual{P336}{{P336}}
+\hpmanual{P337}{{P337}}
+\hpmanual{P337+P313}{{P337+P313}}
+\hpmanual{P338}{{P338}}
+\hpmanual{P340}{{P340}}
+\hpmanual{P341}{{P341}}
+\hpmanual{P342}{{P342}}
+\hpmanual{P342+P311}{{P342+P311}}
+\hpmanual{P350}{{P350}}
+\hpmanual{P351}{{P351}}
+\hpmanual{P352}{{P352}}
+\hpmanual{P353}{{P353}}
+\hpmanual{P360}{{P360}}
+\hpmanual{P361}{{P361}}
+\hpmanual{P362}{{P362}}
+\hpmanual{P363}{{P363}}
+\hpmanual{P370}{{P370}}
+\hpmanual{P370+P376}{{P370+P376}}
+\hpmanual{P370+P378.0}{{P370+P378.0}}
+\hpmanual{P370+P378[a]}{[{[a]}]{P370+P378}}
+\hpmanual{P370+P380}{{P370+P380}}
+\hpmanual{P370+P380+P375}{{P370+P380+P375}}
+\hpmanual{P371}{{P371}}
+\hpmanual{P371+P380+P375}{{P371+P380+P375}}
+\hpmanual{P372}{{P372}}
+\hpmanual{P373}{{P373}}
+\hpmanual{P374}{{P374}}
+\hpmanual{P375}{{P375}}
+\hpmanual{P376}{{P376}}
+\hpmanual{P377}{{P377}}
+\hpmanual{P378.0}{{P378.0}}
+\hpmanual{P378[a]}{[{[a]}]{P378}}
+\hpmanual{P380}{{P380}}
+\hpmanual{P381}{{P381}}
+\hpmanual{P390}{{P390}}
+\hpmanual{P391}{{P391}}
+\hpmanual{P401.0}{{P401.0}}
+\hpmanual{P401[a]}{[{[a]}]{P401}}
+\hpmanual{P402}{{P402}}
+\hpmanual{P402+P404}{{P402+P404}}
+\hpmanual{P403}{{P403}}
+\hpmanual{P403+P233}{{P403+P233}}
+\hpmanual{P403+P235}{{P403+P235}}
+\hpmanual{P404}{{P404}}
+\hpmanual{P405}{{P405}}
+\hpmanual{P406.0}{{P406.0}}
+\hpmanual{P406[a]}{[{[a]}]{P406}}
+\hpmanual{P406.1}{{P406.1}}
+\hpmanual{P407}{{P407}}
+\hpmanual{P410}{{P410}}
+\hpmanual{P410+P403}{{P410+P403}}
+\hpmanual{P410+P412}{{P410+P412}}
+\hpmanual{P411}{{P411}}
+\hpmanual{P411+P235}{{P411+P235}}
+\hpmanual{P412}{{P412}}
+\hpmanual{P413.0}{{P413.0}}
+\hpmanual{P413.1[a][b]}{[{[a]}][{[b]}]{P413.1}}
+\hpmanual{P413.2[a][b]}{[{[a]}][{[b]}]{P413.2}}
+\hpmanual{P420}{{P420}}
+\hpmanual{P422.0}{{P422.0}}
+\hpmanual{P422[a]}{[{[a]}]{P422}}
+\hpmanual{P501.0.0}{{P501.0.0}}
+\hpmanual{P501.0[a]}{[{[a]}]{P501.0}}
+\hpmanual{P501.1.0}{{P501.1.0}}
+\hpmanual{P501.1[a]}{[{[a]}]{P501.1}}
+\hpmanual{P501.2.0}{{P501.2.0}}
+\hpmanual{P501.2[a]}{[{[a]}]{P501.2}}
+\par\egroup
+
+
+\section{List of Implemented R and S Phrases}
+
+\newenvironment{RandS}{\bigskip\bgroup\footnotesize\noindent}{\par\egroup}
+\newcommand{\rs}[2][]{\textbf{\rsnumber[#1]{#2}}: \rsphrase{}}
+\newcommand{\rsskip}{\par\medskip}
+\newcommand{\rsallphrases}[1][]{
+ \par
+ \begin{RandS}
+ \rs{R1}
+ \rs{R2}
+ \rs{R3}
+ \rs{R4}
+ \rs{R5}
+ \rs{R6}
+ \rs{R7}
+ \rs{R8}
+ \rs{R9}
+ \rs{R10}
+ \rs{R11}
+ \rs{R12}
+ \rs{R14}
+ \rs{R15}
+ \rs{R16}
+ \rs{R17}
+ \rs{R18}
+ \rs{R19}
+ \rs{R20}
+ \rs{R21}
+ \rs{R22}
+ \rs{R23}
+ \rs{R24}
+ \rs{R25}
+ \rs{R26}
+ \rs{R27}
+ \rs{R28}
+ \rs{R29}
+ \rs{R30}
+ \rs{R31}
+ \rs{R32}
+ \rs{R33}
+ \rs{R34}
+ \rs{R35}
+ \rs{R36}
+ \rs{R37}
+ \rs{R38}
+ \rs{R39}
+ \rs{R40}
+ \rs{R41}
+ \rs{R42}
+ \rs{R43}
+ \rs{R44}
+ \rs{R45}
+ \rs{R46}
+ \rs{R48}
+ \rs{R49}
+ \rs{R50}
+ \rs{R51}
+ \rs{R52}
+ \rs{R53}
+ \rs{R54}
+ \rs{R55}
+ \rs{R56}
+ \rs{R57}
+ \rs{R58}
+ \rs{R59}
+ \rs{R60}
+ \rs{R61}
+ \rs{R62}
+ \rs{R63}
+ \rs{R64}
+ \rs{R65}
+ \rs{R66}
+ \rs{R67}
+ \rs{R68}
+ \rs{R14/15}
+ \rs{R15/29}
+ \rs{R20/21}
+ \rs{R20/22}
+ \rs{R20/21/22}
+ \rs{R21/22}
+ \rs{R23/24}
+ \rs{R23/25}
+ \rs{R23/24/25}
+ \rs{R24/25}
+ \rs{R26/27}
+ \rs{R26/28}
+ \rs{R26/27/28}
+ \rs{R27/28}
+ \rs{R36/37}
+ \rs{R36/38}
+ \rs{R36/37/38}
+ \rs{R37/38}
+ \rs{R39/23}
+ \rs{R39/24}
+ \rs{R39/25}
+ \rs{R39/23/24}
+ \rs{R39/23/25}
+ \rs{R39/24/25}
+ \rs{R39/23/24/25}
+ \rs{R39/26}
+ \rs{R39/27}
+ \rs{R39/28}
+ \rs{R39/26/27}
+ \rs{R39/26/28}
+ \rs{R39/27/28}
+ \rs{R39/26/27/28}
+ \rs{R42/43}
+ \rs{R48/20}
+ \rs{R48/21}
+ \rs{R48/22}
+ \rs{R48/20/21}
+ \rs{R48/20/22}
+ \rs{R48/21/22}
+ \rs{R48/20/21/22}
+ \rs{R48/23}
+ \rs{R48/24}
+ \rs{R48/25}
+ \rs{R48/23/24}
+ \rs{R48/23/25}
+ \rs{R48/24/25}
+ \rs{R48/23/24/25}
+ \rs{R50/53}
+ \rs{R51/53}
+ \rs{R52/53}
+ \rs{R68/20}
+ \rs{R68/21}
+ \rs{R68/22}
+ \rs{R68/20/21}
+ \rs{R68/20/22}
+ \rs{R68/21/22}
+ \rs{R68/20/21/22}
+ \rsskip
+ \rs{S1}
+ \rs{S2}
+ \rs{S3}
+ \rs{S4}
+ \rs[\ldots]{S5}
+ \rs[\ldots]{S6}
+ \rs{S7}
+ \rs{S8}
+ \rs{S9}
+ \rs{S12}
+ \rs{S13}
+ \rs[\ldots]{S14}
+ \rs{S15}
+ \rs{S16}
+ \rs{S17}
+ \rs{S18}
+ \rs{S20}
+ \rs{S21}
+ \rs{S22}
+ \rs[\ldots]{S23}
+ \rs{S23.0}
+ \rs{S23.1}
+ \rs{S23.2}
+ \rs{S23.3}
+ \rs{S23.4}
+ \rs{S24}
+ \rs{S25}
+ \rs{S26}
+ \rs{S27}
+ \rs[\ldots]{S28}
+ \rs{S29}
+ \rs{S30}
+ \rs{S33}
+ \rs{S35}
+ \rs{S36}
+ \rs{S37}
+ \rs{S38}
+ \rs{S39}
+ \rs[\ldots]{S40}
+ \rs{S41}
+ \ifthenelse{\equal{#1}{}}
+ {\rs{S42}}
+ {\rs{S42.0}\rs{S42.1}\rs{S42.2}}
+ \rs[\ldots]{S43.0}
+ \rs[\ldots]{S43.1}
+ \rs{S45}
+ \rs[\ldots]{S46}
+ \rs[\ldots]{S47}
+ \rs[\ldots]{S48}
+ \rs{S49}
+ \rs[\ldots]{S50}
+ \rs{S51}
+ \rs{S52}
+ \rs{S53}
+ \rs{S56}
+ \rs{S57}
+ \rs{S59}
+ \rs{S60}
+ \rs{S61}
+ \rs[\ldots]{S62}
+ \rs{S63}
+ \rs{S64}
+ \rs{S1/2}
+ \rs{S3/7}
+ \rs[\ldots]{S3/9/14}
+ \rs[\ldots]{S3/9/14/49}
+ \rs[\ldots]{S3/9/49}
+ \rs[\ldots]{S3/14}
+ \rs{S7/8}
+ \rs{S7/9}
+ \rs[\ldots]{S7/47}
+ \rs{S20/21}
+ \rs{S24/25}
+ \rs[\ldots]{S27/28}
+ \rs{S29/35}
+ \rs{S29/56}
+ \rs{S36/37}
+ \rs[\ldots]{S36/37/39}
+ \rs[\ldots]{S36/39}
+ \rs{S37/39}
+ \rs[\ldots]{S47/49}
+ \end{RandS}
+}
+
+\subsection{English}
+The official phrases are given in American English. These phrases are typeset when the current Babel language is either set to \verb|english|, \verb|USenglish|, \verb|american|, \verb|UKenglish| or \verb|british|.
+\rsallphrases
+\selectlanguage{UKenglish}
+
+\subsection{Danish}
+Thanks to the extensive help of Rasmus Villemoes, the Danish phrases could be included. There were a couple typos in the official documents: We changed `bebølse' to `beboelse', `omgåænde' to `omgående' and `producentesn' to `producenten'.
+\selectlanguage{danish}
+\rsallphrases
+\selectlanguage{UKenglish}
+
+\subsection{French}
+Dominique Richard helped with the French phrases. Many thanks to him!
+\selectlanguage{french}
+\rsallphrases
+\selectlanguage{UKenglish}
+
+\subsection{German}
+I adapted the German R and S Phrases to the current (`new') spelling. Therefore, when writing a text in \verb|german| and using rsphrase, you will get a warning (`Your current language setting is german, rsphrase only knows the current German spelling (ngerman) which therefore was used.').
+\selectlanguage{ngerman}
+\rsallphrases
+\selectlanguage{UKenglish}
+
+\subsection{Italian}
+Italian phrases implemented by Lorenzo Vagnarelli. Copy-and-paste-ready. Thanks a lot.
+\selectlanguage{italian}
+\rsallphrases
+\selectlanguage{UKenglish}
+
+\subsection{Spanish}
+Ignacio Fernández Galván sent me the Spanish phrases copy-and-paste-ready. What a surprise! I was done in five minutes. Thanks a lot!
+\selectlanguage{spanish}
+\rsallphrases[alt42]
+\selectlanguage{UKenglish}
+
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/mhchem/hpstatement.sty b/Master/texmf-dist/tex/latex/mhchem/hpstatement.sty
new file mode 100644
index 00000000000..b800b17782b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mhchem/hpstatement.sty
@@ -0,0 +1,547 @@
+%% hpstatement.sty
+%% Copyright 2004-2013 Martin Hensel
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License version 1.3c
+% which is included as lppl-1-3c.txt.
+%
+% This work has the LPPL maintenance status "maintained".
+% The Current Maintainer of this work is Martin Hensel.
+%
+% ( In order to fight spam, the maintainer's contact )
+% ( information is "encrypted" with ROT13. )
+% ( If you do not know ROT13 yet and have no tool for )
+% ( decryption, simply do an Internet search for "ROT13". )
+%
+% ,---[ ROT 13 ]---
+% | Gur Pheerag Znvagnvare bs guvf jbex vf Znegva Urafry
+% | jub pna or pbagnpgrq ivn
+% | zupurz@ZnegvaUrafry.qr
+% | be ivn znvy
+% | Znegva Urafry
+% | Cbfgfge. 20
+% | 09232 Unegznaafqbes
+% | Treznal
+% `----------
+%
+% This work consists of all files listed in manifest.txt.
+%
+%
+% Sources for the H and P statements are:
+%
+% - Regulation (EC) No 1272/2008 of the European Parliament and of the
+% Council of 16 December 2008 on classification, labelling and
+% packaging of substances and mixtures, amending and repealing
+% Directives 67/548/EEC and 1999/45/EC, and amending Regulation (EC)
+% No 1907/2006
+% http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2008:353:0001:1355:EN:PDF
+%
+% - a database with the extracted phrases, kindly provided by the author
+% of http://schoolscout24.de/cgi-bin/hpp/hppinput.cgi
+%
+% - Commission Regulation (EU) No 286/2011 of 10 March 2011 amending,
+% for the purposes of its adaptation to technical and scientific
+% progress, Regulation (EC) No 1272/2008 of the European Parliament
+% and of the Council on classification, labelling and packaging of
+% substances and mixtures
+% http://new.eur-lex.europa.eu/legal-content/EN/TXT/?qid=1369907325497\&uri=CELEX:32011R0286
+%
+% The statements themselves therefore are not subject to the LPPL.
+%
+%
+\ProvidesPackage{hpstatement}[2013/06/17 v1.00 H and P statements (mhchem bundle)]
+\RequirePackage{twoopt}
+\RequirePackage{ifthen}
+\RequirePackage{textcomp}
+
+\def\mhchem@hp@number{\PackageError{hpstatement}{%
+ You have to specify an H or P statement number\MessageBreak%
+ when you use \string\hpnumber\space for the first time\MessageBreak%
+ (e.g. \string\hpnumber{H200})}{}}
+\def\mhchem@hp@statement{\PackageError{hpstatement}{%
+ You have to specify an H or P statement number\MessageBreak%
+ when you use \string\hpstatement\space for the first time\MessageBreak%
+ (e.g. \string\hpstatement{H200})}{}}
+
+\newcommand*\mhchem@hp@iflanguagename[1]{%- from Heiko Oberdiek and Markus Kohm in de.comp.text.tex
+ \begingroup
+ \edef\x{#1}%
+ \ifnum\language=0
+ \def\y{english}%
+ \else
+ \edef\y{\languagename}%
+ \fi
+ \@onelevel@sanitize\x
+ \@onelevel@sanitize\y
+ \expandafter\endgroup
+ \ifx\x\y
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+
+\newcommandtwoopt*\hpnumber[3][][]{% #1,#2 optional statement parameters, #3 statement number
+ \ifthenelse{\equal{#3}{}}{%
+ }{%
+ \mhchem@hp@main[{#1}][{#2}]{#3}%
+ }%
+ \mhchem@hp@number%
+}
+
+\newcommandtwoopt*\hpstatement[3][][]{% #1,#2 optional statement parameters, #3 statement number
+ \ifthenelse{\equal{#3}{}}{%
+ }{%
+ \mhchem@hp@main[{#1}][{#2}]{#3}%
+ }%
+ \mhchem@hp@statement%
+}
+
+% populates hp@statement and hp@number
+\newcommandtwoopt*\mhchem@hp@main[3][][]{% #1,#2 optional statement parameters, #3 statement number
+ \def\mhchem@hp@arguments{error}%
+ \ifthenelse{\equal{#1}{}}{%
+ \def\mhchem@hp@arguments{0}%
+ }{%
+ \ifthenelse{\equal{#2}{}}{%
+ \def\mhchem@hp@arguments{1}%
+ }{%
+ \def\mhchem@hp@arguments{2}%
+ }%
+ }%
+ %
+ \let\mhchem@hp@statement\relax%
+ \mhchem@hp@main@i{#1}{#2}{#3-\mhchem@hp@arguments}%
+ \ifx\relax\mhchem@hp@statement%
+ \mhchem@hp@main@i{#1}{#2}{#3-error}%
+ \ifx\relax\mhchem@hp@statement%
+ \gdef\mhchem@hp@statement{%
+ \PackageError{hpstatement}{H or P statement "#3"\MessageBreak%
+ is not defined}{}%
+ }%
+ \fi%
+ \fi%
+ \ifthenelse{\equal{\mhchem@hp@statement}{}}{%
+ \gdef\mhchem@hp@statement{%
+ \PackageError{hpstatement}{H or P statement "#3"\MessageBreak%
+ is not defined for your language}{}%
+ }%
+ }{}%
+}
+\newcommand*\mhchem@hp@main@i[3]{%
+ \mhchem@hp@iflanguagename{english}{\mhchem@hp@data@english{#1}{#2}{#3}}{%
+ \mhchem@hp@iflanguagename{USenglish}{\mhchem@hp@data@english{#1}{#2}{#3}}{%
+ \mhchem@hp@iflanguagename{american}{\mhchem@hp@data@english{#1}{#2}{#3}}{%
+ \mhchem@hp@iflanguagename{UKenglish}{\mhchem@hp@data@english{#1}{#2}{#3}}{%
+ \mhchem@hp@iflanguagename{british}{\mhchem@hp@data@english{#1}{#2}{#3}}{%
+ }}}}}%
+}
+
+\newcommand*\mhchem@hp@ii[4]{%
+% #1 number to look for, entered by USER + arguments
+% #2 number to compare to, e.g. P230.1-1
+% #3 formatted number to output
+% #4 text (or error message)
+ \ifthenelse{\equal{#1}{#2}}{% if input number corresponds to entry
+ \gdef\mhchem@hp@number{#3}% set number
+ \gdef\mhchem@hp@statement{#4}% set statement
+ }{}%
+}
+
+\newcommand*\mhchem@hp@data@english[3]{%
+\mhchem@hp@ii{#3}{EUH001-0}{EUH001}{Explosive when dry.}%
+\mhchem@hp@ii{#3}{EUH006-0}{EUH006}{Explosive with or without contact with air.}%
+\mhchem@hp@ii{#3}{EUH014-0}{EUH014}{Reacts violently with water.}%
+\mhchem@hp@ii{#3}{EUH018.0-0}{EUH018}{In use may form flammable/explosive vapour-air mixture.}%
+\mhchem@hp@ii{#3}{EUH018-error}{EUH018}{\PackageError{hpstatement}{Selection missing.\MessageBreak This statement requires a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{EUH018.1-0}{EUH018}{In use may form flammable vapour-air mixture.}%
+\mhchem@hp@ii{#3}{EUH018.2-0}{EUH018}{In use may form explosive vapour-air mixture.}%
+\mhchem@hp@ii{#3}{EUH019-0}{EUH019}{May form explosive peroxides.}%
+\mhchem@hp@ii{#3}{EUH029-0}{EUH029}{Contact with water liberates toxic gas.}%
+\mhchem@hp@ii{#3}{EUH031-0}{EUH031}{Contact with acids liberates toxic gas.}%
+\mhchem@hp@ii{#3}{EUH032-0}{EUH032}{Contact with acids liberates very toxic gas.}%
+\mhchem@hp@ii{#3}{EUH044-0}{EUH044}{Risk of explosion if heated under confinement.}%
+\mhchem@hp@ii{#3}{EUH059-0}{EUH059}{Hazardous to the ozone layer.}%
+\mhchem@hp@ii{#3}{EUH066-0}{EUH066}{Repeated exposure may cause skin dryness or cracking.}%
+\mhchem@hp@ii{#3}{EUH070-0}{EUH070}{Toxic by eye contact.}%
+\mhchem@hp@ii{#3}{EUH071-0}{EUH071}{Corrosive to the respiratory tract.}%
+\mhchem@hp@ii{#3}{EUH201-0}{EUH201}{Contains lead. Should not be used on surfaces liable to be chewed or sucked by children.}%
+\mhchem@hp@ii{#3}{EUH201A-0}{EUH201A}{Warning! Contains lead.}%
+\mhchem@hp@ii{#3}{EUH202-0}{EUH202}{Cyanoacrylate. Danger. Bonds skin and eyes in seconds. Keep out of the reach of children.}%
+\mhchem@hp@ii{#3}{EUH203-0}{EUH203}{Contains chromium (VI). May produce an allergic reaction.}%
+\mhchem@hp@ii{#3}{EUH204-0}{EUH204}{Contains isocyanates. May produce an allergic reaction.}%
+\mhchem@hp@ii{#3}{EUH205-0}{EUH205}{Contains epoxy constituents. May produce an allergic reaction.}%
+\mhchem@hp@ii{#3}{EUH206-0}{EUH206}{Warning! Do not use together with other products. May release dangerous gases (chlorine).}%
+\mhchem@hp@ii{#3}{EUH207-0}{EUH207}{Warning! Contains cadmium. Dangerous fumes are formed during use. See information supplied by the manufacturer. Comply with the safety instructions.}%
+\mhchem@hp@ii{#3}{EUH208.0-0}{EUH208}{Contains \textless{}name of sensitising substance\textgreater{}. May produce an allergic reaction.}%
+\mhchem@hp@ii{#3}{EUH208-error}{EUH208}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{EUH208-1}{EUH208}{Contains #1. May produce an allergic reaction.}%
+\mhchem@hp@ii{#3}{EUH209-0}{EUH209}{Can become highly flammable in use.}%
+\mhchem@hp@ii{#3}{EUH209A-0}{EUH209A}{Can become flammable in use.}%
+\mhchem@hp@ii{#3}{EUH210-0}{EUH210}{Safety data sheet available on request.}%
+\mhchem@hp@ii{#3}{EUH401-0}{EUH401}{To avoid risks to human health and the environment, comply with the instructions for use.}%
+\mhchem@hp@ii{#3}{H200-0}{H200}{Unstable explosives.}%
+\mhchem@hp@ii{#3}{H201-0}{H201}{Explosive; mass explosion hazard.}%
+\mhchem@hp@ii{#3}{H202-0}{H202}{Explosive, severe projection hazard.}%
+\mhchem@hp@ii{#3}{H203-0}{H203}{Explosive; fire, blast or projection hazard.}%
+\mhchem@hp@ii{#3}{H204-0}{H204}{Fire or projection hazard.}%
+\mhchem@hp@ii{#3}{H205-0}{H205}{May mass explode in fire.}%
+\mhchem@hp@ii{#3}{H220-0}{H220}{Extremely flammable gas.}%
+\mhchem@hp@ii{#3}{H221-0}{H221}{Flammable gas.}%
+\mhchem@hp@ii{#3}{H222-0}{H222}{Extremely flammable aerosol.}%
+\mhchem@hp@ii{#3}{H223-0}{H223}{Flammable aerosol.}%
+\mhchem@hp@ii{#3}{H224-0}{H224}{Extremely flammable liquid and vapour.}%
+\mhchem@hp@ii{#3}{H225-0}{H225}{Highly flammable liquid and vapour.}%
+\mhchem@hp@ii{#3}{H226-0}{H226}{Flammable liquid and vapour.}%
+\mhchem@hp@ii{#3}{H228-0}{H228}{Flammable solid.}%
+\mhchem@hp@ii{#3}{H240-0}{H240}{Heating may cause an explosion.}%
+\mhchem@hp@ii{#3}{H241-0}{H241}{Heating may cause a fire or explosion.}%
+\mhchem@hp@ii{#3}{H242-0}{H242}{Heating may cause a fire.}%
+\mhchem@hp@ii{#3}{H250-0}{H250}{Catches fire spontaneously if exposed to air.}%
+\mhchem@hp@ii{#3}{H251-0}{H251}{Self-heating: may catch fire.}%
+\mhchem@hp@ii{#3}{H252-0}{H252}{Self-heating in large quantities; may catch fire.}%
+\mhchem@hp@ii{#3}{H260-0}{H260}{In contact with water releases flammable gases which may ignite spontaneously.}%
+\mhchem@hp@ii{#3}{H261-0}{H261}{In contact with water releases flammable gases.}%
+\mhchem@hp@ii{#3}{H270-0}{H270}{May cause or intensify fire; oxidiser.}%
+\mhchem@hp@ii{#3}{H271-0}{H271}{May cause fire or explosion; strong oxidiser.}%
+\mhchem@hp@ii{#3}{H272-0}{H272}{May intensify fire; oxidiser.}%
+\mhchem@hp@ii{#3}{H280-0}{H280}{Contains gas under pressure; may explode if heated.}%
+\mhchem@hp@ii{#3}{H281-0}{H281}{Contains refrigerated gas; may cause cryogenic burns or injury.}%
+\mhchem@hp@ii{#3}{H290-0}{H290}{May be corrosive to metals.}%
+\mhchem@hp@ii{#3}{H300-0}{H300}{Fatal if swallowed.}%
+\mhchem@hp@ii{#3}{H301-0}{H301}{Toxic if swallowed.}%
+\mhchem@hp@ii{#3}{H302-0}{H302}{Harmful if swallowed.}%
+\mhchem@hp@ii{#3}{H304-0}{H304}{May be fatal if swallowed and enters airways.}%
+\mhchem@hp@ii{#3}{H310-0}{H310}{Fatal in contact with skin.}%
+\mhchem@hp@ii{#3}{H311-0}{H311}{Toxic in contact with skin.}%
+\mhchem@hp@ii{#3}{H312-0}{H312}{Harmful in contact with skin.}%
+\mhchem@hp@ii{#3}{H314-0}{H314}{Causes severe skin burns and eye damage.}%
+\mhchem@hp@ii{#3}{H315-0}{H315}{Causes skin irritation.}%
+\mhchem@hp@ii{#3}{H317-0}{H317}{May cause an allergic skin reaction.}%
+\mhchem@hp@ii{#3}{H318-0}{H318}{Causes serious eye damage.}%
+\mhchem@hp@ii{#3}{H319-0}{H319}{Causes serious eye irritation.}%
+\mhchem@hp@ii{#3}{H330-0}{H330}{Fatal if inhaled.}%
+\mhchem@hp@ii{#3}{H331-0}{H331}{Toxic if inhaled.}%
+\mhchem@hp@ii{#3}{H332-0}{H332}{Harmful if inhaled.}%
+\mhchem@hp@ii{#3}{H334-0}{H334}{May cause allergy or asthma symptoms or breathing difficulties if inhaled.}%
+\mhchem@hp@ii{#3}{H335-0}{H335}{May cause respiratory irritation.}%
+\mhchem@hp@ii{#3}{H336-0}{H336}{May cause drowsiness or dizziness.}%
+\mhchem@hp@ii{#3}{H340.0-0}{H340}{May cause genetic defects \textless{}state route of exposure if it is conclusively proven that no other routes of exposure cause the hazard\textgreater{}.}%
+\mhchem@hp@ii{#3}{H340-error}{H340}{\PackageError{hpstatement}{Too many arguments.\MessageBreak This statement has an optional text argument.\MessageBreak Please use no argument or exactly one with [].\MessageBreak Or use <number>.0 for the original form}{}}%
+\mhchem@hp@ii{#3}{H340-0}{H340}{May cause genetic defects.}%
+\mhchem@hp@ii{#3}{H340-1}{H340}{May cause genetic defects #1.}%
+\mhchem@hp@ii{#3}{H341.0-0}{H341}{Suspected of causing genetic defects \textless{}state route of exposure if it is conclusively proven that no other routes of exposure cause the hazard\textgreater{}.}%
+\mhchem@hp@ii{#3}{H341-error}{H341}{\PackageError{hpstatement}{Too many arguments.\MessageBreak This statement has an optional text argument.\MessageBreak Please use no argument or exactly one with [].\MessageBreak Or use <number>.0 for the original form}{}}%
+\mhchem@hp@ii{#3}{H341-0}{H341}{Suspected of causing genetic defects.}%
+\mhchem@hp@ii{#3}{H341-1}{H341}{Suspected of causing genetic defects #1.}%
+\mhchem@hp@ii{#3}{H350.0-0}{H350}{May cause cancer \textless{}state route of exposure if it is conclusively proven that no other routes of exposure cause the hazard\textgreater{}.}%
+\mhchem@hp@ii{#3}{H350-error}{H350}{\PackageError{hpstatement}{Too many arguments.\MessageBreak This statement has an optional text argument.\MessageBreak Please use no argument or exactly one with [].\MessageBreak Or use <number>.0 for the original form}{}}%
+\mhchem@hp@ii{#3}{H350-0}{H350}{May cause cancer.}%
+\mhchem@hp@ii{#3}{H350-1}{H350}{May cause cancer #1.}%
+\mhchem@hp@ii{#3}{H350i-0}{H350i}{May cause cancer by inhalation.}%
+\mhchem@hp@ii{#3}{H351.0-0}{H351}{Suspected of causing cancer \textless{}state route of exposure if it is conclusively proven that no other routs of exposure cause the hazard\textgreater{}.}%
+\mhchem@hp@ii{#3}{H351-error}{H351}{\PackageError{hpstatement}{Too many arguments.\MessageBreak This statement has an optional text argument.\MessageBreak Please use no argument or exactly one with [].\MessageBreak Or use <number>.0 for the original form}{}}%
+\mhchem@hp@ii{#3}{H351-0}{H351}{Suspected of causing cancer.}%
+\mhchem@hp@ii{#3}{H351-1}{H351}{Suspected of causing cancer #1.}%
+\mhchem@hp@ii{#3}{H360.0-0}{H360}{May damage fertility or the unborn child \textless{}state specific effect if known \textgreater{} \textless{}state route of exposure if it is conclusively proven that no other routes of exposure cause the hazard\textgreater{}.}%
+\mhchem@hp@ii{#3}{H360-error}{H360}{\PackageError{hpstatement}{Too many arguments.\MessageBreak This statement has an optional text argument.\MessageBreak Please use no argument or exactly one with [].\MessageBreak Or use <number>.0 for the original form}{}}%
+\mhchem@hp@ii{#3}{H360-0}{H360}{May damage fertility or the unborn child.}%
+\mhchem@hp@ii{#3}{H360-1}{H360}{May damage fertility or the unborn child #1.}%
+\mhchem@hp@ii{#3}{H360F-0}{H360F}{May damage fertility.}%
+\mhchem@hp@ii{#3}{H360D-0}{H360D}{May damage the unborn child.}%
+\mhchem@hp@ii{#3}{H360f-0}{H360f}{Suspected of damaging fertility.}%
+\mhchem@hp@ii{#3}{H360d-0}{H360d}{Suspected of damaging the unborn child.}%
+\mhchem@hp@ii{#3}{H360FD-0}{H360FD}{May damage fertility. May damage the unborn child.}%
+\mhchem@hp@ii{#3}{H360fd-0}{H360fd}{Suspected of damaging fertility. Suspected of damaging the unborn child.}%
+\mhchem@hp@ii{#3}{H360Fd-0}{H360Fd}{May damage fertility. Suspected of damaging the unborn child.}%
+\mhchem@hp@ii{#3}{H360Df-0}{H360Df}{May damage the unborn child. Suspected of damaging fertility.}%
+\mhchem@hp@ii{#3}{H361.0-0}{H361}{Suspected of damaging fertility or the unborn child \textless{}state specific effect if known\textgreater{} \textless{}state route of exposure if it is conclusively proven that no other routes of exposure cause the hazard\textgreater{}.}%
+\mhchem@hp@ii{#3}{H361-error}{H361}{\PackageError{hpstatement}{Too many arguments.\MessageBreak This statement has an optional text argument.\MessageBreak Please use no argument or exactly one with [].\MessageBreak Or use <number>.0 for the original form}{}}%
+\mhchem@hp@ii{#3}{H361-0}{H361}{Suspected of damaging fertility or the unborn child.}%
+\mhchem@hp@ii{#3}{H361-1}{H361}{Suspected of damaging fertility or the unborn child #1.}%
+\mhchem@hp@ii{#3}{H362-0}{H362}{May cause harm to breast-fed children.}%
+\mhchem@hp@ii{#3}{H370.0-0}{H370}{Causes damage to organs \textless{}or state all organs affected, if known\textgreater{} \textless{}state route of exposure if it is conclusively proven that no other routes of exposure cause the hazard\textgreater{}.}%
+\mhchem@hp@ii{#3}{H370-error}{H370}{\PackageError{hpstatement}{This statement has two optional text arguments.\MessageBreak Please specify them with [][]. Or append .0\MessageBreak to the number for the original form}{}}%
+\mhchem@hp@ii{#3}{H370-0}{H370}{Causes damage to organs.}%
+\mhchem@hp@ii{#3}{H370-1}{H370}{Causes damage to #1.}%
+\mhchem@hp@ii{#3}{H370-2}{H370}{Causes damage to #1 #2.}%
+\mhchem@hp@ii{#3}{H371.0-0}{H371}{May cause damage to organs \textless{}or state all organs affected, if known\textgreater{} \textless{}state route of exposure if it is conclusively proven that no other routes of exposure cause the hazard\textgreater{}.}%
+\mhchem@hp@ii{#3}{H371-error}{H371}{\PackageError{hpstatement}{This statement has two optional text arguments.\MessageBreak Please specify them with [][]. Or append .0\MessageBreak to the number for the original form}{}}%
+\mhchem@hp@ii{#3}{H371-0}{H371}{May cause damage to organs.}%
+\mhchem@hp@ii{#3}{H371-1}{H371}{May cause damage to #1.}%
+\mhchem@hp@ii{#3}{H371-2}{H371}{May cause damage to #1 #2.}%
+\mhchem@hp@ii{#3}{H372.0-0}{H372}{Causes damage to organs \textless{}or state all organs affected, if known\textgreater{} through prolonged or repeated exposure \textless{}state route of exposure if it is conclusively proven that no other routes of exposure cause the hazard\textgreater{}.}%
+\mhchem@hp@ii{#3}{H372-error}{H372}{\PackageError{hpstatement}{This statement has two optional text arguments.\MessageBreak Please specify them with [][]. Or append .0\MessageBreak to the number for the original form}{}}%
+\mhchem@hp@ii{#3}{H372-0}{H372}{Causes damage to organs through prolonged or repeated exposure.}%
+\mhchem@hp@ii{#3}{H372-1}{H372}{Causes damage to #1 through prolonged or repeated exposure.}%
+\mhchem@hp@ii{#3}{H372-2}{H372}{Causes damage to #1 through prolonged or repeated exposure #2.}%
+\mhchem@hp@ii{#3}{H373.0-0}{H373}{May cause damage to organs \textless{}or state all organs affected, if known\textgreater{} through prolonged or repeated exposure \textless{}state route of exposure if it is conclusively proven that no other routes of exposure cause the hazard\textgreater{}.}%
+\mhchem@hp@ii{#3}{H373-error}{H373}{\PackageError{hpstatement}{This statement has two optional text arguments.\MessageBreak Please specify them with [][]. Or append .0\MessageBreak to the number for the original form}{}}%
+\mhchem@hp@ii{#3}{H373-0}{H373}{May cause damage to organs through prolonged or repeated exposure.}%
+\mhchem@hp@ii{#3}{H373-1}{H373}{May cause damage to #1 through prolonged or repeated exposure.}%
+\mhchem@hp@ii{#3}{H373-2}{H373}{May cause damage to #1 through prolonged or repeated exposure #2.}%
+\mhchem@hp@ii{#3}{H300+H310-0}{H300\,+\,H310}{Fatal if swallowed or in contact with skin}%
+\mhchem@hp@ii{#3}{H300+H330-0}{H300\,+\,H330}{Fatal if swallowed or if inhaled}%
+\mhchem@hp@ii{#3}{H310+H330-0}{H310\,+\,H330}{Fatal in contact with skin or if inhaled}%
+\mhchem@hp@ii{#3}{H300+H310+H330-0}{H300\,+\,H310\,+\,H330}{Fatal if swallowed, in contact with skin or if inhaled}%
+\mhchem@hp@ii{#3}{H301+H311-0}{H301\,+\,H311}{Toxic if swallowed or in contact with skin}%
+\mhchem@hp@ii{#3}{H301+H331-0}{H301\,+\,H331}{Toxic if swallowed or if inhaled}%
+\mhchem@hp@ii{#3}{H311+H331-0}{H311\,+\,H331}{Toxic in contact with skin or if inhaled}%
+\mhchem@hp@ii{#3}{H301+H311+H331-0}{H301\,+\,H311\,+\,H331}{Toxic if swallowed, in contact with skin or if inhaled}%
+\mhchem@hp@ii{#3}{H302+H312-0}{H302\,+\,H312}{Harmful if swallowed or in contact with skin}%
+\mhchem@hp@ii{#3}{H302+H332-0}{H302\,+\,H332}{Harmful if swallowed or if inhaled}%
+\mhchem@hp@ii{#3}{H312+H332-0}{H312\,+\,H332}{Harmful in contact with skin or if inhaled}%
+\mhchem@hp@ii{#3}{H301+H312+H332-0}{H301\,+\,H312\,+\,H332}{Harmful if swallowed, in contact with skin or if inhaled}%
+\mhchem@hp@ii{#3}{H400-0}{H400}{Very toxic to aquatic life.}%
+\mhchem@hp@ii{#3}{H410-0}{H410}{Very toxic to aquatic life with long lasting effects.}%
+\mhchem@hp@ii{#3}{H411-0}{H411}{Toxic to aquatic life with long lasting effects.}%
+\mhchem@hp@ii{#3}{H412-0}{H412}{Harmful to aquatic life with long lasting effects.}%
+\mhchem@hp@ii{#3}{H413-0}{H413}{May cause long lasting harmful effects to aquatic life.}%
+\mhchem@hp@ii{#3}{H420-0}{H420}{+++}%
+\mhchem@hp@ii{#3}{P101-0}{P101}{If medical advice is needed, have product container or label at hand.}%
+\mhchem@hp@ii{#3}{P101.nolabel-error}{P101}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P101.nolabel-1}{P101}{If medical advice is needed, have product container or #1 at hand.}%
+\mhchem@hp@ii{#3}{P102-0}{P102}{Keep out of reach of children.}%
+\mhchem@hp@ii{#3}{P103-0}{P103}{Read label before use.}%
+\mhchem@hp@ii{#3}{P103.nolabel-error}{P103}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P103.nolabel-1}{P103}{Read #1 before use.}%
+\mhchem@hp@ii{#3}{P201-0}{P201}{Obtain special instructions before use.}%
+\mhchem@hp@ii{#3}{P202-0}{P202}{Do not handle until all safety precautions have been read and understood.}%
+\mhchem@hp@ii{#3}{P210.0-0}{P210}{Keep away from heat/sparks/open flames/hot surfaces. -- No smoking.}%
+\mhchem@hp@ii{#3}{P210-error}{P210}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P210-1}{P210}{Keep away from #1. -- No smoking.}%
+\mhchem@hp@ii{#3}{P210.1-0}{P210}{Keep away from heat. -- No smoking.}%
+\mhchem@hp@ii{#3}{P210.2-0}{P210}{Keep away from sparks. -- No smoking.}%
+\mhchem@hp@ii{#3}{P210.3-0}{P210}{Keep away from open flames. -- No smoking.}%
+\mhchem@hp@ii{#3}{P210.4-0}{P210}{Keep away from hot surfaces. -- No smoking.}%
+\mhchem@hp@ii{#3}{P211-0}{P211}{Do not spray on an open flame or other ignition source.}%
+\mhchem@hp@ii{#3}{P220.0-0}{P220}{Keep/Store away from clothing/\textellipsis/combustible materials.}%
+\mhchem@hp@ii{#3}{P220-error}{P220}{\PackageError{hpstatement}{Selection and selection/argument missing.\MessageBreak This statement has 1) a mandatory selection\MessageBreak and 2) a selection or text-argument.\MessageBreak Please append .1.1, ... to the number to make a\MessageBreak selection. Or append .1 or .2 with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P220.1.0-0}{P220}{Keep away from clothing/\textellipsis/combustible materials.}%
+\mhchem@hp@ii{#3}{P220.1-error}{P220}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P220.1-1}{P220}{Keep away from #1.}%
+\mhchem@hp@ii{#3}{P220.1.1-0}{P220}{Keep away from clothing.}%
+\mhchem@hp@ii{#3}{P220.1.2-0}{P220}{Keep away from combustible materials.}%
+\mhchem@hp@ii{#3}{P220.2.0-0}{P220}{Store away from clothing/\textellipsis/combustible materials.}%
+\mhchem@hp@ii{#3}{P220.2-error}{P220}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P220.2-1}{P220}{Store away from #1.}%
+\mhchem@hp@ii{#3}{P220.2.1-0}{P220}{Store away from clothing.}%
+\mhchem@hp@ii{#3}{P220.2.2-0}{P220}{Store away from combustible materials.}%
+\mhchem@hp@ii{#3}{P221.0-0}{P221}{Take any precaution to avoid mixing with combustibles\textellipsis}%
+\mhchem@hp@ii{#3}{P221-error}{P221}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P221-1}{P221}{Take any precaution to avoid mixing with #1.}%
+\mhchem@hp@ii{#3}{P221.1-0}{P221}{Take any precaution to avoid mixing with combustibles.}%
+\mhchem@hp@ii{#3}{P222-0}{P222}{Do not allow contact with air.}%
+\mhchem@hp@ii{#3}{P223-0}{P223}{Keep away from any possible contact with water, because of violent reaction and possible flash fire.}%
+\mhchem@hp@ii{#3}{P230.0-0}{P230}{Keep wetted with\textellipsis}%
+\mhchem@hp@ii{#3}{P230-error}{P230}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P230-1}{P230}{Keep wetted with #1.}%
+\mhchem@hp@ii{#3}{P231-0}{P231}{Handle under inert gas.}%
+\mhchem@hp@ii{#3}{P231+P232-0}{P231\,+\,P232}{Handle under inert gas. Protect from moisture.}%
+\mhchem@hp@ii{#3}{P232-0}{P232}{Protect from moisture.}%
+\mhchem@hp@ii{#3}{P233-0}{P233}{Keep container tightly closed.}%
+\mhchem@hp@ii{#3}{P234-0}{P234}{Keep only in original container.}%
+\mhchem@hp@ii{#3}{P235-0}{P235}{Keep cool.}%
+\mhchem@hp@ii{#3}{P235+P410-0}{P235\,+\,P410}{Keep cool. Protect from sunlight.}%
+\mhchem@hp@ii{#3}{P240-0}{P240}{Ground/bond container and receiving equipment.}%
+\mhchem@hp@ii{#3}{P241.0-0}{P241}{Use explosion-proof electrical/ventilating/lighting/\textellipsis/equipment.}%
+\mhchem@hp@ii{#3}{P241-error}{P241}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P241-1}{P241}{Use explosion-proof #1.}%
+\mhchem@hp@ii{#3}{P241.1-0}{P241}{Use explosion-proof electrical equipment.}%
+\mhchem@hp@ii{#3}{P241.2-0}{P241}{Use explosion-proof ventilating equipment.}%
+\mhchem@hp@ii{#3}{P241.3-0}{P241}{Use explosion-proof lighting equipment.}%
+\mhchem@hp@ii{#3}{P242-0}{P242}{Use only non-sparking tools.}%
+\mhchem@hp@ii{#3}{P243-0}{P243}{Take precautionary measures against static discharge.}%
+\mhchem@hp@ii{#3}{P244-0}{P244}{Keep reduction valves free from grease and oil.}%
+\mhchem@hp@ii{#3}{P250.0-0}{P250}{Do not subject to grinding/shock/\textellipsis/friction.}%
+\mhchem@hp@ii{#3}{P250-error}{P250}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P250-1}{P250}{Do not subject to #1.}%
+\mhchem@hp@ii{#3}{P250.1-0}{P250}{Do not subject to grinding.}%
+\mhchem@hp@ii{#3}{P250.2-0}{P250}{Do not subject to shock.}%
+\mhchem@hp@ii{#3}{P250.3-0}{P250}{Do not subject to friction.}%
+\mhchem@hp@ii{#3}{P251-0}{P251}{Pressurized container: Do not pierce or burn, even after use.}%
+\mhchem@hp@ii{#3}{P260.0-0}{P260}{Do not breathe dust/fume/gas/mist/vapours/spray.}%
+\mhchem@hp@ii{#3}{P260-error}{P260}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P260-1}{P260}{Do not breathe #1.}%
+\mhchem@hp@ii{#3}{P260.1-0}{P260}{Do not breathe dust.}%
+\mhchem@hp@ii{#3}{P260.2-0}{P260}{Do not breathe fume.}%
+\mhchem@hp@ii{#3}{P260.3-0}{P260}{Do not breathe gas.}%
+\mhchem@hp@ii{#3}{P260.4-0}{P260}{Do not breathe mist.}%
+\mhchem@hp@ii{#3}{P260.5-0}{P260}{Do not breathe vapours.}%
+\mhchem@hp@ii{#3}{P260.6-0}{P260}{Do not breathe spray.}%
+\mhchem@hp@ii{#3}{P261-0}{P261}{Avoid breathing dust/fume/gas/mist/vapours/spray.}%
+\mhchem@hp@ii{#3}{P262-0}{P262}{Do not get in eyes, on skin, or on clothing.}%
+\mhchem@hp@ii{#3}{P263.0-0}{P263}{Avoid contact during pregnancy/while nursing.}%
+\mhchem@hp@ii{#3}{P263-error}{P263}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P263-1}{P263}{Avoid contact #1.}%
+\mhchem@hp@ii{#3}{P263.1-0}{P263}{Avoid contact during pregnancy.}%
+\mhchem@hp@ii{#3}{P263.2-0}{P263}{Avoid contact while nursing.}%
+\mhchem@hp@ii{#3}{P264.0-0}{P264}{Wash \textellipsis thoroughly after handling.}%
+\mhchem@hp@ii{#3}{P264-error}{P264}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P264-1}{P264}{Wash #1 thoroughly after handling.}%
+\mhchem@hp@ii{#3}{P270-0}{P270}{Do no eat, drink or smoke when using this product.}%
+\mhchem@hp@ii{#3}{P271-0}{P271}{Use only outdoors or in a well-ventilated area.}%
+\mhchem@hp@ii{#3}{P272-0}{P272}{Contaminated work clothing should not be allowed out of the workplace.}%
+\mhchem@hp@ii{#3}{P273-0}{P273}{Avoid release to the environment.}%
+\mhchem@hp@ii{#3}{P280.0-0}{P280}{Wear protective gloves/protective clothing/eye protection/face protection.}%
+\mhchem@hp@ii{#3}{P280-error}{P280}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P280-1}{P280}{Wear #1.}%
+\mhchem@hp@ii{#3}{P280.1-0}{P280}{Wear protective gloves.}%
+\mhchem@hp@ii{#3}{P280.2-0}{P280}{Wear protective clothing.}%
+\mhchem@hp@ii{#3}{P280.3-0}{P280}{Wear eye protection.}%
+\mhchem@hp@ii{#3}{P280.4-0}{P280}{Wear face protection.}%
+\mhchem@hp@ii{#3}{P281-0}{P281}{Use personal protective equipment as required.}%
+\mhchem@hp@ii{#3}{P282.0-0}{P282}{Wear cold insulating gloves/face shield/eye protection.}%
+\mhchem@hp@ii{#3}{P282-error}{P282}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P282-1}{P282}{Wear #1.}%
+\mhchem@hp@ii{#3}{P282.1-0}{P282}{Wear cold insulating gloves.}%
+\mhchem@hp@ii{#3}{P282.2-0}{P282}{Wear face shield.}%
+\mhchem@hp@ii{#3}{P282.3-0}{P282}{Wear eye protection.}%
+\mhchem@hp@ii{#3}{P283.0-0}{P283}{Wear fire/flame resistant/retardant clothing.}%
+\mhchem@hp@ii{#3}{P283-error}{P283}{\PackageError{hpstatement}{Language-dependent argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak However, translations differ so much that you\MessageBreak have to state your selection as text argument [].\MessageBreak Read the manual for possible values.\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P283-1}{P283}{Wear #1 clothing.}%
+\mhchem@hp@ii{#3}{P284-0}{P284}{Wear respiratory protection.}%
+\mhchem@hp@ii{#3}{P285-0}{P285}{In case of inadequate ventilation wear respiratory protection.}%
+\mhchem@hp@ii{#3}{P301-0}{P301}{IF SWALLOWED:}%
+\mhchem@hp@ii{#3}{P301+P310-0}{P301\,+\,P310}{IF SWALLOWED: Immediately call a POISON CENTER or doctor/physician.}%
+\mhchem@hp@ii{#3}{P301+P312-0}{P301\,+\,P312}{IF SWALLOWED: Call a POISON CENTER or doctor/physician if you feel unwell.}%
+\mhchem@hp@ii{#3}{P301+P330+P331-0}{P301\,+\,P330\,+\,P331}{IF SWALLOWED: rinse mouth. Do NOT induce vomiting.}%
+\mhchem@hp@ii{#3}{P302-0}{P302}{IF ON SKIN:}%
+\mhchem@hp@ii{#3}{P302+P334.0-0}{P302\,+\,P334}{IF ON SKIN: Immerse in cool water/wrap in wet bandages.}%
+\mhchem@hp@ii{#3}{P302+P334-error}{P302\,+\,P334}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P302+P334-1}{P302\,+\,P334}{IF ON SKIN: #1.}%
+\mhchem@hp@ii{#3}{P302+P334.1-0}{P302\,+\,P334}{IF ON SKIN: Immerse in cool water.}%
+\mhchem@hp@ii{#3}{P302+P334.2-0}{P302\,+\,P334}{IF ON SKIN: Wrap in wet bandages.}%
+\mhchem@hp@ii{#3}{P302+P350-0}{P302\,+\,P350}{IF ON SKIN: Gently wash with plenty of soap and water.}%
+\mhchem@hp@ii{#3}{P302+P352-0}{P302\,+\,P352}{IF ON SKIN: Wash with plenty of soap and water.}%
+\mhchem@hp@ii{#3}{P303-0}{P303}{IF ON SKIN (or hair):}%
+\mhchem@hp@ii{#3}{P303+P361+P353-0}{P303\,+\,P361\,+\,P353}{IF ON SKIN (or hair): Remove/Take off immediately all contaminated clothing. Rinse skin with water/shower.}%
+\mhchem@hp@ii{#3}{P304-0}{P304}{IF INHALED:}%
+\mhchem@hp@ii{#3}{P304+P340-0}{P304\,+\,P340}{IF INHALED: Remove victim to fresh air and keep at rest in a position comfortable for breathing.}%
+\mhchem@hp@ii{#3}{P304+P341-0}{P304\,+\,P341}{IF INHALED: If breathing is difficult, remove victim to fresh air and keep at rest in a position comfortable for breathing.}%
+\mhchem@hp@ii{#3}{P305-0}{P305}{IF IN EYES:}%
+\mhchem@hp@ii{#3}{P305+P351+P338-0}{P305\,+\,P351\,+\,P338}{IF IN EYES: Rinse cautiously with water for several minutes. Remove contact lenses, if present and easy to do. Continue rinsing.}%
+\mhchem@hp@ii{#3}{P306-0}{P306}{IF ON CLOTHING:}%
+\mhchem@hp@ii{#3}{P306+P360-0}{P306\,+\,P360}{IF ON CLOTHING: rinse immediately contaminated clothing and skin with plenty of water before removing clothes.}%
+\mhchem@hp@ii{#3}{P307-0}{P307}{IF exposed:}%
+\mhchem@hp@ii{#3}{P307+P311-0}{P307\,+\,P311}{IF exposed: Call a POISON CENTER or doctor/physician.}%
+\mhchem@hp@ii{#3}{P308-0}{P308}{IF exposed or concerned:}%
+\mhchem@hp@ii{#3}{P308+P313-0}{P308\,+\,P313}{IF exposed or concerned: Get medical advice/attention.}%
+\mhchem@hp@ii{#3}{P309-0}{P309}{IF exposed or if you feel unwell:}%
+\mhchem@hp@ii{#3}{P309+P311-0}{P309\,+\,P311}{IF exposed or if you feel unwell: Call a POISON CENTER or doctor/physician.}%
+\mhchem@hp@ii{#3}{P310-0}{P310}{Immediately call a POISON CENTER or doctor/physician.}%
+\mhchem@hp@ii{#3}{P311-0}{P311}{Call a POISON CENTER or doctor/physician.}%
+\mhchem@hp@ii{#3}{P312-0}{P312}{Call a POISON CENTER or doctor/physician if you feel unwell.}%
+\mhchem@hp@ii{#3}{P313-0}{P313}{Get medical advice/attention.}%
+\mhchem@hp@ii{#3}{P314-0}{P314}{Get medical advice/attention if you feel unwell.}%
+\mhchem@hp@ii{#3}{P315-0}{P315}{Get immediate medical advice/attention.}%
+\mhchem@hp@ii{#3}{P320.0-0}{P320}{Specific treatment is urgent (see \textellipsis on this label).}%
+\mhchem@hp@ii{#3}{P320-error}{P320}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P320-1}{P320}{Specific treatment is urgent (see #1 on this label).}%
+\mhchem@hp@ii{#3}{P320.nolabel-error}{P320}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P320.nolabel-1}{P320}{Specific treatment is urgent (see #1).}%
+\mhchem@hp@ii{#3}{P321.0-0}{P321}{Specific treatment (see \textellipsis on this label).}%
+\mhchem@hp@ii{#3}{P321-error}{P321}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P321-1}{P321}{Specific treatment (see #1 on this label).}%
+\mhchem@hp@ii{#3}{P321.nolabel-error}{P321}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P321.nolabel-1}{P321}{Specific treatment (see #1).}%
+\mhchem@hp@ii{#3}{P322.0-0}{P322}{Specific measures (see \textellipsis on this label).}%
+\mhchem@hp@ii{#3}{P322-error}{P322}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P322-1}{P322}{Specific measures (see #1 on this label).}%
+\mhchem@hp@ii{#3}{P322.nolabel-error}{P322}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P322.nolabel-1}{P322}{Specific measures (see #1).}%
+\mhchem@hp@ii{#3}{P330-0}{P330}{Rinse mouth.}%
+\mhchem@hp@ii{#3}{P331-0}{P331}{Do NOT induce vomiting.}%
+\mhchem@hp@ii{#3}{P332-0}{P332}{If skin irritation occurs:}%
+\mhchem@hp@ii{#3}{P332+P313-0}{P332\,+\,P313}{If skin irritation occurs: Get medical advice/attention.}%
+\mhchem@hp@ii{#3}{P333-0}{P333}{If skin irritation or rash occurs:}%
+\mhchem@hp@ii{#3}{P333+P313-0}{P333\,+\,P313}{If skin irritation or rash occurs: Get medical advice/attention.}%
+\mhchem@hp@ii{#3}{P334.0-0}{P334}{Immerse in cool water/wrap in wet bandages.}%
+\mhchem@hp@ii{#3}{P334-error}{P334}{\PackageError{hpstatement}{Selection missing.\MessageBreak This statement requires a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P334.1-0}{P334}{Immerse in cool water.}%
+\mhchem@hp@ii{#3}{P334.2-0}{P334}{Wrap in wet bandages.}%
+\mhchem@hp@ii{#3}{P335-0}{P335}{Brush off loose particles from skin.}%
+\mhchem@hp@ii{#3}{P335+P334.0-0}{P335\,+\,P334}{Brush off loose particles from skin. Immerse in cool water/wrap in wet bandages.}%
+\mhchem@hp@ii{#3}{P335+P334-error}{P335\,+\,P334}{\PackageError{hpstatement}{Selection missing.\MessageBreak This statement requires a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P335+P334.1-0}{P335\,+\,P334}{Brush off loose particles from skin. Immerse in cool water.}%
+\mhchem@hp@ii{#3}{P335+P334.2-0}{P335\,+\,P334}{Brush off loose particles from skin. Wrap in wet bandages.}%
+\mhchem@hp@ii{#3}{P336-0}{P336}{Thaw frosted parts with lukewarm water. Do no rub affected area.}%
+\mhchem@hp@ii{#3}{P337-0}{P337}{If eye irritation persists:}%
+\mhchem@hp@ii{#3}{P337+P313-0}{P337\,+\,P313}{If eye irritation persists: Get medical advice/attention.}%
+\mhchem@hp@ii{#3}{P338-0}{P338}{Remove contact lenses, if present and easy to do. Continue rinsing.}%
+\mhchem@hp@ii{#3}{P340-0}{P340}{Remove victim to fresh air and keep at rest in a position comfortable for breathing.}%
+\mhchem@hp@ii{#3}{P341-0}{P341}{If breathing is difficult, remove victim to fresh air and keep at rest in a position comfortable for breathing.}%
+\mhchem@hp@ii{#3}{P342-0}{P342}{If experiencing respiratory symptoms:}%
+\mhchem@hp@ii{#3}{P342+P311-0}{P342\,+\,P311}{If experiencing respiratory symptoms: Call a POISON CENTER or doctor/physician.}%
+\mhchem@hp@ii{#3}{P350-0}{P350}{Gently wash with plenty of soap and water.}%
+\mhchem@hp@ii{#3}{P351-0}{P351}{Rinse cautiously with water for several minutes.}%
+\mhchem@hp@ii{#3}{P352-0}{P352}{Wash with plenty of soap and water.}%
+\mhchem@hp@ii{#3}{P353-0}{P353}{Rinse skin with water/shower.}%
+\mhchem@hp@ii{#3}{P360-0}{P360}{Rinse immediately contaminated clothing and skin with plenty of water before removing clothes.}%
+\mhchem@hp@ii{#3}{P361-0}{P361}{Remove/Take off immediately all contaminated clothing.}%
+\mhchem@hp@ii{#3}{P362-0}{P362}{Take off contaminated clothing and wash before reuse.}%
+\mhchem@hp@ii{#3}{P363-0}{P363}{Wash contaminated clothing before reuse.}%
+\mhchem@hp@ii{#3}{P370-0}{P370}{In case of fire:}%
+\mhchem@hp@ii{#3}{P370+P376-0}{P370\,+\,P376}{In case of fire: Stop leak if safe to do so.}%
+\mhchem@hp@ii{#3}{P370+P378.0-0}{P370\,+\,P378}{In case of fire: Use \textellipsis for extinction.}%
+\mhchem@hp@ii{#3}{P370+P378-error}{P370\,+\,P378}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P370+P378-1}{P370\,+\,P378}{In case of fire: Use #1 for extinction.}%
+\mhchem@hp@ii{#3}{P370+P380-0}{P370\,+\,P380}{In case of fire: Evacuate area.}%
+\mhchem@hp@ii{#3}{P370+P380+P375-0}{P370\,+\,P380\,+\,P375}{In case of fire: Evacuate area. Fight fire remotely due to the risk of explosion.}%
+\mhchem@hp@ii{#3}{P371-0}{P371}{In case of major fire and large quantities:}%
+\mhchem@hp@ii{#3}{P371+P380+P375-0}{P371\,+\,P380\,+\,P375}{In case of major fire and large quantities: Evacuate area. Fight fire remotely due to the risk of explosion.}%
+\mhchem@hp@ii{#3}{P372-0}{P372}{Explosion risk in case of fire.}%
+\mhchem@hp@ii{#3}{P373-0}{P373}{DO NOT fight fire when fire reaches explosives.}%
+\mhchem@hp@ii{#3}{P374-0}{P374}{Fight fire with normal precautions from a reasonable distance.}%
+\mhchem@hp@ii{#3}{P375-0}{P375}{Fight fire remotely due to the risk of explosion.}%
+\mhchem@hp@ii{#3}{P376-0}{P376}{Stop leak if safe to do so.}%
+\mhchem@hp@ii{#3}{P377-0}{P377}{Leaking gas fire: Do not extinguish, unless leak can be stopped safely.}%
+\mhchem@hp@ii{#3}{P378.0-0}{P378}{Use \textellipsis for extinction.}%
+\mhchem@hp@ii{#3}{P378-error}{P378}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P378-1}{P378}{Use #1 for extinction.}%
+\mhchem@hp@ii{#3}{P380-0}{P380}{Evacuate area.}%
+\mhchem@hp@ii{#3}{P381-0}{P381}{Eliminate all ignition sources if safe to do so.}%
+\mhchem@hp@ii{#3}{P390-0}{P390}{Absorb spillage to prevent material damage.}%
+\mhchem@hp@ii{#3}{P391-0}{P391}{Collect spillage.}%
+\mhchem@hp@ii{#3}{P401.0-0}{P401}{Store \textellipsis}%
+\mhchem@hp@ii{#3}{P401-error}{P401}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P401-1}{P401}{Store #1.}%
+\mhchem@hp@ii{#3}{P402-0}{P402}{Store in a dry place.}%
+\mhchem@hp@ii{#3}{P402+P404-0}{P402\,+\,P404}{Store in a dry place. Store in a closed container.}%
+\mhchem@hp@ii{#3}{P403-0}{P403}{Store in a well-ventilated place.}%
+\mhchem@hp@ii{#3}{P403+P233-0}{P403\,+\,P233}{Store in a well-ventilated place. Keep container tightly closed.}%
+\mhchem@hp@ii{#3}{P403+P235-0}{P403\,+\,P235}{Store in a well-ventilated place. Keep cool.}%
+\mhchem@hp@ii{#3}{P404-0}{P404}{Store in a closed container.}%
+\mhchem@hp@ii{#3}{P405-0}{P405}{Store locked up.}%
+\mhchem@hp@ii{#3}{P406.0-0}{P406}{Store in corrosive resistant/\textellipsis container with a resistant inner liner.}%
+\mhchem@hp@ii{#3}{P406-error}{P406}{\PackageError{hpstatement}{Selection or argument missing.\MessageBreak This statement has a mandatory selection.\MessageBreak Please append .1, .2, ... to the number to make a\MessageBreak selection. Or supply a text as argument with [].\MessageBreak Or use .0 for the original form}{}}%
+\mhchem@hp@ii{#3}{P406-1}{P406}{Store in #1 container with a resistant inner liner.}%
+\mhchem@hp@ii{#3}{P406.1-0}{P406}{Store in corrosive resistant container with a resistant inner liner.}%
+\mhchem@hp@ii{#3}{P407-0}{P407}{Maintain air gap between stacks/pallets.}%
+\mhchem@hp@ii{#3}{P410-0}{P410}{Protect from sunlight.}%
+\mhchem@hp@ii{#3}{P410+P403-0}{P410\,+\,P403}{Protect from sunlight. Store in a well-ventilated place.}%
+\mhchem@hp@ii{#3}{P410+P412-0}{P410\,+\,P412}{Protect from sunlight. Do no expose to temperatures exceeding 50\textdegree{}C/122\textdegree{}F.}%
+\mhchem@hp@ii{#3}{P411-0}{P411}{Store at temperatures not exceeding \textellipsis\textdegree{}C/\textellipsis\textdegree{}F.}%
+\mhchem@hp@ii{#3}{P411+P235-0}{P411\,+\,P235}{Store at temperatures not exceeding \textellipsis\textdegree{}C/\textellipsis\textdegree{}F. Keep cool.}%
+\mhchem@hp@ii{#3}{P412-0}{P412}{Do not expose to temperatures exceeding 50\textdegree{}C/122\textdegree{}F.}%
+\mhchem@hp@ii{#3}{P413.0-0}{P413}{Store bulk masses greater than \textellipsis\,kg/\textellipsis\,lbs at temperatures not exceeding \textellipsis\textdegree{}C/\textellipsis\textdegree{}F.}%
+\mhchem@hp@ii{#3}{P413-error}{P413}{\PackageError{hpstatement}{Selection and mandatory arguments missing.\MessageBreak This statement has a mandatory selection. Please\MessageBreak append .1 or .2 to the number (or use .0 for the\MessageBreak original form). Also, supply two arguments with\MessageBreak [][]}{}}%
+\mhchem@hp@ii{#3}{P413.1-error}{P413}{\PackageError{hpstatement}{This statement has two mandatory text arguments.\MessageBreak Please specify them with [][]}{}}%
+\mhchem@hp@ii{#3}{P413.1-2}{P413}{Store bulk masses greater than #1\,kg at temperatures not exceeding #2\textdegree{}C.}%
+\mhchem@hp@ii{#3}{P413.2-error}{P413}{\PackageError{hpstatement}{This statement has two mandatory text arguments.\MessageBreak Please specify them with [][]}{}}%
+\mhchem@hp@ii{#3}{P413.2-2}{P413}{Store bulk masses greater than #1\,lbs at temperatures not exceeding #2\textdegree{}F.}%
+\mhchem@hp@ii{#3}{P420-0}{P420}{Store away from other materials.}%
+\mhchem@hp@ii{#3}{P422.0-0}{P422}{Store contents under \textellipsis}%
+\mhchem@hp@ii{#3}{P422-error}{P422}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P422-1}{P422}{Store contents under #1.}%
+\mhchem@hp@ii{#3}{P501.0.0-0}{P501}{Dispose of contents/container to \textellipsis}%
+\mhchem@hp@ii{#3}{P501.0-error}{P501}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P501.0-1}{P501}{Dispose of contents/container to #1.}%
+\mhchem@hp@ii{#3}{P501-error}{P501}{\PackageError{hpstatement}{Selection and mandatory argument missing.\MessageBreak This statement has a mandatory selection. Please\MessageBreak append .1 or .2 to the number (or use .0 for the\MessageBreak original form). Also, supply an argument with []\MessageBreak (or use an additional .0 for the original\MessageBreak form)}{}}%
+\mhchem@hp@ii{#3}{P501.1.0-0}{P501}{Dispose of contents to \textellipsis}%
+\mhchem@hp@ii{#3}{P501.1-error}{P501}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P501.1-1}{P501}{Dispose of contents to #1.}%
+\mhchem@hp@ii{#3}{P501.2.0-0}{P501}{Dispose of container to \textellipsis}%
+\mhchem@hp@ii{#3}{P501.2-error}{P501}{\PackageError{hpstatement}{One argument required.\MessageBreak This statement has a mandatory text argument.\MessageBreak Please specify one with []. Or use .0 for the\MessageBreak original form}{}}%
+\mhchem@hp@ii{#3}{P501.2-1}{P501}{Dispose of container to #1.}%
+}
diff --git a/Master/texmf-dist/tex/latex/mhchem/mhchem.sty b/Master/texmf-dist/tex/latex/mhchem/mhchem.sty
index 831a8cf29a6..9f8d8f2fc34 100644
--- a/Master/texmf-dist/tex/latex/mhchem/mhchem.sty
+++ b/Master/texmf-dist/tex/latex/mhchem/mhchem.sty
@@ -1,13 +1,12 @@
%% mhchem.sty
-%% Copyright 2004-2011 M.a-r.t-i.n H.e-n.s-e.l
+%% Copyright 2004-2013 Martin Hensel
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c
-% which can be found at
-% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% which is included as lppl-1-3c.txt.
%
% This work has the LPPL maintenance status "maintained".
-% The Current Maintainer of this work is M.a-r.t-i.n H.e-n.s-e.l.
+% The Current Maintainer of this work is Martin Hensel.
%
% ( In order to fight spam, the maintainer's contact )
% ( information is "encrypted" with ROT13. )
@@ -25,319 +24,636 @@
% | Treznal
% `----------
%
-% This work consists of the files mhchem.sty, rsphrase.sty,
-% mhchem.pdf and legal.txt.
+% This work consists of all files listed in manifest.txt.
%
%
-\ProvidesPackage{mhchem}[2011/06/03 v3.11 for typesetting chemical formulae]
+\ProvidesPackage{mhchem}[2013/06/17 v3.12 for typesetting chemical formulae]
\RequirePackage{ifthen}
\RequirePackage{calc}[1998/07/07]
\RequirePackage{twoopt}
\RequirePackage{amsmath}
\RequirePackage{keyval}
\RequirePackage{graphics}
+\RequirePackage{pdftexcmds}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% misc %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareMathSymbol{\mhchem@hyphen}{0}{operators}{45}
+\def\mhchem@END{\mhchem@END}
+\def\mhchem@macro{}
+\def\mhchem@empty{}
+\def\mhchem@gobble#1{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% \cee %%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\cee}[1]{%
- \ifnum 1<\mhchem@option@version%
- \def\mhchem@ce@out{}%
- {\mhchem@ce@v#1\mhchem@empty\\\mhchem@END\mhchem@ENDEND}%
- \ensuremath{%
- \mhchem@ce@out%
- }%
- \else%
- \PackageWarningNoLine{mhchem}{%
- The \string\cee{} command of mhchem is only available\MessageBreak
- when you secify [version=2] or greater}%
- \fi%
+ \def\mhchem@ce@out{}%
+ {\mhchem@cee@i#1\mhchem@empty\\\mhchem@END\mhchem@ENDEND}%
+ \ensuremath{%
+ \mhchem@ce@out%
+ }%
}%
-\def\mhchem@ce@v#1\\#2#3\mhchem@ENDEND{%
+\def\mhchem@cee@i#1\\#2#3\mhchem@ENDEND{%
\ifx\mhchem@END#2%
- \mhchem@ce@vii#1&\mhchem@END\mhchem@ENDEND%
+ \mhchem@cee@ii#1&\mhchem@END\mhchem@ENDEND%
\else%
- \mhchem@ce@vii#1&\mhchem@END\mhchem@ENDEND%
+ \mhchem@cee@ii#1&\mhchem@END\mhchem@ENDEND%
\g@addto@macro\mhchem@ce@out{\\}%
- \mhchem@ce@v#2#3\mhchem@ENDEND%
+ \mhchem@cee@i#2#3\mhchem@ENDEND%
\fi%
}
-\long\def\mhchem@ce@vii#1&#2#3\mhchem@ENDEND{%
+\long\def\mhchem@cee@ii#1&#2#3\mhchem@ENDEND{%
\ifx\mhchem@END#2%
- \g@addto@macro\mhchem@ce@out{\ce@main{#1}}%
+ \g@addto@macro\mhchem@ce@out{\ce{#1}}%
\else%
- \g@addto@macro\mhchem@ce@out{\ce@main{#1}}%
+ \g@addto@macro\mhchem@ce@out{\ce{#1}}%
\g@addto@macro\mhchem@ce@out{&}%
- \mhchem@ce@vii#2#3\mhchem@ENDEND%
- \fi%
+ \mhchem@cee@ii#2#3\mhchem@ENDEND%
+ \fi%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%% global helpers %%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\mhchem@appendToks#1#2{%
+ #1=\expandafter{\the#1#2}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% \ce %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%
-
-\def\mhchem@protect{\protect\noexpand\protect}%
-
-\newcommand\ce[1]{\mhchem@ce@xiii{\mhchem@ce@viii#1 \mhchem@END\mhchem@ENDEND}}%
-%
-%
-\def\mhchem@ce@viii#1 #2\mhchem@ENDEND{%
- \ifx\mhchem@END#2%
- \ifx\@empty#1\@empty
- \else
- \mhchem@ce@x#1\mhchem@END\mhchem@ENDEND%
- \fi
- \else%
- \mhchem@ce@x#1\mhchem@END\mhchem@ENDEND%
- \space\mhchem@ce@viii#2\mhchem@ENDEND%
- \fi
-}
-\def\mhchem@ce@x#1#2\mhchem@ENDEND{%
- \ifx\@empty#1\@empty%
- \mhchem@ce@xi{}\mhchem@END\mhchem@ENDEND%
- \else%\ifx\mhchem@END#1\else
- \mhchem@ce@xi#1\mhchem@END\mhchem@ENDEND%
- \fi%\fi%
- \ifx\mhchem@END#2%
+\DeclareRobustCommand\ce[1]{\mhchem@ce{#1}}
+
+\edef\mhchem@char@lbrace{\string{} %}
+\begingroup%
+ \catcode`\-=12%
+ \gdef\mhchem@char@hyphen@other{-}%
+ \catcode`\-=\active%
+ \gdef\mhchem@char@hyphen@active{-}%
+ \catcode`\<=12%
+ \gdef\mhchem@char@lt@other{<}%
+ \catcode`\<=\active%
+ \gdef\mhchem@char@lt@active{<}%
+ \catcode`\>=12%
+ \gdef\mhchem@char@gt@other{>}%
+ \catcode`\>=\active%
+ \gdef\mhchem@char@gt@active{>}%
+ \catcode`\^=7%
+ \gdef\mhchem@char@caret@super{^}%
+ \catcode`\^=\active%
+ \gdef\mhchem@char@caret@active{^}%
+ \catcode`\==12%
+ \gdef\mhchem@char@equal@other{=}%
+ \catcode`\==\active%
+ \gdef\mhchem@char@equal@active{=}%
+\endgroup%
+
+\newtoks\mhchem@ce@result%
+\newtoks\mhchem@ce@part%
+\newcommand*\mhchem@ce[1]{%
+ \bgroup%
+ \def\mhchem@ce@state{s}%
+ \chardef\mhchem@ce@substate=0\relax%
+ \mhchem@ce@result={}%
+ \mhchem@ce@part={}%
+ \mhchem@ce@continue#1\mhchem@END%
+ \ifnum 1<\mhchem@option@version%
+ \the\mhchem@ce@result%
\else%
- \mhchem@ce@x#2\mhchem@ENDEND%
+ \ensuremath{\the\mhchem@ce@result}%
\fi%
+ \egroup%
}
-\def\mhchem@ce@xi#1#2\mhchem@ENDEND{%
- \ifx\mhchem@END#2%
- \ifx\@empty#1\@empty%
- {}%
- \else\if\noexpand#1##%
- \mhchem@protect\tbond%
+\def\mhchem@ce@i{%
+ \ifx\mhchem@END\mhchem@ce@lookahead%
+ \mhchem@ce@output%
+ \let\mhchem@ce@action\mhchem@gobble%
+ \else\if\space\noexpand\mhchem@ce@lookahead%
+ \if s\mhchem@ce@state%
\else%
- \mhchem@protect#1%
- \fi\fi%
+ \mhchem@ce@output%
+ \mhchem@ce@part={}%
+ \def\mhchem@ce@state{s}%
+ \fi%
+ \let\mhchem@ce@action\mhchem@ce@gobbleNextSpace%
+ \else\if\mhchem@char@lbrace\noexpand\mhchem@ce@lookahead%
+ \if s\mhchem@ce@state%
+ \def\mhchem@ce@state{c}%
+ \fi%
+ \def\mhchem@ce@action{\mhchem@ce@appendNextGroup{\mhchem@ce@part}}%
\else%
- {\mhchem@ce@xii#1#2}%
- \fi%
+ \if s\mhchem@ce@state%
+ \expandafter\ifx\mhchem@char@hyphen@other\mhchem@ce@lookahead%
+ \def\mhchem@ce@state{a}%
+ \chardef\mhchem@ce@substate=1\relax%
+ \else\expandafter\ifx\mhchem@char@hyphen@active\mhchem@ce@lookahead%
+ \def\mhchem@ce@state{a}%
+ \chardef\mhchem@ce@substate=1\relax%
+ \else\expandafter\ifx\mhchem@char@lt@other\mhchem@ce@lookahead%
+ \def\mhchem@ce@state{a}%
+ \chardef\mhchem@ce@substate=7\relax%
+ \else\expandafter\ifx\mhchem@char@lt@active\mhchem@ce@lookahead%
+ \def\mhchem@ce@state{a}%
+ \chardef\mhchem@ce@substate=7\relax%
+ \else\if +\noexpand\mhchem@ce@lookahead%
+ \def\mhchem@ce@state{a}%
+ \chardef\mhchem@ce@substate=50\relax%
+ \else\if (\noexpand\mhchem@ce@lookahead%
+ \def\mhchem@ce@state{a}%
+ \chardef\mhchem@ce@substate=101\relax%
+ \else\if v\noexpand\mhchem@ce@lookahead%
+ \def\mhchem@ce@state{a}%
+ \chardef\mhchem@ce@substate=106\relax%
+ \else\expandafter\ifx\mhchem@char@caret@super\mhchem@ce@lookahead%
+ \def\mhchem@ce@state{a}%
+ \chardef\mhchem@ce@substate=107\relax%
+ \else\expandafter\ifx\mhchem@char@caret@active\mhchem@ce@lookahead%
+ \def\mhchem@ce@state{a}%
+ \chardef\mhchem@ce@substate=107\relax%
+ \else%
+ \def\mhchem@ce@state{c}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi%
+ \def\mhchem@ce@action{\mhchem@ce@appendNextToken{\mhchem@ce@part}}%
+ \else\if c\mhchem@ce@state%
+ \def\mhchem@ce@action{\mhchem@ce@appendNextToken{\mhchem@ce@part}}%
+ \else\if a\mhchem@ce@state%
+ \def\mhchem@ce@action{\mhchem@ce@appendNextToken{\mhchem@ce@part}}%
+ \ifnum 1=\mhchem@ce@substate\relax%
+ \expandafter\ifx\mhchem@char@gt@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=2\relax%
+ \else\expandafter\ifx\mhchem@char@gt@active\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=2\relax%
+ \else%
+ \def\mhchem@ce@state{c}%
+ \fi\fi%
+ \else\ifnum 2=\mhchem@ce@substate\relax%
+ \mhchem@ce@part={}%
+ \chardef\mhchem@ce@substate=3\relax%
+ \else\ifnum 7=\mhchem@ce@substate\relax%
+ \expandafter\ifx\mhchem@char@hyphen@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=8\relax%
+ \else\expandafter\ifx\mhchem@char@hyphen@active\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=8\relax%
+ \else\expandafter\ifx\mhchem@char@equal@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=19\relax%
+ \else\expandafter\ifx\mhchem@char@equal@active\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=19\relax%
+ \else\expandafter\ifx\mhchem@char@lt@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=24\relax%
+ \else\expandafter\ifx\mhchem@char@lt@active\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=24\relax%
+ \else%
+ \def\mhchem@ce@state{c}%
+ \fi\fi\fi\fi\fi\fi%
+ \else\ifnum 8=\mhchem@ce@substate\relax%
+ \expandafter\ifx\mhchem@char@gt@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=10\relax%
+ \else\expandafter\ifx\mhchem@char@gt@active\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=10\relax%
+ \else\expandafter\ifx\mhchem@char@hyphen@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=12\relax%
+ \else\expandafter\ifx\mhchem@char@hyphen@active\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=12\relax%
+ \else%
+ \mhchem@ce@part={}%
+ \chardef\mhchem@ce@substate=9\relax%
+ \fi\fi\fi\fi%
+ \else\ifnum 10=\mhchem@ce@substate\relax%
+ \mhchem@ce@part={}%
+ \chardef\mhchem@ce@substate=11\relax%
+ \else\ifnum 12=\mhchem@ce@substate\relax%
+ \expandafter\ifx\mhchem@char@gt@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=13\relax%
+ \else\expandafter\ifx\mhchem@char@gt@active\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=13\relax%
+ \else%
+ \def\mhchem@ce@state{c}%
+ \fi\fi%
+ \else\ifnum 13=\mhchem@ce@substate\relax%
+ \mhchem@ce@part={}%
+ \chardef\mhchem@ce@substate=14\relax%
+ \else\ifnum 19=\mhchem@ce@substate\relax%
+ \expandafter\ifx\mhchem@char@gt@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=20\relax%
+ \else\expandafter\ifx\mhchem@char@gt@active\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=20\relax%
+ \else%
+ \def\mhchem@ce@state{c}%
+ \fi\fi%
+ \else\ifnum 20=\mhchem@ce@substate\relax%
+ \expandafter\ifx\mhchem@char@gt@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=22\relax%
+ \else\expandafter\ifx\mhchem@char@gt@active\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=22\relax%
+ \else%
+ \mhchem@ce@part={}%
+ \chardef\mhchem@ce@substate=21\relax%
+ \fi\fi%
+ \else\ifnum 22=\mhchem@ce@substate\relax%
+ \mhchem@ce@part={}%
+ \chardef\mhchem@ce@substate=23\relax%
+ \else\ifnum 24=\mhchem@ce@substate\relax%
+ \expandafter\ifx\mhchem@char@equal@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=25\relax%
+ \else\expandafter\ifx\mhchem@char@equal@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=25\relax%
+ \else%
+ \def\mhchem@ce@state{c}%
+ \fi\fi%
+ \else\ifnum 25=\mhchem@ce@substate\relax%
+ \expandafter\ifx\mhchem@char@gt@other\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=26\relax%
+ \else\expandafter\ifx\mhchem@char@gt@active\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=26\relax%
+ \else%
+ \def\mhchem@ce@state{c}%
+ \fi\fi%
+ \else\ifnum 26=\mhchem@ce@substate\relax%
+ \mhchem@ce@part={}%
+ \chardef\mhchem@ce@substate=27\relax%
+ \else\ifnum 50=\mhchem@ce@substate\relax%
+ \mhchem@ce@output%
+ \mhchem@ce@part={}%
+ \def\mhchem@ce@state{c}%
+ \else\ifnum 101=\mhchem@ce@substate\relax%
+ \if v\noexpand\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=102\relax%
+ \else%
+ \def\mhchem@ce@state{c}%
+ \fi%
+ \else\ifnum 102=\mhchem@ce@substate\relax%
+ \if )\noexpand\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=103\relax%
+ \else%
+ \def\mhchem@ce@state{c}%
+ \fi%
+ \else\ifnum 103=\mhchem@ce@substate\relax%
+ \def\mhchem@ce@state{c}%
+ \else\ifnum 104=\mhchem@ce@substate\relax%
+ \if )\noexpand\mhchem@ce@lookahead%
+ \chardef\mhchem@ce@substate=105\relax%
+ \else%
+ \def\mhchem@ce@state{c}%
+ \fi%
+ \else\ifnum 105=\mhchem@ce@substate\relax%
+ \def\mhchem@ce@state{c}%
+ \else\ifnum 106=\mhchem@ce@substate\relax%
+ \def\mhchem@ce@state{c}%
+ \else\ifnum 107=\mhchem@ce@substate\relax%
+ \def\mhchem@ce@state{c}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+ \fi\fi\fi%
+ \fi\fi\fi%
+ \mhchem@ce@action%
}
-\def\mhchem@ce@xii#1\mhchem@END{\mhchem@ce@viii#1 \mhchem@END\mhchem@ENDEND}%
-\DeclareRobustCommand\mhchem@ce@xiii[1]{%
- \bgroup%
- \ifnum 4>\mhchem@option@version%
- \def\hyphen{\mhchem@hyphen}%
+\def\mhchem@ce@continue{%
+ \futurelet\mhchem@ce@lookahead\mhchem@ce@i%
+}%
+\def\mhchem@ce@gobbleNextToken#1{%
+ \mhchem@ce@continue%
+}%
+\def\mhchem@ce@gobbleNextSpace{%
+ % thanks to de.comp.text.tex
+ \def\mhchem@ce@gobbleNextSpace@i{%
+ \mhchem@ce@continue}%
+ \afterassignment\mhchem@ce@gobbleNextSpace@i%
+ \let\mhchem@ce@gobbleNextSpace@ii= % The space is the trick!
+}
+\def\mhchem@ce@appendNextToken#1#2{%
+ \mhchem@appendToks{#1}{#2}%
+ \mhchem@ce@continue%
+}
+\def\mhchem@ce@appendNextGroup#1#2{%
+ \mhchem@appendToks{#1}{{#2}}%
+ \mhchem@ce@continue%
+}
+\def\mhchem@ce@output{%
+ \if a\mhchem@ce@state%
+ \ifnum 2=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\mhchem@arrow@yields[][]}%
+ \else\ifnum 3=\mhchem@ce@substate\relax%
+ \expandafter\mhchem@appendToks\expandafter{\expandafter\mhchem@ce@result\expandafter}\expandafter{\expandafter\mhchem@arrow@yields\the\mhchem@ce@part}%
+ \else\ifnum 8=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\mhchem@arrow@yieldsLeft[][]}%
+ \else\ifnum 9=\mhchem@ce@substate\relax%
+ \expandafter\mhchem@appendToks\expandafter{\expandafter\mhchem@ce@result\expandafter}\expandafter{\expandafter\mhchem@arrow@yieldsLeft\the\mhchem@ce@part}%
+ \else\ifnum 10=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\mhchem@arrow@mesomerism[][]}%
+ \else\ifnum 11=\mhchem@ce@substate\relax%
+ \expandafter\mhchem@appendToks\expandafter{\expandafter\mhchem@ce@result\expandafter}\expandafter{\expandafter\mhchem@arrow@mesomerism\the\mhchem@ce@part}%
+ \else\ifnum 13=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\mhchem@arrow@yieldsLeftRight[][]}%
+ \else\ifnum 14=\mhchem@ce@substate\relax%
+ \expandafter\mhchem@appendToks\expandafter{\expandafter\mhchem@ce@result\expandafter}\expandafter{\expandafter\mhchem@arrow@yieldsLeftRight\the\mhchem@ce@part}%
+ \else\ifnum 20=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\mhchem@arrow@equilibrium[][]}%
+ \else\ifnum 21=\mhchem@ce@substate\relax%
+ \expandafter\mhchem@appendToks\expandafter{\expandafter\mhchem@ce@result\expandafter}\expandafter{\expandafter\mhchem@arrow@equilibrium\the\mhchem@ce@part}%
+ \else\ifnum 22=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\mhchem@arrow@equilibriumRight[][]}%
+ \else\ifnum 23=\mhchem@ce@substate\relax%
+ \expandafter\mhchem@appendToks\expandafter{\expandafter\mhchem@ce@result\expandafter}\expandafter{\expandafter\mhchem@arrow@equilibriumRight\the\mhchem@ce@part}%
+ \else\ifnum 26=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\mhchem@arrow@equilibriumLeft[][]}%
+ \else\ifnum 27=\mhchem@ce@substate\relax%
+ \expandafter\mhchem@appendToks\expandafter{\expandafter\mhchem@ce@result\expandafter}\expandafter{\expandafter\mhchem@arrow@equilibriumLeft\the\mhchem@ce@part}%
+ \else\ifnum 50=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\ensuremath{{}+{}}}%
+ \else\ifnum 103=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\ensuremath{{}\mathop{\downarrow}{}}}%
+ \else\ifnum 105=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\ensuremath{{}\mathop{\uparrow}{}}}%
+ \else\ifnum 106=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\ensuremath{{}\mathop{\downarrow}{}}}%
+ \else\ifnum 107=\mhchem@ce@substate\relax%
+ \mhchem@appendToks{\mhchem@ce@result}{\ensuremath{{}\mathop{\uparrow}{}}}%
+ \else%
+ \def\mhchem@ce@state{c}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+ \fi%
+ \if c\mhchem@ce@state%
+ \expandafter\mhchem@appendToks\expandafter{\expandafter\mhchem@ce@result\expandafter}\expandafter{\expandafter\mhchem@cf\expandafter{\the\mhchem@ce@part}}%
\fi%
- \def\mhchem@protect{\noexpand}%
- \edef\mhchem@tmp{#1}%
- %
- \expandafter\ce@main\expandafter{\mhchem@tmp}%
- \egroup
}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%% arrows %%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%
-
-\DeclareRobustCommand*{\ce@main}[1]{%
- \bgroup%
- \ifnum 1<\mhchem@option@version%
- \ifmmode\else\def\mhchem@option@alwaystextmode{1}\fi%
- \fi%
- \def\bond{}\def\sbond{}\def\dbond{}\def\tbond{}%
- \ifx\@empty#1\@empty\else%
- \ifmmode\else\mhchem@option@textFont\fi%
- \ensuremath{%
- \mhchem@ce@xx#1 \mhchem@END\mhchem@ENDEND%
- }%
- \fi%
- \egroup%
-}%
+\def\mhchem@arrow@minlength{{2em}}%
-\def\mhchem@ce@xx#1 #2\mhchem@ENDEND{%
- \mhchem@ce@i#1\mhchem@empty\mhchem@ENDEND%
- \ifx\mhchem@END#2%
- \else%
- \mhchem@ce@xx#2 \mhchem@ENDEND%
- \fi%
-}
-\def\mhchem@ce@i#1#2\mhchem@ENDEND{%
- \ifcat a#1 {\mhchem@ce@ii{#1#2}}%
- \else\ifx 1#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx 2#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx 3#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx 4#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx 5#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx 6#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx 7#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx 8#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx 9#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx 0#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx (#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx [#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx \{#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx ^#1{\mhchem@ce@ii{#1#2}}%
- \else\if ^#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx _#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx $#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx -#1{\ifx\@empty#2\@empty#1\else\mhchem@ce@dash#2\mhchem@END\fi}%
- \else\if\noexpand#1<{\ifx\@empty#2\@empty#1\else\mhchem@ce@lt#2\mhchem@END\fi}%
- \else\ifx +#1+ \mhchem@ce@ii{#2}%
- \else\ifx \protect#1{\mhchem@ce@ii{#1#2}}%
- %
- \else\ifx\ce#1 \mhchem@ce@i #2 \mhchem@END%
- \else\ifx\cf#1 \mhchem@cf{#2}%
- \else\ifx\cmath#1 \mhchem@ce@cmath#2\mhchem@END%
- \else\ifx\bond#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx\sbond#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx\dbond#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx\tond#1{\mhchem@ce@ii{#1#2}}%
- \else\ifx\label#1 \mhchem@ce@label#2\mhchem@END%
- \else\ifx\tag#1 \mhchem@ce@tag#2\mhchem@END%
- %
- \else #1#2%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
-}
-
-%
-\def\mhchem@ce@dash#1#2\mhchem@END{%
- \if\noexpand#1>%
- {}\ifx\@empty#2\@empty\mhchem@gives#2%
- \else\mhchem@ce@deploycommand{mhchem@gives}#2{}\mhchem@END\fi{}%
- \else%
- -#1#2%
- \fi%
-}%
-\def\mhchem@ce@lt#1#2\mhchem@END{%
- \ifx =#1\mhchem@ce@equal#2\mhchem@END%
- \else\if\noexpand#1<\mhchem@ce@equiL#2\mhchem@END%
- \else\ifx-#1%
- \ifx\@empty#2\@empty%
- {}\mhchem@givesleft#2{}%
+%%% Deployment of arrow macros
+\newtoks\mhchem@arrow@deployType
+\def\mhchem@arrow@deploy#1{%
+ \if [#1%
+ \ifnum 3<\mhchem@option@version%
+ \edef\mhchem@arrow@deploy@action{\noexpand\csname mhchem@arrow@\the\mhchem@arrow@deployType T\endcsname[}%
\else%
- \mhchem@ce@dashtwo#2\mhchem@END%
+ \edef\mhchem@arrow@deploy@action{\noexpand\csname mhchem@arrow@\the\mhchem@arrow@deployType M\endcsname[}%
\fi%
+ \else\if T#1%
+ \edef\mhchem@arrow@deploy@action{\noexpand\csname mhchem@arrow@\the\mhchem@arrow@deployType T\endcsname}%
+ \else\if C#1%
+ \edef\mhchem@arrow@deploy@action{\noexpand\csname mhchem@arrow@\the\mhchem@arrow@deployType C\endcsname}%
\else%
- <#1#2%
+ \def\mhchem@arrow@deploy@action{}%
+ \PackageError{mhchem}{Arrow type not supported}%
\fi\fi\fi%
+ \mhchem@arrow@deploy@action%
}
-\def\mhchem@ce@equal#1#2\mhchem@END{%
- \if\noexpand#1>% (<=)>...
- \ifx\@empty#2\@empty{}\mhchem@equilibrium#2{}%
- \else%
- \mhchem@ce@equi#2\mhchem@END%
- \fi%
- \else%
- <=#1#2%
- \fi%
+\def\mhchem@arrow@yields{%
+ \mhchem@arrow@deployType={yields}%
+ \futurelet\lookahead\mhchem@arrow@deploy%
}
-\def\mhchem@ce@equi#1#2\mhchem@END{%
- \if\noexpand#1>%
- {}\ifx\@empty#2\@empty\mhchem@equilibriumRight#2%
- \else\mhchem@ce@deploycommand{mhchem@equilibriumRight}#2{}\mhchem@END\fi{}%
- \else%
- {}\mhchem@ce@deploycommand{mhchem@equilibrium}#1#2{}\mhchem@END{}%
- \fi%
+\def\mhchem@arrow@yieldsLeft{%
+ \mhchem@arrow@deployType={yieldsLeft}%
+ \futurelet\lookahead\mhchem@arrow@deploy%
}
-\def\mhchem@ce@equiL#1#2\mhchem@END{%
- \ifx =#1\mhchem@ce@equiLi#2\mhchem@END%
- \else<=#1#2%
- \fi%
+\def\mhchem@arrow@yieldsLeftRight{%
+ \mhchem@arrow@deployType={yieldsLeftRight}%
+ \futurelet\lookahead\mhchem@arrow@deploy%
}
-\def\mhchem@ce@equiLi#1#2\mhchem@END{%
- \if\noexpand#1>% (<<=)>
- {}\ifx\@empty#2\@empty\mhchem@equilibriumLeft#2%
- \else\mhchem@ce@deploycommand{mhchem@equilibriumLeft}#2{}\mhchem@END\fi{}%
- \else%
- <<=#1#2%
- \fi%
+\def\mhchem@arrow@mesomerism{%
+ \mhchem@arrow@deployType={mesomerism}%
+ \futurelet\lookahead\mhchem@arrow@deploy%
}
-\def\mhchem@ce@dashtwo#1#2\mhchem@END{%
- \if\noexpand#1>%
- {}\ifx\@empty#2\@empty\mhchem@mesomeric#2%
- \else\mhchem@ce@deploycommand{mhchem@mesomeric}#2{}\mhchem@END\fi{}%
- \else%
- {}\mhchem@ce@deploycommand{mhchem@givesleft}#1#2{}\mhchem@END{}%
- \fi%
+\def\mhchem@arrow@equilibrium{%
+ \mhchem@arrow@deployType={equilibrium}%
+ \futurelet\lookahead\mhchem@arrow@deploy%
}
-\def\mhchem@ce@deploycommand#1#2#3\mhchem@END{%
- \ifx T#2\csname#1T\endcsname#3%
- \else\ifx C#2\csname#1C\endcsname#3%
- \else\csname#1\endcsname#2#3\fi\fi%
+\def\mhchem@arrow@equilibriumRight{%
+ \mhchem@arrow@deployType={equilibriumRight}%
+ \futurelet\lookahead\mhchem@arrow@deploy%
}
-
-\def\mhchem@ce@ii#1{%
- \mhchem@ce@iii#1%
+\def\mhchem@arrow@equilibriumLeft{%
+ \mhchem@arrow@deployType={equilibriumLeft}%
+ \futurelet\lookahead\mhchem@arrow@deploy%
}
-\newtoks\tok@mhchem@ce@iii%
-\def\mhchem@ce@iii@tmp@i{}%
-\def\mhchem@ce@iii@tmp@ii{}%
-\def\mhchem@ce@iii#1\mhchem@empty{%
- \tok@mhchem@ce@iii{#1}%
- \edef\mhchem@ce@iii@tmp@i{\the\tok@mhchem@ce@iii}%
- %
- \def\mhchem@ce@iii@tmp@ii{(^)}%
- \ifx\mhchem@ce@iii@tmp@i\mhchem@ce@iii@tmp@ii%
- {}\mathop{\uparrow}{}%
- \else\def\mhchem@ce@iii@tmp@ii{^}%
- \ifx\mhchem@ce@iii@tmp@i\mhchem@ce@iii@tmp@ii%
- {}\mathop{\uparrow}{}%
- \else\def\mhchem@ce@iii@tmp@ii{(v)}%
- \ifx\mhchem@ce@iii@tmp@i\mhchem@ce@iii@tmp@ii%
- {}\mathop{\downarrow}{}%
- \else\def\mhchem@ce@iii@tmp@ii{v}%
- \ifx\mhchem@ce@iii@tmp@i\mhchem@ce@iii@tmp@ii%
- {}\mathop{\downarrow}{}%
- \else%
- \mhchem@cf{#1}%
- \fi\fi\fi\fi%
-}%
-
-\def\mhchem@ce@cmath#1#2\mhchem@END{\mhchem@cmath{#1}\mhchem@cf{#2}}
-\def\mhchem@ce@label#1#2\mhchem@END{\label{#1}\mhchem@cf{#2}}
-\def\mhchem@ce@tag#1#2\mhchem@END{\tag{#1}\mhchem@cf{#2}}
-%%%%%%%%%%%%%
-%%% arrows
-
-\newlength{\mhchem@arrowminlength}
-\setlength{\mhchem@arrowminlength}{1em}
-%TODO: adapt min length to each of the math modes
+%%% Definition of arrows (with math text) for font/pgf/pgf-filled
+\newcommandtwoopt*\mhchem@arrow@yieldsM[2][][]{}
+\newcommandtwoopt*\mhchem@arrow@yieldsLeftM[2][][]{}
+\newcommandtwoopt*\mhchem@arrow@yieldsLeftRightM[2][][]{}
+\newcommandtwoopt*\mhchem@arrow@mesomerismM[2][][]{}
+\newcommandtwoopt*\mhchem@arrow@equilibriumM[2][][]{}
+\newcommandtwoopt*\mhchem@arrow@equilibriumRightM[2][][]{}
+\newcommandtwoopt*\mhchem@arrow@equilibriumLeftM[2][][]{}
+\newcommand\mhchem@definearrows[1]{%
+ %%% font
+ \ifthenelse{\equal{#1}{font}}{%
+ \renewcommandtwoopt*\mhchem@arrow@yieldsM[2][][]{%
+ \ensuremath{{}\mhchem@ext@arrow{5}{9}{##1}{5}{9}{##2}{\mhchem@arrow@minlength}{\rightarrowfill@}{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@yieldsLeftM[2][][]{%
+ \ensuremath{{}\mhchem@ext@arrow{9}{5}{##1}{9}{5}{##2}{\mhchem@arrow@minlength}{\leftarrowfill@}{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@yieldsLeftRightM[2][][]{%
+ \ensuremath{{}\mathrel{%
+ \@ifempty{##2}%
+ {\rlap{\raisebox{.44ex}{$\mhchem@ext@arrow{9}{9}{##1}{9}{9}{}{\mhchem@arrow@minlength}{\rightarrowfill@}$}}}%
+ {\rlap{\raisebox{.44ex}{$\mhchem@ext@arrow{9}{9}{##1}{9}{9}{\hphantom{##2}}{\mhchem@arrow@minlength}{\rightarrowfill@}$}}}%
+ \@ifempty{##1}%
+ {\raisebox{-.44ex}{$\mhchem@ext@arrow{9}{9}{}{9}{9}{##2}{\mhchem@arrow@minlength}{\leftarrowfill@}$}}%
+ {\raisebox{-.44ex}{$\mhchem@ext@arrow{9}{9}{\hphantom{##1}}{9}{9}{##2}{\mhchem@arrow@minlength}{\leftarrowfill@}$}}%
+ }{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@mesomerismM[2][][]{%
+ \ensuremath{{}\mhchem@ext@arrow{9}{9}{##1}{9}{9}{##2}{\mhchem@arrow@minlength}{\leftrightarrowfill@}{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@equilibriumM[2][][]{%
+ \ensuremath{{}\mathrel{%
+ \@ifempty{##2}%
+ {\rlap{\raisebox{.22ex}{$\mhchem@ext@arrow{5}{9}{##1}{9}{9}{}{\mhchem@arrow@minlength}{\mhchem@rightharpoonupfill@}$}}}%
+ {\rlap{\raisebox{.22ex}{$\mhchem@ext@arrow{9}{9}{##1}{9}{5}{\hphantom{##2}}{\mhchem@arrow@minlength}{\mhchem@rightharpoonupfill@}$}}}%
+ \@ifempty{##1}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow{9}{9}{}{9}{5}{##2}{\mhchem@arrow@minlength}{\mhchem@leftharpoondownfill@}$}}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow{5}{9}{\hphantom{##1}}{9}{9}{##2}{\mhchem@arrow@minlength}{\mhchem@leftharpoondownfill@}$}}%
+ }{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@equilibriumRightM[2][][]{%
+ \ensuremath{{}\mathrel{%
+ \@ifempty{##1}{% if only above, center optically; if above AND below, center exactly to avoid misalignment
+ \rlap{\raisebox{-.22ex}{$\kern0.5em\mhchem@ext@arrow{0}{0}{}{9}{5}{##2}{\mhchem@arrow@minlength-1em}{\mhchem@leftharpoondownfill@}$}}%
+ \@ifempty{##2}%
+ {\raisebox{.22ex}{$\mhchem@ext@arrow{0}{0}{}{0}{0}{}{\mhchem@arrow@minlength}{\mhchem@rightharpoonupfill@}$}}%
+ {\raisebox{.22ex}{$\mhchem@ext@arrow{0}{0}{}{9}{5}{\hphantom{##2}\kern1em}{\mhchem@arrow@minlength}{\mhchem@rightharpoonupfill@}$}}%
+ }{%
+ \rlap{\raisebox{-.22ex}{$\kern0.5em\mhchem@ext@arrow{5}{9}{\hphantom{##1}\kern-1em}{9}{9}{##2}{\mhchem@arrow@minlength-1em}{\mhchem@leftharpoondownfill@}$}}%
+ \@ifempty{##2}%
+ {\raisebox{.22ex}{$\mhchem@ext@arrow{5}{9}{##1}{0}{0}{}{\mhchem@arrow@minlength}{\mhchem@rightharpoonupfill@}$}}%
+ {\raisebox{.22ex}{$\mhchem@ext@arrow{9}{9}{##1}{9}{9}{\hphantom{##2}\kern1em}{\mhchem@arrow@minlength}{\mhchem@rightharpoonupfill@}$}}%
+ }%
+ }{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@equilibriumLeftM[2][][]{%
+ \ensuremath{{}\mathrel{%
+ \@ifempty{##2}{%
+ \rlap{\raisebox{.22ex}{$\kern0.5em\mhchem@ext@arrow{5}{9}{##1}{0}{0}{}{\mhchem@arrow@minlength-1em}{\mhchem@rightharpoonupfill@}$}}%
+ \@ifempty{##1}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow{0}{0}{}{0}{0}{}{\mhchem@arrow@minlength}{\mhchem@leftharpoondownfill@}$}}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow{5}{9}{\hphantom{##1}\kern1em}{0}{0}{}{\mhchem@arrow@minlength}{\mhchem@leftharpoondownfill@}$}}%
+ }{%
+ \rlap{\raisebox{.22ex}{$\kern0.5em\mhchem@ext@arrow{9}{9}{##1}{5}{9}{\hphantom{##2}\kern-1em}{\mhchem@arrow@minlength-1em}{\mhchem@rightharpoonupfill@}$}}%
+ \@ifempty{##1}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow{0}{0}{}{9}{5}{##2}{\mhchem@arrow@minlength}{\mhchem@leftharpoondownfill@}$}}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow{9}{9}{\hphantom{##1}\kern1em}{9}{9}{##2}{\mhchem@arrow@minlength}{\mhchem@leftharpoondownfill@}$}}%
+ }%
+ }{}}}%
+ %%% pgf
+ }{\ifthenelse{\equal{#1}{pgf} \or \equal{#1}{pgf-filled}}{%
+ \renewcommandtwoopt*\mhchem@arrow@yieldsM[2][][]{%
+ \ensuremath{{}\mhchem@ext@arrow@pgf{5}{9}{##1}{5}{9}{##2}{\mhchem@arrow@minlength}{\mhchem@rightarrow@pgf}{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@yieldsLeftM[2][][]{%
+ \ensuremath{{}\mhchem@ext@arrow@pgf{9}{5}{##1}{9}{5}{##2}{\mhchem@arrow@minlength}{\mhchem@leftarrow@pgf}{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@yieldsLeftRightM[2][][]{%
+ \ensuremath{{}\mathrel{%
+ \@ifempty{##2}%
+ {\rlap{\raisebox{.44ex}{$\mhchem@ext@arrow@pgf{9}{9}{##1}{9}{9}{}{\mhchem@arrow@minlength}{\mhchem@rightarrow@pgf}$}}}%
+ {\rlap{\raisebox{.44ex}{$\mhchem@ext@arrow@pgf{9}{9}{##1}{9}{9}{\hphantom{##2}}{\mhchem@arrow@minlength}{\mhchem@rightarrow@pgf}$}}}%
+ \@ifempty{##1}%
+ {\raisebox{-.44ex}{$\mhchem@ext@arrow@pgf{9}{9}{}{9}{9}{##2}{\mhchem@arrow@minlength}{\mhchem@leftarrow@pgf}$}}%
+ {\raisebox{-.44ex}{$\mhchem@ext@arrow@pgf{9}{9}{\hphantom{##1}}{9}{9}{##2}{\mhchem@arrow@minlength}{\mhchem@leftarrow@pgf}$}}%
+ }{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@mesomerismM[2][][]{%
+ \ensuremath{{}\mhchem@ext@arrow@pgf{9}{9}{##1}{9}{9}{##2}{\mhchem@arrow@minlength}{\mhchem@leftrightarrow@pgf}{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@equilibriumM[2][][]{%
+ \ensuremath{{}\mathrel{%
+ \@ifempty{##2}%
+ {\rlap{\raisebox{.22ex}{$\mhchem@ext@arrow@pgf{5}{9}{##1}{9}{9}{}{\mhchem@arrow@minlength}{\mhchem@rightharpoonup@pgf}$}}}%
+ {\rlap{\raisebox{.22ex}{$\mhchem@ext@arrow@pgf{9}{9}{##1}{9}{5}{\hphantom{##2}}{\mhchem@arrow@minlength}{\mhchem@rightharpoonup@pgf}$}}}%
+ \@ifempty{##1}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow@pgf{9}{9}{}{9}{5}{##2}{\mhchem@arrow@minlength}{\mhchem@leftharpoondown@pgf}$}}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow@pgf{5}{9}{\hphantom{##1}}{9}{9}{##2}{\mhchem@arrow@minlength}{\mhchem@leftharpoondown@pgf}$}}%
+ }{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@equilibriumRightM[2][][]{%
+ \ensuremath{{}\mathrel{%
+ \@ifempty{##1}{% if only above, center optically; if above AND below, center exactly to avoid misalignment
+ \rlap{\raisebox{-.22ex}{$\kern0.5em\mhchem@ext@arrow@pgf{0}{0}{}{9}{5}{##2}{\mhchem@arrow@minlength-1em}{\mhchem@leftharpoondown@pgf}$}}%
+ \@ifempty{##2}%
+ {\raisebox{.22ex}{$\mhchem@ext@arrow@pgf{0}{0}{}{0}{0}{}{\mhchem@arrow@minlength}{\mhchem@rightharpoonup@pgf}$}}%
+ {\raisebox{.22ex}{$\mhchem@ext@arrow@pgf{0}{0}{}{9}{5}{\hphantom{##2}\kern1em}{\mhchem@arrow@minlength}{\mhchem@rightharpoonup@pgf}$}}%
+ }{%
+ \rlap{\raisebox{-.22ex}{$\kern0.5em\mhchem@ext@arrow@pgf{5}{9}{\hphantom{##1}\kern-1em}{9}{9}{##2}{\mhchem@arrow@minlength-1em}{\mhchem@leftharpoondown@pgf}$}}%
+ \@ifempty{##2}%
+ {\raisebox{.22ex}{$\mhchem@ext@arrow@pgf{5}{9}{##1}{0}{0}{}{\mhchem@arrow@minlength}{\mhchem@rightharpoonup@pgf}$}}%
+ {\raisebox{.22ex}{$\mhchem@ext@arrow@pgf{9}{9}{##1}{9}{9}{\hphantom{##2}\kern1em}{\mhchem@arrow@minlength}{\mhchem@rightharpoonup@pgf}$}}%
+ }%
+ }{}}}%
+ \renewcommandtwoopt*\mhchem@arrow@equilibriumLeftM[2][][]{%
+ \ensuremath{{}\mathrel{%
+ \@ifempty{##2}{%
+ \rlap{\raisebox{.22ex}{$\kern0.5em\mhchem@ext@arrow@pgf{5}{9}{##1}{0}{0}{}{\mhchem@arrow@minlength-1em}{\mhchem@rightharpoonup@pgf}$}}%
+ \@ifempty{##1}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow@pgf{0}{0}{}{0}{0}{}{\mhchem@arrow@minlength}{\mhchem@leftharpoondown@pgf}$}}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow@pgf{5}{9}{\hphantom{##1}\kern1em}{0}{0}{}{\mhchem@arrow@minlength}{\mhchem@leftharpoondown@pgf}$}}%
+ }{%
+ \rlap{\raisebox{.22ex}{$\kern0.5em\mhchem@ext@arrow@pgf{9}{9}{##1}{5}{9}{\hphantom{##2}\kern-1em}{\mhchem@arrow@minlength-1em}{\mhchem@rightharpoonup@pgf}$}}%
+ \@ifempty{##1}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow@pgf{0}{0}{}{9}{5}{##2}{\mhchem@arrow@minlength}{\mhchem@leftharpoondown@pgf}$}}%
+ {\raisebox{-.22ex}{$\mhchem@ext@arrow@pgf{9}{9}{\hphantom{##1}\kern1em}{9}{9}{##2}{\mhchem@arrow@minlength}{\mhchem@leftharpoondown@pgf}$}}%
+ }%
+ }{}}}%
+ \ifthenelse{\equal{#1}{pgf}}{%
+ \let\mhchem@rightarrow@pgf\mhchem@rightarrow@pgfopen%
+ \let\mhchem@leftarrow@pgf\mhchem@leftarrow@pgfopen%
+ \let\mhchem@leftrightarrow@pgf\mhchem@leftrightarrow@pgfopen%
+ \let\mhchem@rightharpoonup@pgf\mhchem@rightharpoonup@pgfopen%
+ \let\mhchem@leftharpoondown@pgf\mhchem@leftharpoondown@pgfopen%
+ }{%
+ \let\mhchem@rightarrow@pgf\mhchem@rightarrow@pgffilled%
+ \let\mhchem@leftarrow@pgf\mhchem@leftarrow@pgffilled%
+ \let\mhchem@leftrightarrow@pgf\mhchem@leftrightarrow@pgffilled%
+ \let\mhchem@rightharpoonup@pgf\mhchem@rightharpoonup@pgffilled%
+ \let\mhchem@leftharpoondown@pgf\mhchem@leftharpoondown@pgffilled%
+ }%
+ }{%
+ \PackageError{mhchem}{The option font=#1 is not supported}%
+ }}%
+}
-%%% for font arrows
-%%%%% idea taken from http://www.texnik.de/misc/harpoon.phtml
+%%% Arrow compositions with text or chemistry
+\newtoks\mhchem@arrow@params%
+\def\mhchem@arrow@setParamsT#1#2{%
+ \mhchem@arrow@params={}%
+ \@ifnotempty{#1}{\mhchem@appendToks{\mhchem@arrow@params}{[\text{#1}]}}%
+ \@ifnotempty{#2}{\mhchem@appendToks{\mhchem@arrow@params}{[\text{#2}]}}%
+}%
+\def\mhchem@arrow@setParamsC#1#2{%
+ \mhchem@arrow@params={}%
+ \@ifnotempty{#1}{\mhchem@appendToks{\mhchem@arrow@params}{[\ce{#1}]}}%
+ \@ifnotempty{#2}{\mhchem@appendToks{\mhchem@arrow@params}{[\ce{#2}]}}%
+}%
+\newcommandtwoopt*\mhchem@arrow@yieldsT[2][][]{%
+ \mhchem@arrow@setParamsT{#1}{#2}%
+ \expandafter\mhchem@arrow@yieldsM\the\mhchem@arrow@params}%
+\newcommandtwoopt*\mhchem@arrow@yieldsC[2][][]{%
+ \mhchem@arrow@setParamsC{#1}{#2}%
+ \expandafter\mhchem@arrow@yieldsM\the\mhchem@arrow@params}%
+\newcommandtwoopt*\mhchem@arrow@yieldsLeftT[2][][]{%
+ \mhchem@arrow@setParamsT{#1}{#2}%
+ \expandafter\mhchem@arrow@yieldsLeftM\the\mhchem@arrow@params}%
+\newcommandtwoopt*\mhchem@arrow@yieldsLeftC[2][][]{%
+ \mhchem@arrow@setParamsC{#1}{#2}%
+ \expandafter\mhchem@arrow@yieldsLeftM\the\mhchem@arrow@params}%
+\newcommandtwoopt*\mhchem@arrow@yieldsLeftRightT[2][][]{%
+ \mhchem@arrow@setParamsT{#1}{#2}%
+ \expandafter\mhchem@arrow@yieldsLeftRightM\the\mhchem@arrow@params}%
+\newcommandtwoopt*\mhchem@arrow@yieldsLeftRightC[2][][]{%
+ \mhchem@arrow@setParamsC{#1}{#2}%
+ \expandafter\mhchem@arrow@yieldsLeftRightM\the\mhchem@arrow@params}%
+\newcommandtwoopt*\mhchem@arrow@mesomerismT[2][][]{%
+ \mhchem@arrow@setParamsT{#1}{#2}%
+ \expandafter\mhchem@arrow@mesomerismM\the\mhchem@arrow@params}%
+\newcommandtwoopt*\mhchem@arrow@mesomerismC[2][][]{%
+ \mhchem@arrow@setParamsC{#1}{#2}%
+ \expandafter\mhchem@arrow@mesomerismM\the\mhchem@arrow@params}%
+\newcommandtwoopt*{\mhchem@arrow@equilibriumT}[2][][]{%
+ \mhchem@arrow@setParamsT{#1}{#2}%
+ \expandafter\mhchem@arrow@equilibriumM\the\mhchem@arrow@params}%
+\newcommandtwoopt*{\mhchem@arrow@equilibriumC}[2][][]{%
+ \mhchem@arrow@setParamsC{#1}{#2}%
+ \expandafter\mhchem@arrow@equilibriumM\the\mhchem@arrow@params}%
+\newcommandtwoopt*{\mhchem@arrow@equilibriumRightT}[2][][]{%
+ \mhchem@arrow@setParamsT{#1}{#2}%
+ \expandafter\mhchem@arrow@equilibriumRightM\the\mhchem@arrow@params}%
+\newcommandtwoopt*{\mhchem@arrow@equilibriumRightC}[2][][]{%
+ \mhchem@arrow@setParamsC{#1}{#2}%
+ \expandafter\mhchem@arrow@equilibriumRightM\the\mhchem@arrow@params}%
+\newcommandtwoopt*{\mhchem@arrow@equilibriumLeftT}[2][][]{%
+ \mhchem@arrow@setParamsT{#1}{#2}%
+ \expandafter\mhchem@arrow@equilibriumLeftM\the\mhchem@arrow@params}%
+\newcommandtwoopt*{\mhchem@arrow@equilibriumLeftC}[2][][]{%
+ \mhchem@arrow@setParamsC{#1}{#2}%
+ \expandafter\mhchem@arrow@equilibriumLeftM\the\mhchem@arrow@params}%
+
+%%% Font arrows
+\def\mhchem@ext@arrow#1#2#3#4#5#6#7#8{% adaption of amsmath's ext@arrow
+ \mathrel{%
+ \mathop{\makebox[#7]{#8\displaystyle}}%
+ \limits%
+ \@ifnotempty{#3}{^{\mkern#1mu#3\mkern#2mu}}%
+ \@ifnotempty{#6}{_{\mkern#4mu#6\mkern#5mu}}%
+ }%
+}
\def\mhchem@rightharpoonupfill@{\arrowfill@\relbar\relbar\rightharpoonup}
\def\mhchem@leftharpoondownfill@{\arrowfill@\leftharpoondown\relbar\relbar}
-\newcommand*\mhchem@xrightleftharpoons[2][]{%
+
+%%% pgf arrows
+\newlength{\mhchem@arrowlength@pgf}
+\def\mhchem@ext@arrow@pgf#1#2#3#4#5#6#7#8{%
+ \setlength\mhchem@arrowlength@pgf{\widthof{\ensuremath{%
+ \mhchem@ext@arrow{#1}{#2}{#3}{#4}{#5}{#6}{#7}{\rightarrowfill@}%
+ }}}%
\mathrel{%
- \rlap{\protect\raisebox{.22ex}{$\ext@arrow 3399\mhchem@rightharpoonupfill@{}{\mhchem@mathbox[#1]{#2}}$}}%
- \raisebox{-.22ex}{$\ext@arrow 3399\mhchem@leftharpoondownfill@{#1}{\hphantom{#2}}$}}}%
-\newsavebox\mhchem@arrows@box%
-\newcommand*\mhchem@xlongrightshortleftharpoons[2][]{\mathrel{%
- \sbox{\mhchem@arrows@box}%
- {$\mkern9mu\ext@arrow 3399\mhchem@leftharpoondownfill@%
- {#1}{\hphantom{#2}\mkern-6mu\mkern-12mu}$}%
- \rlap{\protect\raisebox{-.22ex}{\usebox{\mhchem@arrows@box}}}%
- \protect\raisebox{.22ex}{$\ext@arrow 3399\mhchem@rightharpoonupfill@%
- {\hphantom{\usebox{\mhchem@arrows@box}}\mkern-6mu}{#2}$}%
- }}
-\newcommand*\mhchem@xshortrightlongleftharpoons[2][]{\mathrel{%
- \sbox{\mhchem@arrows@box}%
- {$\mkern9mu\ext@arrow 3399\mhchem@rightharpoonupfill@%
- {\hphantom{#1}\mkern-6mu\mkern-12mu}{#2}$}%
- \rlap{\protect\raisebox{.22ex}{\usebox{\mhchem@arrows@box}}}%
- \protect\raisebox{-.22ex}{$\ext@arrow 3399\mhchem@leftharpoondownfill@%
- {#1}{\hphantom{\usebox{\mhchem@arrows@box}}\mkern-6mu}$}%
- }}
-%\newcommand*\mhchem@xleftrightarrow[2][]{\ext@arrow 3095\leftrightarrowfill@{#1}{#2}}
-
-
-%%% for pgf arrows
-\newcommand*\mhchem@rightarrow@pgf[1]{%
+ \mathop{\kern0.7pt#8{\mhchem@arrowlength@pgf-1.8pt}\kern0.7pt}%
+ \limits%
+ \@ifnotempty{#3}{^{\mkern#1mu#3\mkern#2mu}}%
+ \@ifnotempty{#6}{_{\mkern#4mu#6\mkern#5mu}}%
+ }%
+}%
+\newcommand*\mhchem@rightarrow@pgfopen[1]{%
\begin{tikzpicture}[baseline]%
\draw[use as bounding box] (0,0) (#1,0.85ex);
\draw[cap=round, join=round, line width=0.09ex]
@@ -346,7 +662,7 @@
arc (110:162:0.6ex);
\end{tikzpicture}%
}%
-\newcommand*\mhchem@leftarrow@pgf[1]{%
+\newcommand*\mhchem@leftarrow@pgfopen[1]{%
\begin{tikzpicture}[baseline]%
\draw[use as bounding box] (0,0) (#1,0.85ex);
\draw[cap=round, join=round, line width=0.09ex]
@@ -355,47 +671,34 @@
arc (-70:-18:0.6ex);
\end{tikzpicture}%
}%
-\newcommand*\mhchem@leftrightarrow@pgf[1]{%
+\newcommand*\mhchem@leftrightarrow@pgfopen[1]{%
\begin{tikzpicture}[baseline]%
\draw[use as bounding box] (0,0) (#1,0.85ex);
\draw[cap=round, join=round, line width=0.09ex]
- (0cm,0.575ex)
- arc (70:18:0.6ex) arc (18:70:0.6ex)
- arc (-70:-18:0.6ex) arc (-18:-70:0.6ex)
- -- ++(#1,0cm)
- arc (250:198:0.6ex) arc (198:250:0.6ex)
- arc (110:162:0.6ex);
+ (0cm,0.575ex)
+ arc (70:18:0.6ex) arc (18:70:0.6ex)
+ arc (-70:-18:0.6ex) arc (-18:-70:0.6ex)
+ -- ++(#1,0cm)
+ arc (250:198:0.6ex) arc (198:250:0.6ex)
+ arc (110:162:0.6ex);
\end{tikzpicture}%
}%
-\newcommand*\mhchem@leftrightharpoon@pgf[1]{%
+\newcommand*\mhchem@rightharpoonup@pgfopen[1]{%
\begin{tikzpicture}[baseline]%
- \draw[use as bounding box] (0,0) (#1,1ex);
- \draw[cap=round, join=round, line width=0.09ex]
- (0cm,0.575ex+0.22ex) -- ++(#1,0cm) arc (250:198:0.9ex);
- \draw[cap=round, join=round, line width=0.09ex]
- (#1,0.575ex-0.22ex) -- ++(-#1,0cm) arc (70:18:0.9ex);
- \end{tikzpicture}%
-}%
-\newcommand*\mhchem@longrightshortleftharpoons@pgf[1]{%
- \begin{tikzpicture}[baseline]%
- \draw[use as bounding box] (0,0) (#1,1ex);
- \draw[cap=round, join=round, line width=0.09ex]
- (0.0cm,0.575ex+0.22ex) -- ++(#1,0cm) arc (250:198:0.9ex);
+ \draw[use as bounding box] (0,0) (#1,0.85ex);
\draw[cap=round, join=round, line width=0.09ex]
- (#1+0.5em-1em,0.575ex-0.22ex) -- (0.5em,0.575ex-0.22ex) arc (70:18:0.9ex);
+ (0cm,0.575ex) -- ++(#1,0cm) arc (250:198:0.6ex);
\end{tikzpicture}%
-}%
-\newcommand*\mhchem@shortrightlongleftharpoons@pgf[1]{%
+}%
+\newcommand*\mhchem@leftharpoondown@pgfopen[1]{%
\begin{tikzpicture}[baseline]%
- \draw[use as bounding box] (0,0) (#1,1ex);
- \draw[cap=round, join=round, line width=0.09ex]
- (0.5em,0.575ex+0.22ex) -- ++(#1-1em,0cm) arc (250:198:0.9ex);
+ \draw[use as bounding box] (0,0) (#1,0.85ex);
\draw[cap=round, join=round, line width=0.09ex]
- (#1,0.575ex-0.22ex) -- ++(-#1,0cm) arc (70:18:0.9ex);
+ (0cm,0.575ex) arc (70:18:0.6ex) arc (18:70:0.6ex)
+ -- ++(#1,0cm);
\end{tikzpicture}%
}%
-%%% for pgf-filled arrows
\newcommand*\mhchem@rightarrow@pgffilled[1]{%
\begin{tikzpicture}[baseline]%
\draw[use as bounding box] (0,0) (#1,0.85ex);
@@ -426,253 +729,45 @@
\draw[cap=round, join=round, line width=0.09ex, shorten >=0.01ex]
(0cm,0.575ex) -- ++(#1,0cm);
\filldraw[cap=round, join=round, line width=0.09ex]
- (#1,0.575ex)
- -- ++(-0.6ex,0.2ex) -- ++(0.15ex,-0.2ex)
- -- ++(-0.15ex,-0.2ex)
- -- cycle;
- \filldraw[cap=round, join=round, line width=0.09ex]
(0cm,0.575ex)
-- ++(0.6ex,0.2ex) -- ++(-0.15ex,-0.2ex)
-- ++(+0.15ex,-0.2ex)
- -- cycle;
- \end{tikzpicture}%
-}%
-\newcommand*\mhchem@leftrightharpoon@pgffilled[1]{%
- \begin{tikzpicture}[baseline]%
- \draw[use as bounding box] (0,0) (#1,1ex);
- \draw[cap=round, join=round, line width=0.09ex, shorten >=0.01ex]
- (0cm,0.575ex+0.22ex) -- ++(#1,0cm);
- \filldraw[cap=round, join=round, line width=0.09ex]
- (#1,0.575ex+0.22ex)
- -- ++(-0.6ex,0.25ex) -- ++(0.15ex,-0.25ex)
-- cycle;
- \draw[cap=round, join=round, line width=0.09ex, shorten >=0.01ex]
- (0cm,0.575ex-0.22ex) -- ++(#1,0cm);
\filldraw[cap=round, join=round, line width=0.09ex]
- (0cm,0.575ex-0.22ex)
- -- ++(0.6ex,-0.25ex) -- ++(-0.15ex,0.25ex)
+ (#1,0.575ex)
+ -- ++(-0.6ex,0.2ex) -- ++(0.15ex,-0.2ex)
+ -- ++(-0.15ex,-0.2ex)
-- cycle;
\end{tikzpicture}%
-}%
-\newcommand*\mhchem@longrightshortleftharpoons@pgffilled[1]{%
+}%
+\newcommand*\mhchem@rightharpoonup@pgffilled[1]{%
\begin{tikzpicture}[baseline]%
- \draw[use as bounding box] (0,0) (#1,1ex);
+ \draw[use as bounding box] (0,0) (#1,0.85ex);
\draw[cap=round, join=round, line width=0.09ex, shorten >=0.01ex]
- (0cm,0.575ex+0.22ex) -- ++(#1,0cm);
+ (0cm,0.575ex) -- ++(#1,0cm);
\filldraw[cap=round, join=round, line width=0.09ex]
- (#1,0.575ex+0.22ex)
+ (#1,0.575ex)
-- ++(-0.6ex,0.25ex) -- ++(0.15ex,-0.25ex)
-- cycle;
- \draw[cap=round, join=round, line width=0.09ex, shorten >=0.01ex]
- (0.5em,0.575ex-0.22ex) -- ++(#1-1em,0cm);
- \filldraw[cap=round, join=round, line width=0.09ex]
- (0.5em,0.575ex-0.22ex)
- -- ++(0.6ex,-0.25ex) -- ++(-0.15ex,0.25ex)
- -- cycle;
\end{tikzpicture}%
-}%
-\newcommand*\mhchem@shortrightlongleftharpoons@pgffilled[1]{%
+}%
+\newcommand*\mhchem@leftharpoondown@pgffilled[1]{%
\begin{tikzpicture}[baseline]%
- \draw[use as bounding box] (0,0) (#1,1ex);
- \draw[cap=round, join=round, line width=0.09ex, shorten >=0.01ex]
- (0.5em,0.575ex+0.22ex) -- ++(#1-1em,0cm);
- \filldraw[cap=round, join=round, line width=0.09ex]
- (#1-0.5em,0.575ex+0.22ex)
- -- ++(-0.6ex,0.25ex) -- ++(0.15ex,-0.25ex)
- -- cycle;
+ \draw[use as bounding box] (0,0) (#1,0.85ex);
\draw[cap=round, join=round, line width=0.09ex, shorten >=0.01ex]
- (0cm,0.575ex-0.22ex) -- ++(#1,0cm);
+ (0cm,0.575ex) -- ++(#1,0cm);
\filldraw[cap=round, join=round, line width=0.09ex]
- (0cm,0.575ex-0.22ex)
+ (0cm,0.575ex)
-- ++(0.6ex,-0.25ex) -- ++(-0.15ex,0.25ex)
-- cycle;
\end{tikzpicture}%
}%
-\newlength{\mhchem@arrowlength@pgf}
-\newlength{\mhchem@arrowminlength@pgf}
-%TODO: use \mhchem@arrowminlength
-\def\mhchem@labeledarrow@pgf#1#2#3#4#5#6#7{% 1-4 muskips 5 arrow 6 text above 7 below
- \setlength\mhchem@arrowlength@pgf{\widthof{\ensuremath{%
- \mkern#3mu%
- \mathop{}%
- \limits%
- \@ifnotempty{#7}{^{\if0#1\else\mkern#1mu\fi%
- #7\if0#2\else\mkern#2mu\fi}}%
- \@ifnotempty{#6}{_{\if0#1\else\mkern#1mu\fi%
- #6\if0#2\else\mkern#2mu\fi}}%
- \mkern#4mu%
- }}}%
- %
- \setlength\mhchem@arrowminlength@pgf{10pt+0.5em}%
- \ifthenelse{\equal{mhchem@longrightshortleftharpoons@pgf}{#5}}{
- \setlength\mhchem@arrowminlength@pgf{1.85em}%
- \setlength\mhchem@arrowlength@pgf{\widthof{\ensuremath{%
- \mkern#3mu%
- \mathop{}%
- \limits%
- \@ifnotempty{#7}{^{\if0#1\else\mkern#1mu\fi%
- #7\if0#2\else\mkern#2mu\fi}}%
- \@ifnotempty{#6}{_{\if0#1\else\mkern#1mu\fi%
- \hspace{1em}% %%
- #6\if0#2\else\mkern#2mu\fi}}%
- \mkern#4mu%
- }}}%
- }{}%
- \ifthenelse{\equal{mhchem@shortrightlongleftharpoons@pgf}{#5}}{
- \setlength\mhchem@arrowminlength@pgf{1.85em}%
- \setlength\mhchem@arrowlength@pgf{\widthof{\ensuremath{%
- \mkern#3mu%
- \mathop{}%
- \limits%
- \@ifnotempty{#7}{^{\if0#1\else\mkern#1mu\fi%
- \hspace{1em}% %%
- #7\if0#2\else\mkern#2mu\fi}}%
- \@ifnotempty{#6}{_{\if0#1\else\mkern#1mu\fi%
- #6\if0#2\else\mkern#2mu\fi}}%
- \mkern#4mu%
- }}}%
- }{}%
- \ifthenelse{\equal{mhchem@longrightshortleftharpoons@pgffilled}{#5}}{
- \setlength\mhchem@arrowminlength@pgf{1.85em}%
- \setlength\mhchem@arrowlength@pgf{\widthof{\ensuremath{%
- \mkern#3mu%
- \mathop{}%
- \limits%
- \@ifnotempty{#7}{^{\if0#1\else\mkern#1mu\fi%
- #7\if0#2\else\mkern#2mu\fi}}%
- \@ifnotempty{#6}{_{\if0#1\else\mkern#1mu\fi%
- \hspace{1em}% %%
- #6\if0#2\else\mkern#2mu\fi}}%
- \mkern#4mu%
- }}}%
- }{}%
- \ifthenelse{\equal{mhchem@shortrightlongleftharpoons@pgffilled}{#5}}{
- \setlength\mhchem@arrowminlength@pgf{1.85em}%
- \setlength\mhchem@arrowlength@pgf{\widthof{\ensuremath{%
- \mkern#3mu%
- \mathop{}%
- \limits%
- \@ifnotempty{#7}{^{\if0#1\else\mkern#1mu\fi%
- \hspace{1em}% %%
- #7\if0#2\else\mkern#2mu\fi}}%
- \@ifnotempty{#6}{_{\if0#1\else\mkern#1mu\fi%
- #6\if0#2\else\mkern#2mu\fi}}%
- \mkern#4mu%
- }}}%
- }{}%
- %
- \ifdim\mhchem@arrowlength@pgf<\mhchem@arrowminlength@pgf%
- \setlength\mhchem@arrowlength@pgf{\mhchem@arrowminlength@pgf}%
- \fi%
- \mathrel{\mkern#3mu\mathop{\csname#5\endcsname{\mhchem@arrowlength@pgf}%
- }%
- \limits
- \@ifnotempty{#7}{^{\if0#1\else\mkern#1mu\fi%
- #7\if0#2\else\mkern#2mu\fi}}%
- \@ifnotempty{#6}{_{\if0#1\else\mkern#1mu\fi%
- #6\if0#2\else\mkern#2mu\fi}}%
- \mkern#4mu%
- }%}
-}%
-
-\newcommandtwoopt*\mhchem@gives[2][][]{}
-\newcommandtwoopt*\mhchem@givesleft[2][][]{}
-\newcommandtwoopt*\mhchem@mesomeric[2][][]{}
-\newcommandtwoopt*\mhchem@equilibrium[2][][]{}
-\newcommandtwoopt*\mhchem@equilibriumRight[2][][]{}
-\newcommandtwoopt*\mhchem@equilibriumLeft[2][][]{}
-
-\newcommand\mhchem@definearrows[1]{%
- %%% font
- \ifthenelse{\equal{#1}{font}}{%
- \renewcommandtwoopt*\mhchem@gives[2][\hspace{\mhchem@arrowminlength}][]{\ensuremath{%
- \xrightarrow%
- [{##2}]%
- {##1}}}%
- \renewcommandtwoopt*\mhchem@givesleft[2][\hspace{\mhchem@arrowminlength}][]{\ensuremath{%
- \xleftarrow%
- [{##2}]%
- {##1}}}%
- \renewcommandtwoopt*\mhchem@mesomeric[2][\hspace{\mhchem@arrowminlength}][]{\ensuremath{%
- \ext@arrow 3399\leftrightarrowfill@%
- {##2}%
- {##1}}}%
- \renewcommandtwoopt*{\mhchem@equilibrium}[2][\hspace{\mhchem@arrowminlength}][]{\ensuremath{%
- \mhchem@xrightleftharpoons%
- [{##2}]%
- {##1}}}%
- \renewcommandtwoopt*{\mhchem@equilibriumRight}[2][\hphantom{\makebox[\mhchem@arrowminlength]{}}][]{\ensuremath{%
- \mhchem@xlongrightshortleftharpoons%
- [{##2}]%
- {##1}}}%
- \renewcommandtwoopt*{\mhchem@equilibriumLeft}[2][][\hspace{\mhchem@arrowminlength}]{\ensuremath{%
- \mhchem@xshortrightlongleftharpoons%
- [{##2}]%
- {##1}}}%
- }{%%% pgf
- \ifthenelse{\equal{#1}{pgf}}{%
- \renewcommandtwoopt*\mhchem@gives[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{1.5}{5}{1.5}{1}{mhchem@rightarrow@pgf}{##2}{##1}}}%
- \renewcommandtwoopt*\mhchem@givesleft[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{5}{1.5}{1}{1.5}{mhchem@leftarrow@pgf}{##2}{##1}}}%
- \renewcommandtwoopt*\mhchem@mesomeric[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{5}{5}{1}{1}{mhchem@leftrightarrow@pgf}{##2}{##1}}}%
- \renewcommandtwoopt*\mhchem@equilibrium[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{6}{6}{1}{1}{mhchem@leftrightharpoon@pgf}{##2}{##1}}}%
- \renewcommandtwoopt*\mhchem@equilibriumRight[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{6}{6}{1}{1}{mhchem@longrightshortleftharpoons@pgf}{##2}{##1}}}%
- \renewcommandtwoopt*\mhchem@equilibriumLeft[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{6}{6}{1}{1}{mhchem@shortrightlongleftharpoons@pgf}{##2}{##1}}}%
- }{%%% pgf-filled
- \ifthenelse{\equal{#1}{pgf-filled}}{%
- \renewcommandtwoopt*\mhchem@gives[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{1.5}{7}{1.5}{1}{mhchem@rightarrow@pgffilled}{##2}{##1}}}%
- \renewcommandtwoopt*\mhchem@givesleft[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{7}{1.5}{1}{1.5}{mhchem@leftarrow@pgffilled}{##2}{##1}}}%
- \renewcommandtwoopt*\mhchem@mesomeric[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{7}{7}{1}{1}{mhchem@leftrightarrow@pgffilled}{##2}{##1}}}%
- \renewcommandtwoopt*\mhchem@equilibrium[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{7}{7}{1}{1}{mhchem@leftrightharpoon@pgffilled}{##2}{##1}}}%
- \renewcommandtwoopt*\mhchem@equilibriumRight[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{7}{7}{1}{1}{mhchem@longrightshortleftharpoons@pgffilled}{##2}{##1}}}%
- \renewcommandtwoopt*\mhchem@equilibriumLeft[2][][]%
- {\ensuremath{\mhchem@labeledarrow@pgf{7}{7}{1}{1}{mhchem@shortrightlongleftharpoons@pgffilled}{##2}{##1}}}%
- }{%
- \PackageError{mhchem}{The option font=#1 is not supported}%
- }%
- }}%
-}
-
-\newcommandtwoopt*\mhchem@givesT[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@gives[\text{#1}][\text{#2}]}%
-\newcommandtwoopt*\mhchem@givesC[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@gives[\ce@main{#1}][\ce@main{#2}]}%
-\newcommandtwoopt*\mhchem@givesleftT[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@givesleft[\text{#1}][\text{#2}]}%
-\newcommandtwoopt*\mhchem@givesleftC[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@givesleft[\ce@main{#1}][\ce@main{#2}]}%
-\newcommandtwoopt*\mhchem@mesomericT[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@mesomeric[\text{#1}][\text{#2}]}%
-\newcommandtwoopt*\mhchem@mesomericC[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@mesomeric[\ce@main{#1}][\ce@main{#2}]}%
-\newcommandtwoopt*{\mhchem@equilibriumT}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@equilibrium[\text{#1}][\text{#2}]}
-\newcommandtwoopt*{\mhchem@equilibriumC}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@equilibrium[\ce@main{#1}][\ce@main{#2}]}
-\newcommandtwoopt*{\mhchem@equilibriumRightT}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@equilibriumRight[\text{#1}][\text{#2}]}
-\newcommandtwoopt*{\mhchem@equilibriumRightC}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@equilibriumRight[\ce@main{#1}][\ce@main{#2}]}
-\newcommandtwoopt*{\mhchem@equilibriumLeftT}[2][][\hspace{\mhchem@arrowminlength}]%
- {\mhchem@equilibriumLeft[\text{#1}][\text{#2}]}
-\newcommandtwoopt*{\mhchem@equilibriumLeftC}[2][][\hspace{\mhchem@arrowminlength}]%
- {\mhchem@equilibriumLeft[\ce@main{#1}][\ce@main{#2}]}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%% bonds %%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%
-%%% bonds %%%
-%
\newlength\mhchem@bondwidth%
\newlength\mhchem@bondheight%
\newlength\mhchem@smallbondwidth@tmpA%
@@ -694,46 +789,47 @@
\resizebox{\mhchem@smallbondwidth}{\mhchem@bondheight}{\sbond}\unskip%
\resizebox{\mhchem@smallbondwidth}{\mhchem@bondheight}{\sbond}%
\resizebox{\mhchem@smallbondwidth}{\mhchem@bondheight}{\sbond}}%
- \phantom{\sbond}}
+ \phantom{\sbond}}%
\def\mhchem@bond#1{%
- %
- \if ##\noexpand#1%
- \tbond%
- \else\ifx \tbond#1%
+ \ifnum\pdf@strcmp{#1}{-}=0%
+ \sbond%
+ \else\ifnum\pdf@strcmp{#1}{=}=0%
+ \dbond%
+ \else\ifnum\pdf@strcmp{#1}{##}=0%
\tbond%
- \else%
- \ifthenelse{\equal{#1}{-}}{\sbond}{%
- \ifthenelse{\equal{#1}{=}}{\dbond}{%
- \ifthenelse{\equal{#1}{~}}{%
+ \else\ifnum\pdf@strcmp{#1}{~}=0%
\mhchem@setbondwidth%
- \mhchem@halfbond}{%
- \ifthenelse{\equal{#1}{~-}}{%
+ \mhchem@halfbond%
+ \else\ifnum\pdf@strcmp{#1}{~-}=0%
\mhchem@setbondwidth%
\rlap{\protect\raisebox{.2ex}{\mhchem@halfbond}}%
- \protect\raisebox{-.2ex}{\sbond}}{%
- \ifthenelse{\equal{#1}{~--}}{%
+ \protect\raisebox{-.2ex}{\sbond}%
+ \else\ifnum\pdf@strcmp{#1}{~--}=0%
\mhchem@setbondwidth%
\rlap{\protect\raisebox{.4ex}{\mhchem@halfbond}}%
\rlap{\sbond}%
- \protect\raisebox{-.4ex}{\sbond}}{%
- \ifthenelse{\equal{#1}{~=}}{%
+ \protect\raisebox{-.4ex}{\sbond}%
+ \else\ifnum\pdf@strcmp{#1}{~=}=0%
\mhchem@setbondwidth%
\rlap{\protect\raisebox{.4ex}{\mhchem@halfbond}}%
\rlap{\sbond}%
- \protect\raisebox{-.4ex}{\sbond}}{%
- \ifthenelse{\equal{#1}{-~-}}{%
+ \protect\raisebox{-.4ex}{\sbond}%
+ \else\ifnum\pdf@strcmp{#1}{-~-}=0%
\mhchem@setbondwidth%
\rlap{\protect\raisebox{.4ex}{\sbond}}%
\rlap{\mhchem@halfbond}%
- \protect\raisebox{-.4ex}{\sbond}}{%
- \ifthenelse{\equal{#1}{...}}{{\cdot}{\cdot}{\cdot}}{%
- \ifthenelse{\equal{#1}{....}}{{\cdot}{\cdot}{\cdot}{\cdot}}{%
- \ifthenelse{\equal{#1}{->}}{{\rightarrow}}{%
- \ifthenelse{\equal{#1}{<-}}{{\leftarrow}}{%
- %
- \PackageError{mhchem}{unknown bond type in \string\bond (#1)}%
- }}}}}}}}}}}%
- \fi\fi%
+ \protect\raisebox{-.4ex}{\sbond}%
+ \else\ifnum\pdf@strcmp{#1}{...}=0%
+ {\cdot}{\cdot}{\cdot}%
+ \else\ifnum\pdf@strcmp{#1}{....}=0%
+ {\cdot}{\cdot}{\cdot}{\cdot}%
+ \else\ifnum\pdf@strcmp{#1}{->}=0%
+ {\rightarrow}%
+ \else\ifnum\pdf@strcmp{#1}{<-}=0%
+ {\leftarrow}%
+ \else
+ \PackageError{mhchem}{Unknown bond type in \string\bond (#1)}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -742,7 +838,6 @@
\newtoks\mhchem@cf@result%
\newcommand*\mhchem@cf[2][]{%
\bgroup%
- %%%
\def\sbond{{\ensuremath{-}}}%
\ifnum 2=\mhchem@option@version%
\let\bond\sbond%
@@ -753,7 +848,6 @@
\DeclareRobustCommand\tbond{\rlap{\protect\raisebox{.4ex}{\sbond}}%
\rlap{\sbond}\protect\raisebox{-.4ex}{\sbond}}%
\def\hyphen{\mhchem@hyphen}%
- %%%
\ifmmode\else\def\mhchem@option@alwaystextmode{1}\fi%
\if 1\mhchem@option@alwaystextmode%
\edef\mhchem@mathOrText##1{\noexpand\text{##1}}%
@@ -768,70 +862,45 @@
\fi%
\fi%
\ifmmode\else\mhchem@option@textFont\fi%
- %%%
\def\mhchem@cf@state{s}%
- %
- %
- %
- %
- %
- %
- %
- %
- %
- %
\def\mhchem@cf@startedWithBond{0}%
- %%%
\mhchem@cf@outputReset%
\mhchem@cf@result={}%
- %%%
\mhchem@cf@continue#2\mhchem@END%
- %%%
- %
- %
\ifthenelse{\equal{#1}{}}%
{%
- \ensuremath{\the\mhchem@cf@result}%
+ \ensuremath{\the\mhchem@cf@result}%
}{%
\ensuremath{\overset{#1}{\the\mhchem@cf@result}}%
}%
- %TODO: insert kerning if full stop (or similar) follows superscript
- %\@ifnextchar,{\kern-0.2em}{} ??%
\egroup%
}%
\def\mhchem@cf@i{%
- %
- %
- %%%
\ifx\mhchem@END\mhchem@cf@lookahead%
\if -\mhchem@cf@state%
\ifnum 4>\mhchem@option@version%
- \mhchem@cf@sup=\expandafter{\the\mhchem@cf@sup -}%
+ \mhchem@appendToks{\mhchem@cf@sup}{-}%
\else%
\if 0\mhchem@cf@startedWithBond%
- \mhchem@cf@sup=\expandafter{\the\mhchem@cf@sup -}%
+ \mhchem@appendToks{\mhchem@cf@sup}{-}%
\else%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\sbond}%
+ \mhchem@appendToks{\mhchem@cf@result}{\sbond}%
\fi%
\fi%
- \fi%
+ \else\if 1\mhchem@cf@state%
+ \def\mhchem@cf@state{9}%
+ \fi\fi%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\let\mhchem@cf@action\mhchem@gobble%
\else\ifx\relax\mhchem@cf@lookahead%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
\else\ifx\protect\mhchem@cf@lookahead%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- %%%
\else%
-%
-%
-%
-%
\if -\mhchem@cf@state%
- %
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\sbond}%
+ \mhchem@appendToks{\mhchem@cf@result}{\sbond}%
\def\mhchem@cf@state{+}%
\fi%
\if s\mhchem@cf@state%
@@ -841,25 +910,22 @@
\else\ifx \}\mhchem@cf@lookahead%
\def\mhchem@cf@state{a}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
- \else\ifx\bond\mhchem@cf@lookahead%
- \ifnum 2=\mhchem@option@version%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else%
- \def\mhchem@cf@state{C}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \fi%
- \else\if =\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\dbond}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\if ##\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\tbond}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
- \def\mhchem@cf@state{c}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else\if ^\mhchem@cf@lookahead%
+ \else\expandafter\ifx\mhchem@char@equal@other\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@equal@active\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\if ##\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \mhchem@appendToks{\mhchem@cf@result}{\tbond}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@super\mhchem@cf@lookahead%
+ \def\mhchem@cf@state{p}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@active\mhchem@cf@lookahead%
\def\mhchem@cf@state{p}%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
\else\if _\mhchem@cf@lookahead%
@@ -894,7 +960,16 @@
\else\if +\mhchem@cf@lookahead%
\def\mhchem@cf@state{+}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@sup}}%
- \else\if -\mhchem@cf@lookahead%
+ \else\expandafter\ifx\mhchem@char@hyphen@other\mhchem@cf@lookahead%
+ \ifnum 1<\mhchem@option@version%
+ \def\mhchem@cf@state{-}%
+ \def\mhchem@cf@startedWithBond{1}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else%
+ \def\mhchem@cf@state{+}%
+ \def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@sup}{-}}%
+ \fi%
+ \else\expandafter\ifx\mhchem@char@hyphen@active\mhchem@cf@lookahead%
\ifnum 1<\mhchem@option@version%
\def\mhchem@cf@state{-}%
\def\mhchem@cf@startedWithBond{1}%
@@ -920,13 +995,16 @@
\else\if *\mhchem@cf@lookahead%
\def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@result}%
{\mhchem@mathOrText@ii{{}\cdot{}}{\mhchem@option@textcdot}}}%
+ \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
+ \def\mhchem@cf@state{c}%
+ \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
\else\ifcat a\mhchem@cf@lookahead%
\def\mhchem@cf@state{a}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
\else\ifcat 1\mhchem@cf@lookahead%
\def\mhchem@cf@state{1}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@amount}}%
- \else\if\mhchem@lbracechar\mhchem@cf@lookahead%
+ \else\if\mhchem@char@lbrace\mhchem@cf@lookahead%
\ifnum 4>\mhchem@option@version%
\def\mhchem@cf@action{\mhchem@cf@appendNextGroup{\mhchem@cf@result}}%
\else%
@@ -943,16 +1021,16 @@
\fi%
\else%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else\if C\mhchem@cf@state%
- \if\mhchem@lbracechar\mhchem@cf@lookahead%
+ \if\mhchem@char@lbrace\mhchem@cf@lookahead%
\def\mhchem@cf@action{\mhchem@cf@appendNextGroup{\mhchem@cf@result}}%
\else%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
\fi%
\def\mhchem@cf@state{c}%
\else\if c\mhchem@cf@state%
- \if\mhchem@lbracechar\mhchem@cf@lookahead%
+ \if\mhchem@char@lbrace\mhchem@cf@lookahead%
\def\mhchem@cf@action{\mhchem@cf@appendNextGroup{\mhchem@cf@result}}%
\else%
\def\mhchem@cf@state{s}%
@@ -967,29 +1045,26 @@
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{a}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
- \else\ifx\bond\mhchem@cf@lookahead%
+ \else\expandafter\ifx\mhchem@char@equal@other\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \ifnum 2=\mhchem@option@version%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else%
- \def\mhchem@cf@state{C}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \fi%
- \else\if =\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\dbond}%
- \def\mhchem@cf@state{+}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\if ##\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\tbond}%
- \def\mhchem@cf@state{+}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@equal@active\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \def\mhchem@cf@state{c}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else\if ^\mhchem@cf@lookahead%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\if ##\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \mhchem@appendToks{\mhchem@cf@result}{\tbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@super\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \def\mhchem@cf@state{p}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@active\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{p}%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
@@ -1006,22 +1081,9 @@
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@amount}}%
\fi%
\else\if ,\mhchem@cf@lookahead%
- \ifnum 4>\mhchem@option@version%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \def\mhchem@cf@state{F}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else%
- \def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@amount}{{,}}}%
- \fi%
+ \def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@amount}{{,}}}%
\else\if .\mhchem@cf@lookahead%
- \ifnum 4>\mhchem@option@version%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \def\mhchem@cf@state{s}%
- \def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@result}%
- {\mhchem@mathOrText@ii{{}\cdot{}}{\mhchem@option@textcdot}}}%
- \else%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@amount}}%
- \fi%
+ \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@amount}}%
\else\if |\mhchem@cf@lookahead%
\PackageWarning{mhchem}{The symbol | is not allowed here}%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
@@ -1046,13 +1108,17 @@
\def\mhchem@cf@state{s}%
\def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@result}%
{\mhchem@mathOrText@ii{{}\cdot{}}{\mhchem@option@textcdot}}}%
+ \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \def\mhchem@cf@state{c}%
+ \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
\else\ifcat a\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{a}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
\else\ifcat 1\mhchem@cf@lookahead%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@amount}}%
- \else\if\mhchem@lbracechar\mhchem@cf@lookahead%
+ \else\if\mhchem@char@lbrace\mhchem@cf@lookahead%
\ifnum 4>\mhchem@option@version%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{s}%
@@ -1066,38 +1132,37 @@
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{s}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else\if a\mhchem@cf@state%
\ifx \{\mhchem@cf@lookahead%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
\else\ifx \}\mhchem@cf@lookahead%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
- \else\ifx\bond\mhchem@cf@lookahead%
+ \else\expandafter\ifx\mhchem@char@equal@other\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \ifnum 2=\mhchem@option@version%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else%
- \def\mhchem@cf@state{C}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@equal@active\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\if ##\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \mhchem@appendToks{\mhchem@cf@result}{\tbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@super\mhchem@cf@lookahead%
+ \def\mhchem@cf@state{e}%
+ \expandafter\ifx\expandafter\@empty\the\mhchem@cf@sup\@empty\else%
+ \mhchem@appendToks{\mhchem@cf@sup}{,}%
\fi%
- \else\if =\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\dbond}%
- \def\mhchem@cf@state{+}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\if ##\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\tbond}%
- \def\mhchem@cf@state{+}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \def\mhchem@cf@state{c}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else\if ^\mhchem@cf@lookahead%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@active\mhchem@cf@lookahead%
\def\mhchem@cf@state{e}%
\expandafter\ifx\expandafter\@empty\the\mhchem@cf@sup\@empty\else%
- \mhchem@cf@sup=\expandafter{\the\mhchem@cf@sup ,}%
+ \mhchem@appendToks{\mhchem@cf@sup}{,}%
\fi%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
\else\if _\mhchem@cf@lookahead%
@@ -1128,7 +1193,15 @@
\else\if +\mhchem@cf@lookahead%
\def\mhchem@cf@state{+}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@sup}}%
- \else\if -\mhchem@cf@lookahead%
+ \else\expandafter\ifx\mhchem@char@hyphen@other\mhchem@cf@lookahead%
+ \ifnum 1<\mhchem@option@version%
+ \def\mhchem@cf@state{-}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else%
+ \def\mhchem@cf@state{+}%
+ \def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@sup}{-}}%
+ \fi%
+ \else\expandafter\ifx\mhchem@char@hyphen@active\mhchem@cf@lookahead%
\ifnum 1<\mhchem@option@version%
\def\mhchem@cf@state{-}%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
@@ -1152,12 +1225,16 @@
\def\mhchem@cf@state{s}%
\def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@result}%
{\mhchem@mathOrText@ii{{}\cdot{}}{\mhchem@option@textcdot}}}%
+ \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \def\mhchem@cf@state{c}%
+ \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
\else\ifcat a\mhchem@cf@lookahead%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
\else\ifcat 1\mhchem@cf@lookahead%
\def\mhchem@cf@state{2}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@amount}}%
- \else\if\mhchem@lbracechar\mhchem@cf@lookahead%
+ \else\if\mhchem@char@lbrace\mhchem@cf@lookahead%
\ifnum 4>\mhchem@option@version%
\def\mhchem@cf@action{\mhchem@cf@appendNextGroupAsMath{%
\mhchem@cf@element}}%
@@ -1170,7 +1247,7 @@
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{s}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else\if 2\mhchem@cf@state%
\ifx \{\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
@@ -1180,32 +1257,31 @@
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{a}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
- \else\ifx\bond\mhchem@cf@lookahead%
+ \else\expandafter\ifx\mhchem@char@equal@other\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \ifnum 2=\mhchem@option@version%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else%
- \def\mhchem@cf@state{C}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \fi%
- \else\if =\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\dbond}%
- \def\mhchem@cf@state{+}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\if ##\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\tbond}%
- \def\mhchem@cf@state{+}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@equal@active\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \def\mhchem@cf@state{c}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else\if ^\mhchem@cf@lookahead%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\if ##\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \mhchem@appendToks{\mhchem@cf@result}{\tbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@super\mhchem@cf@lookahead%
\def\mhchem@cf@state{e}%
\expandafter\ifx\expandafter\@empty\the\mhchem@cf@sup\@empty\else%
- \mhchem@cf@sup=\expandafter{\the\mhchem@cf@sup ,}%
+ \mhchem@appendToks{\mhchem@cf@sup}{,}%
+ \fi%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@active\mhchem@cf@lookahead%
+ \def\mhchem@cf@state{e}%
+ \expandafter\ifx\expandafter\@empty\the\mhchem@cf@sup\@empty\else%
+ \mhchem@appendToks{\mhchem@cf@sup}{,}%
\fi%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
\else\if _\mhchem@cf@lookahead%
@@ -1237,7 +1313,15 @@
\else\if +\mhchem@cf@lookahead%
\def\mhchem@cf@state{+}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@sup}}%
- \else\if -\mhchem@cf@lookahead%
+ \else\expandafter\ifx\mhchem@char@hyphen@other\mhchem@cf@lookahead%
+ \ifnum 1<\mhchem@option@version%
+ \def\mhchem@cf@state{-}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else%
+ \def\mhchem@cf@state{+}%
+ \def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@sup}{-}}%
+ \fi%
+ \else\expandafter\ifx\mhchem@char@hyphen@active\mhchem@cf@lookahead%
\ifnum 1<\mhchem@option@version%
\def\mhchem@cf@state{-}%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
@@ -1269,13 +1353,17 @@
\def\mhchem@cf@state{s}%
\def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@result}%
{\mhchem@mathOrText@ii{{}\cdot{}}{\mhchem@option@textcdot}}}%
+ \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \def\mhchem@cf@state{c}%
+ \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
\else\ifcat a\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{a}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
\else\ifcat 1\mhchem@cf@lookahead%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@amount}}%
- \else\if\mhchem@lbracechar\mhchem@cf@lookahead%
+ \else\if\mhchem@char@lbrace\mhchem@cf@lookahead%
\ifnum 4>\mhchem@option@version%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{s}%
@@ -1293,7 +1381,7 @@
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{s}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else\if e\mhchem@cf@state%
\def\mhchem@cf@state{+}%
\if $\mhchem@cf@lookahead%
@@ -1347,32 +1435,31 @@
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{a}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
- \else\ifx\bond\mhchem@cf@lookahead%
+ \else\expandafter\ifx\mhchem@char@equal@other\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \ifnum 2=\mhchem@option@version%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else%
- \def\mhchem@cf@state{C}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \fi%
- \else\if =\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\dbond}%
- \def\mhchem@cf@state{+}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\if ##\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\tbond}%
- \def\mhchem@cf@state{+}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@equal@active\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \def\mhchem@cf@state{c}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else\if ^\mhchem@cf@lookahead%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\if ##\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \mhchem@appendToks{\mhchem@cf@result}{\tbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@super\mhchem@cf@lookahead%
\def\mhchem@cf@state{e}%
\expandafter\ifx\expandafter\@empty\the\mhchem@cf@sup\@empty\else%
- \mhchem@cf@sup=\expandafter{\the\mhchem@cf@sup ,}%
+ \mhchem@appendToks{\mhchem@cf@sup}{,}%
+ \fi%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@active\mhchem@cf@lookahead%
+ \def\mhchem@cf@state{e}%
+ \expandafter\ifx\expandafter\@empty\the\mhchem@cf@sup\@empty\else%
+ \mhchem@appendToks{\mhchem@cf@sup}{,}%
\fi%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
\else\if _\mhchem@cf@lookahead%
@@ -1410,7 +1497,15 @@
\else\if +\mhchem@cf@lookahead%
\def\mhchem@cf@state{+}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@sup}}%
- \else\if -\mhchem@cf@lookahead%
+ \else\expandafter\ifx\mhchem@char@hyphen@other\mhchem@cf@lookahead%
+ \ifnum 1<\mhchem@option@version%
+ \def\mhchem@cf@state{-}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else%
+ \def\mhchem@cf@state{+}%
+ \def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@sup}{-}}%
+ \fi%
+ \else\expandafter\ifx\mhchem@char@hyphen@active\mhchem@cf@lookahead%
\ifnum 1<\mhchem@option@version%
\def\mhchem@cf@state{-}%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
@@ -1442,16 +1537,19 @@
\def\mhchem@cf@state{s}%
\def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@result}%
{\mhchem@mathOrText@ii{{}\cdot{}}{\mhchem@option@textcdot}}}%
+ \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \def\mhchem@cf@state{c}%
+ \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
\else\ifcat a\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{a}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
\else\ifcat 1\mhchem@cf@lookahead%
- %
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{a}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
- \else\if\mhchem@lbracechar\mhchem@cf@lookahead%
+ \else\if\mhchem@char@lbrace\mhchem@cf@lookahead%
\ifnum 4>\mhchem@option@version%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{s}%
@@ -1469,7 +1567,7 @@
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{s}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi% .
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else\if *\mhchem@cf@state%
\ifx \{\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
@@ -1479,29 +1577,25 @@
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{s}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else\ifx\bond\mhchem@cf@lookahead%
+ \else\expandafter\ifx\mhchem@char@equal@other\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \ifnum 2=\mhchem@option@version%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else%
- \def\mhchem@cf@state{C}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \fi%
- \else\if =\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\dbond}%
- \def\mhchem@cf@state{+}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\if ##\mhchem@cf@lookahead%
- \mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \mhchem@cf@result=\expandafter{\the\mhchem@cf@result\tbond}%
- \def\mhchem@cf@state{+}%
- \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
- \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@equal@active\mhchem@cf@lookahead%
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
- \def\mhchem@cf@state{c}%
- \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \else\if ^\mhchem@cf@lookahead%
+ \mhchem@appendToks{\mhchem@cf@result}{\dbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\if ##\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \mhchem@appendToks{\mhchem@cf@result}{\tbond}%
+ \def\mhchem@cf@state{+}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@super\mhchem@cf@lookahead%
+ \def\mhchem@cf@state{p}%
+ \let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
+ \else\expandafter\ifx\mhchem@char@caret@active\mhchem@cf@lookahead%
\def\mhchem@cf@state{p}%
\let\mhchem@cf@action\mhchem@cf@gobbleNextToken%
\else\if _\mhchem@cf@lookahead%
@@ -1557,15 +1651,18 @@
\def\mhchem@cf@state{s}%
\def\mhchem@cf@action{\mhchem@cf@append{\mhchem@cf@result}%
{\mhchem@mathOrText@ii{{}\cdot{}}{\mhchem@option@textcdot}}}%
+ \else\ifcat\noexpand\mhchem@macro\noexpand\mhchem@cf@lookahead%
+ \mhchem@cf@outputAndReset{\mhchem@cf@result}%
+ \def\mhchem@cf@state{c}%
+ \def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
\else\ifcat a\mhchem@cf@lookahead%
\def\mhchem@cf@state{a}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@element}}%
\else\ifcat 1\mhchem@cf@lookahead%
- %
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{1}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@amount}}%
- \else\if\mhchem@lbracechar\mhchem@cf@lookahead%
+ \else\if\mhchem@char@lbrace\mhchem@cf@lookahead%
\def\mhchem@cf@state{a}%
\def\mhchem@cf@action{\mhchem@cf@appendNextGroup{\mhchem@cf@element}}%
\else\if $\mhchem@cf@lookahead%
@@ -1575,86 +1672,67 @@
\mhchem@cf@outputAndReset{\mhchem@cf@result}%
\def\mhchem@cf@state{s}%
\def\mhchem@cf@action{\mhchem@cf@appendNextToken{\mhchem@cf@result}}%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi% .
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else%
\PackageWarning{mhchem}{Assertion failed: unknown internal state \mhchem@cf@state}%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
\fi\fi\fi%
\mhchem@cf@action%
}%
-%%%
\def\mhchem@cf@continue{%
\futurelet\mhchem@cf@lookahead\mhchem@cf@i%
}%
\def\mhchem@cf@gobbleNextToken#1{%
\mhchem@cf@continue%
}%
-\def\mhchem@cf@append#1#2#3{%
- %\showthe#1%
- #1=\expandafter{\the#1#2}%
- %\showthe#1%
+\def\mhchem@cf@appendNextToken#1#2{%
+ \mhchem@appendToks{#1}{#2}%
\mhchem@cf@continue%
-}%
-\def\mhchem@cf@appendExpand#1#2#3{%
- \edef\mhchem@cf@appendExpand@i{\noexpand\mhchem@cf@append\noexpand{#1}{#2}}%
- \mhchem@cf@appendExpand@i%
-}%
-\def\mhchem@cf@appendAndExecute#1#2#3#4{%
- #1=\expandafter{\the#1#2}%
- #3%
+}
+\def\mhchem@cf@appendNextTokenAsMathrm#1#2{%
+ \mhchem@appendToks{#1}{\ensuremath{\mathrm{#2}}}%
\mhchem@cf@continue%
-}%
-\def\mhchem@cf@appendAndExecuteExpand#1#2#3#4{%
- \edef\mhchem@cf@appendExpand@i{\noexpand\mhchem@cf@appendAndExecute\noexpand{#1}{#2}{#3}}%
- \mhchem@cf@appendExpand@i%
-}%
+}
\def\mhchem@cf@appendNextGroup#1#2{%
- #1=\expandafter{\the#1{#2}}%
+ \mhchem@appendToks{#1}{{#2}}%
\mhchem@cf@continue%
}
\def\mhchem@cf@appendNextGroupAsMath#1#2{%
- #1=\expandafter{\the#1{\text{\ensuremath{#2}}}}%
- \mhchem@cf@continue%
-}
-\def\mhchem@cf@appendNextToken#1#2{%
- %\showthe#1%
- #1=\expandafter{\the#1#2}%
- %\showthe#1%
+ \mhchem@appendToks{#1}{\text{\ensuremath{#2}}}%
\mhchem@cf@continue%
}
-\def\mhchem@cf@appendNextTokenAsMathrm#1#2{%
- #1=\expandafter{\the#1{\ensuremath{\mathrm{#2}}}}%
+\def\mhchem@cf@append#1#2#3{%
+ \mhchem@appendToks{#1}{#2}%
\mhchem@cf@continue%
-}
+}%
\def\mhchem@cf@appendMath#1#2#3${%
- #1=\expandafter{\the#1\text{\ensuremath{#3}}}%
+ \mhchem@appendToks{#1}{\text{\ensuremath{#3}}}%
\mhchem@cf@continue%
}%
\def\mhchem@cf@appendMathAsGroup#1#2#3${%
- #1=\expandafter{\the#1{\text{\ensuremath{#3}}}}%
+ \mhchem@appendToks{#1}{{\text{\ensuremath{#3}}}}%
\mhchem@cf@continue%
}%
\def\mhchem@cf@switchState#1#2|{%
- \ifthenelse{\equal{1}{#2}}{% if 1
- \def\mhchem@cf@state{a}% switch to [a]element
+ \ifthenelse{\equal{1}{#2}}{%
+ \def\mhchem@cf@state{a}%
}{%
\PackageWarning{mhchem}{Command |#2| unknown}%
}%
\mhchem@cf@continue%
}%
-%%%%%
\newtoks\mhchem@cf@element%
\newtoks\mhchem@cf@amount%
-%\newtoks\mhchem@cf@sub%
\newtoks\mhchem@cf@sup%
\newtoks\mhchem@cf@presub%
\newtoks\mhchem@cf@presup%
\def\mhchem@cf@output{%
- %
- \if\mhchem@cf@state s%
- \else\if\mhchem@cf@state 1%
- \noexpand\mhchem@mathOrText{\noexpand\mhchem@cf@frac\the\mhchem@cf@amount/\noexpand\mhchem@END}%
+ \if s\mhchem@cf@state%
+ \else\if 1\mhchem@cf@state%
+ \noexpand\mhchem@mathOrText{\noexpand\mhchem@cf@frac\the\mhchem@cf@amount/\noexpand\mhchem@END{\mhchem@option@skipAfterFracAmount}}%
+ \else\if 9\mhchem@cf@state%
+ \noexpand\mhchem@mathOrText{\noexpand\mhchem@cf@frac\the\mhchem@cf@amount/\noexpand\mhchem@END{}}%
\else%
\if\mhchem@option@usenonsimultaneoussubsuperscripts 0\relax%
\noexpand\mhchem@chemfive%
@@ -1673,12 +1751,9 @@
{}%
{\noexpand\mhchem@cf@replaceMathMinusDot{\the\mhchem@cf@sup}}%
\fi%
- \fi\fi%\fi%
+ \fi\fi\fi%
}
\def\mhchem@cf@outputReset{%
- %\showthe\mhchem@cf@element%
- %\showthe\mhchem@cf@sup%
- %
\mhchem@cf@element={}%
\mhchem@cf@amount={}%
\mhchem@cf@sup={}%
@@ -1688,23 +1763,22 @@
\def\mhchem@cf@outputAndReset#1{%
\edef\mhchem@cf@outputAndReset@i{#1={\the#1\mhchem@cf@output}}%
\mhchem@cf@outputAndReset@i%
- %\showthe#1%
\mhchem@cf@outputReset%
}
%%% frac
-\def\mhchem@cf@frac#1/#2\mhchem@END{%
+\def\mhchem@cf@frac#1/#2\mhchem@END#3{%
\ifthenelse{\equal{#2}{}}{%
- #1\mhchem@option@skipAfterAmount%
+ #1#3%
}{%
\ensuremath{\mathchoice%
{\textstyle%
- \frac{\mhchem@mathOrText{#1}}{\mhchem@mathOrText{\mhchem@getfirstchar#2\mhchem@ENDgetfirstchar}}\mhchem@option@skipAfterFracAmount}%
- {\frac{\mhchem@mathOrText{#1}}{\mhchem@mathOrText{\mhchem@getfirstchar#2\mhchem@ENDgetfirstchar}}\mhchem@option@skipAfterFracAmount}%
- {\frac{\mhchem@mathOrText{#1}}{\mhchem@mathOrText{\mhchem@getfirstchar#2\mhchem@ENDgetfirstchar}}\mhchem@option@skipAfterFracAmount}%
- {\frac{\mhchem@mathOrText{#1}}{\mhchem@mathOrText{\mhchem@getfirstchar#2\mhchem@ENDgetfirstchar}}\mhchem@option@skipAfterFracAmount}%
+ \frac{\mhchem@mathOrText{#1}}{\mhchem@mathOrText{\mhchem@getfirstchar#2\mhchem@ENDgetfirstchar}}#3}%
+ {\frac{\mhchem@mathOrText{#1}}{\mhchem@mathOrText{\mhchem@getfirstchar#2\mhchem@ENDgetfirstchar}}#3}%
+ {\frac{\mhchem@mathOrText{#1}}{\mhchem@mathOrText{\mhchem@getfirstchar#2\mhchem@ENDgetfirstchar}}#3}%
+ {\frac{\mhchem@mathOrText{#1}}{\mhchem@mathOrText{\mhchem@getfirstchar#2\mhchem@ENDgetfirstchar}}#3}%
}%
}%
}%
@@ -1712,20 +1786,16 @@
\def\mhchem@getlastchars#1#2\mhchem@ENDgetlastchars{#2}
%%% replaceMath
- %
- %
- %
\newtoks\mhchem@cf@replaceMath@result
\newcommand\mhchem@cf@replaceMath[1]{%
\mhchem@cf@replaceMath@result={}%
\mhchem@cf@replaceMath@continue#1\mhchem@END%
- %
\the\mhchem@cf@replaceMath@result%
}
\def\mhchem@cf@replaceMath@i{%
\ifx\mhchem@END\mhchem@cf@replaceMath@lookahead%
\let\mhchem@cf@replaceMath@action\mhchem@gobble%
- \else\if\mhchem@lbracechar\mhchem@cf@replaceMath@lookahead%
+ \else\if\mhchem@char@lbrace\mhchem@cf@replaceMath@lookahead%
\let\mhchem@cf@replaceMath@action\mhchem@cf@replaceMath@appendNextGroup%
\else\if $\mhchem@cf@replaceMath@lookahead%
\let\mhchem@cf@replaceMath@action\mhchem@cf@replaceMath@appendMath%
@@ -1734,69 +1804,63 @@
\fi\fi\fi%
\mhchem@cf@replaceMath@action%
}
-%%%
\def\mhchem@cf@replaceMath@continue{%
\futurelet\mhchem@cf@replaceMath@lookahead\mhchem@cf@replaceMath@i%
}
\def\mhchem@cf@replaceMath@appendNextGroup#1{%
- \mhchem@cf@replaceMath@result=\expandafter{\the\mhchem@cf@replaceMath@result{#1}}%
+ \mhchem@appendToks{\mhchem@cf@replaceMath@result}{{#1}}%
\mhchem@cf@replaceMath@continue%
}
\def\mhchem@cf@replaceMath@appendNextToken#1{%
- \mhchem@cf@replaceMath@result=\expandafter{\the\mhchem@cf@replaceMath@result#1}%
+ \mhchem@appendToks{\mhchem@cf@replaceMath@result}{#1}%
\mhchem@cf@replaceMath@continue%
}
\def\mhchem@cf@replaceMath@appendMath#1#2${%
- \mhchem@cf@replaceMath@result=\expandafter{\the\mhchem@cf@replaceMath@result\text{\ensuremath{#2}}}%
+ \mhchem@appendToks{\mhchem@cf@replaceMath@result}{\text{\ensuremath{#2}}}%
\mhchem@cf@replaceMath@continue%
-}%
+}
%%% replaceMathMinusDot
-%%%
-%%%
-%%%
-%%%
-%%%
\newtoks\mhchem@cf@replaceMathMinusDot@result
\newcommand\mhchem@cf@replaceMathMinusDot[1]{%
\mhchem@cf@replaceMathMinusDot@result={}%
\mhchem@cf@replaceMathMinusDot@continue#1\mhchem@END%
- %
\the\mhchem@cf@replaceMathMinusDot@result%
}
\def\mhchem@cf@replaceMathMinusDot@i{%
\ifx\mhchem@END\mhchem@cf@replaceMathMinusDot@lookahead%
\let\mhchem@cf@replaceMathMinusDot@action\mhchem@gobble%
- \else\if -\mhchem@cf@replaceMathMinusDot@lookahead\relax%
+ \else\expandafter\ifx\mhchem@char@hyphen@other\mhchem@cf@replaceMathMinusDot@lookahead\relax%
+ \def\mhchem@cf@replaceMathMinusDot@action{\mhchem@cf@replaceMathMinusDot@append{\mhchem@mathOrText@ii{-}{\mhchem@option@textminus}}}%
+ \else\expandafter\ifx\mhchem@char@hyphen@active\mhchem@cf@replaceMathMinusDot@lookahead\relax%
\def\mhchem@cf@replaceMathMinusDot@action{\mhchem@cf@replaceMathMinusDot@append{\mhchem@mathOrText@ii{-}{\mhchem@option@textminus}}}%
\else\if .\mhchem@cf@replaceMathMinusDot@lookahead\relax%
\def\mhchem@cf@replaceMathMinusDot@action{\mhchem@cf@replaceMathMinusDot@append{\ensuremath{\textbf{\fontfamily{cmr}\selectfont\textperiodcentered}}}}%
- \else\if\mhchem@lbracechar\mhchem@cf@replaceMathMinusDot@lookahead%
+ \else\if\mhchem@char@lbrace\mhchem@cf@replaceMathMinusDot@lookahead%
\let\mhchem@cf@replaceMathMinusDot@action\mhchem@cf@replaceMathMinusDot@appendNextGroup%
\else\if $\mhchem@cf@replaceMathMinusDot@lookahead%
\let\mhchem@cf@replaceMathMinusDot@action\mhchem@cf@replaceMathMinusDot@appendMath%
\else%
\let\mhchem@cf@replaceMathMinusDot@action\mhchem@cf@replaceMathMinusDot@appendNextToken%
- \fi\fi\fi\fi\fi%
+ \fi\fi\fi\fi\fi\fi%
\mhchem@cf@replaceMathMinusDot@action%
}
-%%%
\def\mhchem@cf@replaceMathMinusDot@continue{%
\futurelet\mhchem@cf@replaceMathMinusDot@lookahead\mhchem@cf@replaceMathMinusDot@i%
}
\def\mhchem@cf@replaceMathMinusDot@append#1#2{%
- \mhchem@cf@replaceMathMinusDot@result=\expandafter{\the\mhchem@cf@replaceMathMinusDot@result#1}%
+ \mhchem@appendToks{\mhchem@cf@replaceMathMinusDot@result}{#1}%
\mhchem@cf@replaceMathMinusDot@continue%
}
\def\mhchem@cf@replaceMathMinusDot@appendNextGroup#1{%
- \mhchem@cf@replaceMathMinusDot@result=\expandafter{\the\mhchem@cf@replaceMathMinusDot@result{#1}}%
+ \mhchem@appendToks{\mhchem@cf@replaceMathMinusDot@result}{{#1}}%
\mhchem@cf@replaceMathMinusDot@continue%
}
\def\mhchem@cf@replaceMathMinusDot@appendNextToken#1{%
- \mhchem@cf@replaceMathMinusDot@result=\expandafter{\the\mhchem@cf@replaceMathMinusDot@result#1}%
+ \mhchem@appendToks{\mhchem@cf@replaceMathMinusDot@result}{#1}%
\mhchem@cf@replaceMathMinusDot@continue%
}
\def\mhchem@cf@replaceMathMinusDot@appendMath#1#2${%
- \mhchem@cf@replaceMathMinusDot@result=\expandafter{\the\mhchem@cf@replaceMathMinusDot@result\text{\ensuremath{#2}}}%
+ \mhchem@appendToks{\mhchem@cf@replaceMathMinusDot@result}{\text{\ensuremath{#2}}}%
\mhchem@cf@replaceMathMinusDot@continue%
}%
@@ -1804,13 +1868,6 @@
%%%%%%%%%%%%%%%%%%%%%
%%% @chemfive %%%
%%%%%%%%%%%%%%%%%%%%%
-%%%
-%%%
-%%%
-%%%
-%%%
-%%%
-%%%
\newcommand*\mhchem@chemfive[6]{%
{%
\mhchem@prepostscript%
@@ -1825,13 +1882,6 @@
}
%%% @prepostscript
-%%%
-%%%
-%%%
-%%%
-%%%
-%%%
-%%%
\newlength\mhchem@prepostscript@tmp@i%
\newlength\mhchem@prepostscript@tmp@ii%
\newcommand*\mhchem@prepostscript[7][]{%
@@ -1839,64 +1889,55 @@
\ensuremath{%
\setlength{\mhchem@prepostscript@tmp@i}{\widthof{$#2#3$}}%
\ifdim\mhchem@prepostscript@tmp@i>0pt%
- \setlength{\mhchem@prepostscript@tmp@i}{\widthof{${}^{#2}$}}% [1]
- \setlength{\mhchem@prepostscript@tmp@ii}{\widthof{${}_{#3}$}}% [1]
+ \setlength{\mhchem@prepostscript@tmp@i}{\widthof{${}^{#2}$}}%
+ \setlength{\mhchem@prepostscript@tmp@ii}{\widthof{${}_{#3}$}}%
\ifdim\mhchem@prepostscript@tmp@i<\mhchem@prepostscript@tmp@ii%
- \setlength{\mhchem@prepostscript@tmp@i}{\mhchem@prepostscript@tmp@ii}\fi% [1]
- \vphantom{#4}% [2]
+ \setlength{\mhchem@prepostscript@tmp@i}{\mhchem@prepostscript@tmp@ii}\fi%
+ \vphantom{#4}%
{}%
^{%
- \mhchem@mathboxright{\mhchem@prepostscript@tmp@i}{% [1]
- \vphantom{#6#7}% [2]
- \vphantom{#1}% [4]
+ \mhchem@mathboxright{\mhchem@prepostscript@tmp@i}{%
+ \vphantom{#6#7}%
+ \vphantom{#1}%
#2%
- }% [1]
+ }%
}%
_{%
- \mhchem@mathboxright{\mhchem@prepostscript@tmp@i}{% [1]
- \vphantom{#5}% [2]
+ \mhchem@mathboxright{\mhchem@prepostscript@tmp@i}{%
+ \vphantom{#5}%
#3%
- }% [1]
+ }%
}%
- \mhchem@minispace% [3]
+ \mhchem@minispace%
\fi%
#4%
\setlength{\mhchem@prepostscript@tmp@i}{\widthof{$#5#6$}}%
- \ifdim\mhchem@prepostscript@tmp@i>0pt%
+ \ifdim\mhchem@prepostscript@tmp@i>0pt%
_{%
- \vphantom{#3}% [2]
+ \vphantom{#3}%
#5%
}%
^{%
- \vphantom{#2#7}% [2]
- \vphantom{#1}% [4]
- #6
+ \vphantom{#2#7}%
+ \vphantom{#1}%
+ #6%
}%
\fi%
\setlength{\mhchem@prepostscript@tmp@i}{\widthof{$#7$}}%
- \ifdim\mhchem@prepostscript@tmp@i>0pt%
- \mhchem@minispace% [3]
+ \ifdim\mhchem@prepostscript@tmp@i>0pt%
+ \mhchem@minispace%
{}%
- _{\vphantom{#3#5}}% [2]
+ _{\vphantom{#3#5}}%
^{%
- \vphantom{#2#6}% [2]
- \vphantom{#1}% [4]
+ \vphantom{#2#6}%
+ \vphantom{#1}%
#7%
}%
\fi%
}%
-%
-%
-%
-%
-%
-%
-%
}
%%% @mathbox
-%%%
-%%%
\newcommand*\mhchem@mathbox[2][]{%
\mathchoice%
{\mhchem@mathbox@ii{\displaystyle}{#1}{#2}}%
@@ -1905,7 +1946,7 @@
{\mhchem@mathbox@ii{\scriptscriptstyle}{#1}{#2}}}%
\newlength\mhchem@mathbox@tmp@i
\newlength\mhchem@mathbox@tmp@ii
-\newcommand*\mhchem@mathbox@ii[3]{%
+\newcommand*\mhchem@mathbox@ii[3]{%
\setlength{\mhchem@mathbox@tmp@i}{\widthof{\ensuremath{#1#2}}}%
\setlength{\mhchem@mathbox@tmp@ii}{\widthof{\ensuremath{#1#3}}}%
\ifdim\mhchem@mathbox@tmp@i<\mhchem@mathbox@tmp@ii%
@@ -1919,7 +1960,7 @@
{\mbox{\ensuremath{\scriptstyle#1}}}%
{\mbox{\ensuremath{\scriptscriptstyle#1}}}}
-%%% @mathboxright
+%%% @mathboxright
\newcommand*\mhchem@mathboxright[2]{\mathchoice%
{\makebox[#1][r]{\ensuremath{\displaystyle#2}}}%
{\makebox[#1][r]{\ensuremath{\textstyle#2}}}%
@@ -1927,12 +1968,10 @@
{\makebox[#1][r]{\ensuremath{\scriptscriptstyle#2}}}}
%%% @minispace
-%%%
-%%%
\newlength\mhchem@minispace@tmp
\newcommand*\mhchem@minispace{%
\setlength{\mhchem@minispace@tmp}{0pt-\widthof{${}^8_8$}+%
- \widthof{$\text{C}^8_8$}-\widthof{$\text{C}^{}_{}$}}% [3]
+ \widthof{$\text{C}^8_8$}-\widthof{$\text{C}^{}_{}$}}%
\kern\mhchem@minispace@tmp%
}
@@ -1960,7 +1999,6 @@
}{\PackageError{mhchem}{Font option `#1' unknown}}}%
}
-%
\def\mhchem@option@alwaystextmode{0}%
\newlength\mhchem@option@minussidebearingleft
@@ -1970,22 +2008,6 @@
\define@key{mhchem}{minus-sidebearing-left}{\setlength\mhchem@option@minussidebearingleft{#1}}
\define@key{mhchem}{minus-sidebearing-right}{\setlength\mhchem@option@minussidebearingright{#1}}
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
% Replicate layout of MS Word (superscript after subscript, not over)
\def\mhchem@option@usenonsimultaneoussubsuperscripts{0}%
@@ -1993,7 +2015,7 @@
\mhchem@definearrows{font}
\define@key{mhchem}{arrows}{%
- \ifthenelse{\equal{pgf}{#1} \or \equal{pgf-filled}{#1}}{%
+ \ifthenelse{\equal{pgf}{#1} \or \equal{pgf-filled}{#1}}{%
\RequirePackage{pgf}% for finding the tikz package more easily
\RequirePackage{tikz}%
}{}%
@@ -2004,17 +2026,14 @@
\define@key{mhchem}{skip-after-amount}{\def\mhchem@option@skipAfterAmount{#1}\def\mhchem@option@skipAfterFracAmount{#1}}
\def\mhchem@option@skipAfterFracAmount{\,}
\define@key{mhchem}{skip-after-frac-amount}{\def\mhchem@option@skipAfterFracAmount{#1}}
-%
\def\mhchem@option@textminus{--}
\define@key{mhchem}{textminus}{\def\mhchem@option@textminus{#1}}
-%
\def\mhchem@option@textcdot{\cdot}
\define@key{mhchem}{textcdot}{\def\mhchem@option@textcdot{#1}}
-%
-%%% begin: standard keyval handling as in many other packages
+%%% begin: standard keyval handling as in many other packages
\def\ProcessOptionsWithKV#1{%
\let\@tempc\relax%
\let\mhchem@tempa\@empty%
@@ -2047,8 +2066,9 @@
\PackageWarningNoLine{mhchem}{%
You did not specify a 'version' option for the mhchem\MessageBreak
package. If you are about to create a new document,\MessageBreak
- please write \string\usepackage[version=3]{mhchem} in your preamble in\MessageBreak
- order to use the most recent version of mhchem}%
+ please write \string\usepackage[version=3]{mhchem} in your\MessageBreak
+ preamble in order to use the most recent version of\MessageBreak
+ mhchem}%
\def\mhchem@option@version{3}%
\else\ifnum 4=\mhchem@option@version%
\PackageWarningNoLine{mhchem}{%
@@ -2058,47 +2078,12 @@
to change without notice}%
\fi\fi%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%% misc %%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%% legacy %%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifnum 4>\mhchem@option@version
\newcommand*\mhchem@cmath[1]{\ensuremath{\text{\ensuremath{#1}}}}%
\newcommand*\cmath[1]{\mhchem@cmath{#1}}
- \newcommand*\cf[2][]{\mhchem@cf[#1]{#2}}
+ \DeclareRobustCommand\cf[2][]{\mhchem@cf[#1]{#2}}
\fi
-
-
-
-
-
-
-
-
-
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-
-%
-\def\mhchem@END{}
-\def\mhchem@macro{}
-\def\mhchem@empty{}
-%
-\edef\mhchem@lbracechar{\string{} %}
-\def\mhchem@gobble#1{}%
-%
-% \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/mhchem/rsphrase.sty b/Master/texmf-dist/tex/latex/mhchem/rsphrase.sty
index 8bed392cf4d..6c4971dc202 100644
--- a/Master/texmf-dist/tex/latex/mhchem/rsphrase.sty
+++ b/Master/texmf-dist/tex/latex/mhchem/rsphrase.sty
@@ -1,37 +1,13 @@
%% rsphrase.sty
-%% Copyright 2004-2010 M.a-r.t-i.n H.e-n.s-e.l
-%
-% The original phrases are taken from
-% http://europa.eu.int/comm/environment/dansub/pdfs/annex3_en.pdf and
-% http://europa.eu.int/comm/environment/dansub/pdfs/annex4_en.pdf
-% which are linked from
-% http://europa.eu.int/comm/environment/dansub/main67_548/index_en.htm
-% The phrases themselves, therefore do not fall under the license
-% mentioned below.
-% See http://europa.eu.int/geninfo/disclaimer_en.htm
-%
-% Danish hyphenation and warning messages were kindly provided
-% by Rasmus Villemoes (burner -@- imf -.- au -.- dk).
-%
-% French hyphenation and warning messages were kindly provided
-% by Dominique Richard (dri -@- lobivia -.- cpe -.- fr).
-%
-% The Italian phrases were kindly provided by
-% Lorenzo Vagnarelli (lorenzo -.- vagnarelli -@- libero -.- it)
-%
-% The Spanish phrases were kindly provided by
-% Ignacio Fern\'{a}ndez Galv\'{a}n (jellby -@- yahoo -.- com).
-%
-%
+%% Copyright 2004-2011 Martin Hensel
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c
-% which can be found at
-% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% which is included as lppl-1-3c.txt.
%
% This work has the LPPL maintenance status "maintained".
-% The Current Maintainer of this work is M.a-r.t-i.n H.e-n.s-e.l.
-%
+% The Current Maintainer of this work is Martin Hensel.
+%
% ( In order to fight spam, the maintainer's contact )
% ( information is "encrypted" with ROT13. )
% ( If you do not know ROT13 yet and have no tool for )
@@ -48,8 +24,28 @@
% | Treznal
% `----------
%
-% This work consists of the files mhchem.sty, rsphrase.sty,
-% mhchem.pdf and legal.txt.
+% This work consists of all files listed in manifest.txt.
+%
+%
+% The original phrases are taken from
+% http://europa.eu.int/comm/environment/dansub/pdfs/annex3_en.pdf and
+% http://europa.eu.int/comm/environment/dansub/pdfs/annex4_en.pdf
+% which are linked from
+% http://europa.eu.int/comm/environment/dansub/main67_548/index_en.htm
+% The phrases themselves therefore are not subject to the LPPL.
+% See http://europa.eu.int/geninfo/disclaimer_en.htm
+%
+% Danish hyphenation and warning messages were kindly provided
+% by Rasmus Villemoes (burner -@- imf -.- au -.- dk).
+%
+% French hyphenation and warning messages were kindly provided
+% by Dominique Richard (dri -@- lobivia -.- cpe -.- fr).
+%
+% The Italian phrases were kindly provided by
+% Lorenzo Vagnarelli (lorenzo -.- vagnarelli -@- libero -.- it)
+%
+% The Spanish phrases were kindly provided by
+% Ignacio Fern\'{a}ndez Galv\'{a}n (jellby -@- yahoo -.- com).
%
%
\ProvidesPackage{rsphrase}[2011/06/03 v3.11 Risk and Safety Phrases (mhchem bundle)]
@@ -67,7 +63,7 @@
% strict label phrases
\def\mhchem@rs@de@label{dieses Etikett}
\def\mhchem@rs@en@showlabel{show this container or label}%
- \def\mhchem@rs@dk@showlabel{denne beholder eller etiket}%
+ \def\mhchem@rs@dk@showlabel{denne beholder eller etiket}%
% original parts of German phrases (badly translated)
\def\mhchem@rs@de@r@dn{ernste Gefahr irreversiblen Schadens}%
\def\mhchem@rs@de@r@znzezz{Ge\-sund\-heits\-sch\"ad\-lich beim Einatmen, Verschlucken und Be\-r\"uh\-rung mit der Haut}%
@@ -81,7 +77,7 @@
\def\mhchem@rs@de@label{Etikett}%
\def\mhchem@rs@en@showlabel{show the container or label}%% +++ correct english?
\def\mhchem@rs@dk@showlabel{beholderen eller etiketten}%
- % adapted parts of German phrases (more precise translation)
+ % adapted parts of German phrases (more precise translation)
\def\mhchem@rs@de@r@dn{Gefahr sehr ernster irreversibler Sch\"a\-den}%
\def\mhchem@rs@de@r@znzezz{Ge\-sund\-heits\-sch\"ad\-lich beim Einatmen, Verschlucken und bei Be\-r\"uh\-rung mit der Haut}% "und _bei_" eingefuegt
\def\mhchem@rs@de@r@zdzvzf{Giftig beim Einatmen, Verschlucken und bei Be\-r\"uh\-rung mit der Haut}% "und _bei_" eingefuegt
@@ -152,21 +148,21 @@
%
\mhchem@iflanguagename{ngerman}{\mhchem@rs@data@ngerman[#1]{#2}}{% = naustrian
\mhchem@iflanguagename{naustrian}{\mhchem@rs@data@ngerman[#1]{#2}}{%
- \mhchem@iflanguagename{german}{% = austrian, germanb,
+ \mhchem@iflanguagename{german}{% = austrian, germanb,
\mhchem@rs@warning@german%
\gdef\mhchem@rs@warning@german{}%
\mhchem@rs@data@ngerman[#1]{#2}%
}{%
- \mhchem@iflanguagename{austrian}{%
+ \mhchem@iflanguagename{austrian}{%
\mhchem@rs@warning@german%
\gdef\mhchem@rs@warning@german{}%
\mhchem@rs@data@ngerman[#1]{#2}%
}{%
- \mhchem@iflanguagename{germanb}{%
+ \mhchem@iflanguagename{germanb}{%
\mhchem@rs@warning@german%
\gdef\mhchem@rs@warning@german{}%
\mhchem@rs@data@ngerman[#1]{#2}%
- }{%
+ }{%
%
\mhchem@iflanguagename{italian}{\mhchem@rs@data@italian[#1]{#2}}{%
%
@@ -205,21 +201,21 @@
%
\mhchem@iflanguagename{ngerman}{\mhchem@rs@data@ngerman[#1]{#2}}{% = naustrian
\mhchem@iflanguagename{naustrian}{\mhchem@rs@data@ngerman[#1]{#2}}{%
- \mhchem@iflanguagename{german}{% = austrian, germanb,
+ \mhchem@iflanguagename{german}{% = austrian, germanb,
\mhchem@rs@warning@german%
\gdef\mhchem@rs@warning@german{}%
\mhchem@rs@data@ngerman[#1]{#2}%
}{%
- \mhchem@iflanguagename{austrian}{%
+ \mhchem@iflanguagename{austrian}{%
\mhchem@rs@warning@german%
\gdef\mhchem@rs@warning@german{}%
\mhchem@rs@data@ngerman[#1]{#2}%
}{%
- \mhchem@iflanguagename{germanb}{%
+ \mhchem@iflanguagename{germanb}{%
\mhchem@rs@warning@german%
\gdef\mhchem@rs@warning@german{}%
\mhchem@rs@data@ngerman[#1]{#2}%
- }{%
+ }{%
%
\mhchem@iflanguagename{italian}{\mhchem@rs@data@italian[#1]{#2}}{%
%
@@ -1208,7 +1204,7 @@
\MessageBreak d'extinction a utiliser}}%
\mhchem@rs@ii[S43]{#2}{S43.1}{En cas d'incendie, utiliser #1. Ne jamais utiliser d'eau}%
{\mhchem@rs@check{#1}{S43.1}{Priere de preciser la nature exacte des moyens%
- \MessageBreak d'extinction a utiliser}}%
+ \MessageBreak d'extinction a utiliser}}%
\mhchem@rs@ii{#2}{S45}{En cas d'accident ou de malaise, consulter im\-m\'e\-dia\-te\-ment un m\'e\-de\-cin (si possible lui montrer l'\'e\-ti\-quet\-te)}{}%
\mhchem@rs@ii{#2}{S46}{En cas d'ingestion, consulter im\-m\'e\-dia\-te\-ment un m\'e\-de\-cin et lui montrer l'emballage ou l'\'e\-ti\-quette}{}%
\mhchem@rs@ii{#2}{S47}{Conserver \`a une tem\-p\'e\-ra\-tu\-re ne d\'e\-pas\-sant pas #1\textdegree C}%