summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-06-30 13:18:19 +0000
committerKarl Berry <karl@freefriends.org>2006-06-30 13:18:19 +0000
commit587e2649317c29ebe59d9ab905a972faa3452e6c (patch)
treedce6f5589c163639ad18825725f42f56ead58edc
parent2848e8054ecf9fb4840f537847372fbf6654e383 (diff)
mhchem update
git-svn-id: svn://tug.org/texlive/trunk@1731 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/tools/ctan2tl2
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/mhchem.pdfbin130994 -> 256986 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/whatsnew.txt83
-rw-r--r--Master/texmf-dist/tex/latex/mhchem/mhchem.sty629
-rw-r--r--Master/texmf-dist/tex/latex/mhchem/rsphrase.sty99
-rw-r--r--Master/texmf-dist/tpm/mhchem.tpm9
-rw-r--r--Master/texmf/lists/mhchem1
7 files changed, 498 insertions, 325 deletions
diff --git a/Build/tools/ctan2tl b/Build/tools/ctan2tl
index 6047a4b7342..7ceda807a6b 100755
--- a/Build/tools/ctan2tl
+++ b/Build/tools/ctan2tl
@@ -82,7 +82,7 @@ fi # end of copying from CTAN.
#
-printf "\n\f ctan2tds\n"
+printf "\n ctan2tds\n"
rm -rf ../cooked/$pkg
test -d ../cooked || mkdir ../cooked
../ctan2tds.pl $pkg || exit 1
diff --git a/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf b/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf
index 1efeb565f75..d140459589a 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/whatsnew.txt b/Master/texmf-dist/doc/latex/mhchem/whatsnew.txt
deleted file mode 100644
index e6cf156afc6..00000000000
--- a/Master/texmf-dist/doc/latex/mhchem/whatsnew.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-What's new with mhchem?
-
-2005-07-15 v3.00
- mhchem
- added: more bonds
-
-2005-07-13 v2.06
- mhchem
- bugfix: another spurious blank (even more shame on me!)
-
-2005-06-27 v2.05
- mhchem
- bugfix: removed spurious blank introduced with v2.02
-
-2005-06-17 v2.04
- as version 2.03, but this time correctly published
-
-
-2005-06-16 v2.03
- mhchem
- added: font options
- bugfix: amount number was not typeset in text font
- bugfix: \ce did not work in \section any more
- bugfix: redefined ^ (as in Slovak) will be recognised
-
-2005-05-23 v2.02
- mhchem
- bugfix: bugfixes for \cmath
- added: definition of math symbol \hyphen
-
-2005-05-08 v2.01
- mhchem
- bugfix: \cmath in a right-side superscript now works properly
- rsphrase
- added: Spanish phrases
-
-2005-04-26 v2.00
- mhchem
- added: option [version=2]
- added: \cee (with & and \\ as input)
- added: \ce in text mode
- added: ^.
- added: bonds
- added: \cmath
- added: ->C and others
- bugfixes
- rsphrase
- added: French phrases
- bugfixes
-
-2005-01-29 v1.06
- mhchem
- added: unequal equilibrium <<=> and <=>>
- bugfix: arrows work now with \usepackage[spanish]{babel}
-
-2004-07-14 v1.05
- mhchem
- added: text subscript (,)
- rsphrase
- added: phrases in Danish (thanks to Rasmus Villemoes)
- bugfixes
-
-2004-07-06 v1.04
- mhchem
- change: minus in text superscript now becomes --, no longer $-$
-
-2004-06-28 v1.03
- mhchem
- change: mini backstep in front of each character sequence removed
- bugfixes
-
-2004-06-22 v1.02
- mhchem
- bugfix: now works with babel hungarian where ` is active
-
-2004-06-22 v1.01 (not released)
- mhchem
- added: pre-sub and pre-suberscripts (right-aligned) for isotopes
-
-2004-06-13 v1.00
-first release
- mhchem.sty with \cf and \ce
- rsphrase.sty with \rsnumber and \rsphrase in English and German
diff --git a/Master/texmf-dist/tex/latex/mhchem/mhchem.sty b/Master/texmf-dist/tex/latex/mhchem/mhchem.sty
index b3eec4f0670..0aa67f2967e 100644
--- a/Master/texmf-dist/tex/latex/mhchem/mhchem.sty
+++ b/Master/texmf-dist/tex/latex/mhchem/mhchem.sty
@@ -1,5 +1,5 @@
%% mhchem.sty
-%% Copyright 2004-2005 M.a-r.t-i.n H.e-n.s-e.l
+%% Copyright 2004-2006 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.3
@@ -29,7 +29,7 @@
% mhchem.pdf, legal.txt and whatsnew.txt.
%
%
-\ProvidesPackage{mhchem}[2005/07/15 v3.00 for typesetting chemical formulae]
+\ProvidesPackage{mhchem}[2006/06/23 v3.03 for typesetting chemical formulae]
\RequirePackage{ifthen}
\RequirePackage{calc}[1998/07/07]
\RequirePackage{twoopt}
@@ -37,147 +37,45 @@
\RequirePackage{keyval}
\RequirePackage{graphics}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%% Options %%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\def\mhchem@option@version{0}
-\define@key{mhchem}{version}{\def\mhchem@option@version{#1}}
-\def\mhchem@option@mathfont{\mathrm}
-\def\mhchem@option@textfont{}
-\define@key{mhchem}{textfontcommand}{\def\mhchem@option@textfont{#1}}
-\define@key{mhchem}{textfontname}{\def\mhchem@option@textfont{\csname#1\endcsname}}
-\define@key{mhchem}{mathfontcommand}{\def\mhchem@option@mathfont{#1}}
-\define@key{mhchem}{mathfontname}{\def\mhchem@option@mathfont{\csname#1\endcsname}}
-\define@key{mhchem}{font}{%
- \ifthenelse{\equal{sf}{#1}}{%
- \def\mhchem@option@textfont{\sffamily}%
- \def\mhchem@option@mathfont{\mathsf}%
- }{\ifthenelse{\equal{}{#1}}{%
- \def\mhchem@option@textfont{}%
- \def\mhchem@option@mathfont{\mathrm}%
- }{\PackageError{mhchem}{Font option `#1' unknown}}}%
-}
-\newlength\mhchem@option@minussidebearingleft
-\newlength\mhchem@option@minussidebearingright
-\setlength\mhchem@option@minussidebearingleft{0.06em}
-\setlength\mhchem@option@minussidebearingright{0.11em}
-\define@key{mhchem}{minus-sidebearing-left}{\setlength\mhchem@option@minussidebearingleft{#1}}
-\define@key{mhchem}{minus-sidebearing-right}{\setlength\mhchem@option@minussidebearingright{#1}}
-
-\providecommand\mhchemoptions[1]{\setkeys{mhchem}{#1}}
-
-%%% begin: standard keyval handling as in many other packages
-\def\ProcessOptionsWithKV#1{%
- \let\@tempc\relax
- \let\mhchem@tempa\@empty
- \@for\CurrentOption:=\@classoptionslist\do{%
- \@ifundefined{KV@#1@\CurrentOption}%
- {}%
- {%
- \edef\mhchem@tempa{\mhchem@tempa,\CurrentOption,}%
- \@expandtwoargs\@removeelement\CurrentOption
- \@unusedoptionlist\@unusedoptionlist
- }%
- }%
- \edef\mhchem@tempa{%
- \noexpand\setkeys{#1}{%
- \mhchem@tempa\@ptionlist{\@currname.\@currext}%
- }%
- }%
- \mhchem@tempa
- \let\CurrentOption\@empty
- \AtEndOfPackage{\let\@unprocessedoptions\relax}
-}
-\ProcessOptionsWithKV{mhchem}\relax
-%%% end:
-
-\ifnum0=\mhchem@option@version%
- \PackageWarningNoLine{mhchem}{%
- You did not specify a 'version' option for the mhchem\MessageBreak
- package. This means you EITHER have an existing\MessageBreak
- document and mhchem was updated to a newer version.\MessageBreak
- Please check the mhchem manual in that case! OR, you\MessageBreak
- are about to create a new document, in this case,\MessageBreak
- please write \string\usepackage[version=2] in your preamble in\MessageBreak
- order to use the most recent version of mhchem}%
- \def\mhchem@option@version{1}%
-\else%
-\fi%
-
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-
-\def\mhchem@option@usenonsimultaneoussubsuperscripts{0}%
-\def\mhchem@option@alwaystextmode{0}%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%% %%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\providecommand\cmath[1]{\ensuremath{#1}}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%% misc %%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand*\cmath[1]{\ensuremath{\text{\ensuremath{#1}}}}%
\DeclareMathSymbol{\mhchem@hyphen}{0}{operators}{45}
-
\def\mhchem@empty{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% \ce %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifnum1<\mhchem@option@version%
- \newtoks\tok@mhchem@ce@i%
- \newtoks\tok@mhchem@ce@ii%
- \providecommand*{\cee}[1]{%
+\newtoks\tok@mhchem@ce@i%
+\newtoks\tok@mhchem@ce@ii%
+
+\newcommand*{\cee}[1]{%
+ \ifnum1<\mhchem@option@version%
\def\mhchem@ce@out{}%
- %\ifx\mhchem@END#1\mhchem@END\else%
{\mhchem@ce@v#1\mhchem@empty\\\mhchem@END\mhchem@ENDEND}%
- %\fi%
\ensuremath{%
\mhchem@ce@out%
}%
- }%
-\fi%
-\providecommand*{\ce}[1]{%
- \def\hyphen{\mhchem@hyphen}%
- \bgroup%
- \ifnum1<\mhchem@option@version%
- \ifmmode\else\def\mhchem@option@alwaystextmode{1}\fi%
- \fi%
- \ifx\mhchem@END#1\mhchem@END\else%
- \ifmmode\else\mhchem@option@textfont\fi%
- \ensuremath{%
- \mhchem@ce@i#1 \mhchem@END\mhchem@ENDEND%
- }%
+ \else%
+ \PackageWarningNoLine{mhchem}{%
+ The \string\cee{} command of mhchem is only available\MessageBreak
+ when you secify [version=2] or greater}%
\fi%
- \egroup%
}%
\def\mhchem@ce@v#1\\#2#3\mhchem@ENDEND{%
\ifx\mhchem@END#2%
- %\ifx\mhchem@END#1\mhchem@END\else%
- \mhchem@ce@vii#1&\mhchem@END\mhchem@ENDEND%
- %\fi%
+ \mhchem@ce@vii#1&\mhchem@END\mhchem@ENDEND%
\else%
\mhchem@ce@vii#1&\mhchem@END\mhchem@ENDEND%
\g@addto@macro\mhchem@ce@out{\\}%
\mhchem@ce@v#2#3\mhchem@ENDEND%
\fi%
}
-%
+
\long\def\mhchem@ce@vii#1&#2#3\mhchem@ENDEND{%
\ifx\mhchem@END#2%
\g@addto@macro\mhchem@ce@out{\ce{#1}}%
@@ -190,6 +88,25 @@
%%%
+\@ifundefined{hyphen}{%
+ \def\hyphen{}%
+}{}
+
+\DeclareRobustCommand*{\ce}[1]{%
+ \bgroup%
+ \protect\def\hyphen{\mhchem@hyphen}%
+ \ifnum1<\mhchem@option@version%
+ \ifmmode\else\def\mhchem@option@alwaystextmode{1}\fi%
+ \fi%
+ \ifx\mhchem@END#1\mhchem@END\else%
+ \ifmmode\else\mhchem@option@textfont\fi%
+ \ensuremath{%
+ \mhchem@ce@i#1 \mhchem@END\mhchem@ENDEND%
+ }%
+ \fi%
+ \egroup%
+}%
+
\def\mhchem@ce@i#1#2 #3\mhchem@ENDEND{%
\ifcat a#1 {\mhchem@ce@ii{#1#2}}%
\else\ifx 1#1{\mhchem@ce@ii{#1#2}}%
@@ -315,12 +232,6 @@
\else%
\cf{#1}%
\fi\fi\fi\fi%
-% \ifthenelse{\equal{{{#1}}}{{{(^)}}}}{{}\mathop{\uparrow}{}}{%
-% \ifthenelse{\equal{#1}{^}}{{}\mathop{\uparrow}{}}{%
-% \ifthenelse{\equal{#1}{(v)}}{{}\mathop{\downarrow}{}}{%
-% \ifthenelse{\equal{#1}{v}}{{}\mathop{\downarrow}{}}{%
-% \cf{#1}%
-% }%}}}%
}%
\def\mhchem@ce@cmath#1#2\mhchem@END{\cmath{#1}\cf{#2}}
@@ -332,50 +243,16 @@
\setlength{\mhchem@arrowminlength}{1em}
%TODO: adapt min length to each of the math modes
-\newcommandtwoopt*{\mhchem@gives}[2][\hspace{\mhchem@arrowminlength}][]{\ensuremath{%
- \xrightarrow%
- [{#2}]%
- {{#1}}}}
-\newcommandtwoopt*{\mhchem@givesT}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@gives[\text{#1}][\text{#2}]}
-\newcommandtwoopt*{\mhchem@givesC}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@gives[\ce{#1}][\ce{#2}]}
-
-\newcommandtwoopt*{\mhchem@givesleft}[2][\hspace{\mhchem@arrowminlength}][]{\ensuremath{%
- \xleftarrow%
- [{#2}]%
- {{#1}}}}
-\newcommandtwoopt*{\mhchem@givesleftT}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@givesleft[\text{#1}][\text{#2}]}
-\newcommandtwoopt*{\mhchem@givesleftC}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@givesleft[\ce{#1}][\ce{#2}]}
-
-\newcommandtwoopt*{\mhchem@mesomeric}[2][\hspace{\mhchem@arrowminlength}][]{\ensuremath{%
- \ext@arrow 3399\leftrightarrowfill@%
- {{#2}}%
- {{#1}}}}
-\newcommandtwoopt*{\mhchem@mesomericT}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@mesomeric[\text{#1}][\text{#2}]}
-\newcommandtwoopt*{\mhchem@mesomericC}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@mesomeric[\ce{#1}][\ce{#2}]}
-
-%%% idea taken from http://www.texnik.de/misc/harpoon.phtml
+%%% for font arrows
+%%%%% idea taken from http://www.texnik.de/misc/harpoon.phtml
\def\mhchem@rightharpoonupfill@{\arrowfill@\relbar\relbar\rightharpoonup}
\def\mhchem@leftharpoondownfill@{\arrowfill@\leftharpoondown\relbar\relbar}
-\newcommand*{\mhchem@xrightleftharpoons}[2][]{\mathrel{%
- \rlap{\protect\raisebox{.22ex}{$\ext@arrow 3399\mhchem@rightharpoonupfill@{\hphantom{#1}}{#2}$}}%
- \raisebox{-.22ex}{$\ext@arrow 3399\mhchem@leftharpoondownfill@{#1}{\hphantom{#2}}$}}}
-\newcommandtwoopt*{\mhchem@equilibrium}[2][\hspace{\mhchem@arrowminlength}][]{\ensuremath{%
- \mhchem@xrightleftharpoons%
- [{#2}]%
- {{#1}}}}
-\newcommandtwoopt*{\mhchem@equilibriumT}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@equilibrium[\text{#1}][\text{#2}]}
-\newcommandtwoopt*{\mhchem@equilibriumC}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@equilibrium[\ce{#1}][\ce{#2}]}
-
-\newsavebox{\mhchem@arrows@box}%
-\newcommand*{\mhchem@xlongrightshortleftharpoons}[2][]{\mathrel{%
+\newcommand*\mhchem@xrightleftharpoons[2][]{%
+ \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}$}%
@@ -383,16 +260,7 @@
\protect\raisebox{.22ex}{$\ext@arrow 3399\mhchem@rightharpoonupfill@%
{\hphantom{\usebox{\mhchem@arrows@box}}\mkern-6mu}{#2}$}%
}}
-\newcommandtwoopt*{\mhchem@equilibriumRight}[2][\hphantom{\makebox[\mhchem@arrowminlength]{}}][]{\ensuremath{%
- \mhchem@xlongrightshortleftharpoons%
- [{#2}]%
- {{#1}}}}
-\newcommandtwoopt*{\mhchem@equilibriumRightT}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@equilibriumRight[\text{#1}][\text{#2}]}
-\newcommandtwoopt*{\mhchem@equilibriumRightC}[2][\hspace{\mhchem@arrowminlength}][]%
- {\mhchem@equilibriumRight[\ce{#1}][\ce{#2}]}
-
-\newcommand*{\mhchem@xshortrightlongleftharpoons}[2][]{\mathrel{%
+\newcommand*\mhchem@xshortrightlongleftharpoons[2][]{\mathrel{%
\sbox{\mhchem@arrows@box}%
{$\mkern9mu\ext@arrow 3399\mhchem@rightharpoonupfill@%
{\hphantom{#1}\mkern-6mu\mkern-12mu}{#2}$}%
@@ -400,15 +268,213 @@
\protect\raisebox{-.22ex}{$\ext@arrow 3399\mhchem@leftharpoondownfill@%
{#1}{\hphantom{\usebox{\mhchem@arrows@box}}\mkern-6mu}$}%
}}
-\newcommandtwoopt*{\mhchem@equilibriumLeft}[2][][\hspace{\mhchem@arrowminlength}]{\ensuremath{%
- \mhchem@xshortrightlongleftharpoons%
- [{#2}]%
- {{#1}}}}
+%\newcommand*\mhchem@xleftrightarrow[2][]{\ext@arrow 3095\leftrightarrowfill@{#1}{#2}}
+
+
+%%% for pgf arrows
+\newcommand*\mhchem@rightarrow@pgf[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) -- ++(#1,0cm)
+ %\draw[cap=round, join=round, line width=0.07ex]
+ % (#1,0.575ex)
+ arc (250:198:0.6ex) arc (198:250:0.6ex)
+ arc (110:162:0.6ex);
+ \end{tikzpicture}%
+}%
+\newcommand*\mhchem@leftarrow@pgf[1]{%
+ \begin{tikzpicture}[baseline]%
+ \draw[use as bounding box] (0,0) (#1,0.85ex);
+ \draw[cap=round, join=round, line width=0.09ex]
+ (#1,0.575ex) -- (0cm,0.575ex)
+ %\draw[cap=round, join=round, line width=0.07ex]
+ % (0cm,0.575ex)
+ arc (70:18:0.6ex) arc (18:70:0.6ex)
+ arc (-70:-18:0.6ex);
+ \end{tikzpicture}%
+}%
+\newcommand*\mhchem@leftrightarrow@pgf[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);
+ \end{tikzpicture}%
+}%
+\newcommand*\mhchem@leftrightharpoon@pgf[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[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);
+ \end{tikzpicture}%
+}%
+\newcommand*\mhchem@shortrightlongleftharpoons@pgf[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[cap=round, join=round, line width=0.09ex]
+ (#1,0.575ex-0.22ex) -- ++(-#1,0cm) arc (70:18:0.9ex);
+ \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{hhleftrightarrow}{#5}}{\setlength\mhchem@arrowminlength@pgf{10pt+0.7em}}{}%
+ \ifthenelse{\equal{hhleftrightharpoon}{#5}}{\setlength\mhchem@arrowminlength@pgf{10pt+0.7em}}{}%
+ \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%
+ }}}%
+ }{}%
+ %
+ \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}}}%
+ }{%
+ \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{#1}][\ce{#2}]}%
+\newcommandtwoopt*\mhchem@givesleftT[2][\hspace{\mhchem@arrowminlength}][]%
+ {\mhchem@givesleft[\text{#1}][\text{#2}]}%
+\newcommandtwoopt*\mhchem@givesleftC[2][\hspace{\mhchem@arrowminlength}][]%
+ {\mhchem@givesleft[\ce{#1}][\ce{#2}]}%
+\newcommandtwoopt*\mhchem@mesomericT[2][\hspace{\mhchem@arrowminlength}][]%
+ {\mhchem@mesomeric[\text{#1}][\text{#2}]}%
+\newcommandtwoopt*\mhchem@mesomericC[2][\hspace{\mhchem@arrowminlength}][]%
+ {\mhchem@mesomeric[\ce{#1}][\ce{#2}]}%
+\newcommandtwoopt*{\mhchem@equilibriumT}[2][\hspace{\mhchem@arrowminlength}][]%
+ {\mhchem@equilibrium[\text{#1}][\text{#2}]}
+\newcommandtwoopt*{\mhchem@equilibriumC}[2][\hspace{\mhchem@arrowminlength}][]%
+ {\mhchem@equilibrium[\ce{#1}][\ce{#2}]}
+\newcommandtwoopt*{\mhchem@equilibriumRightT}[2][\hspace{\mhchem@arrowminlength}][]%
+ {\mhchem@equilibriumRight[\text{#1}][\text{#2}]}
+\newcommandtwoopt*{\mhchem@equilibriumRightC}[2][\hspace{\mhchem@arrowminlength}][]%
+ {\mhchem@equilibriumRight[\ce{#1}][\ce{#2}]}
\newcommandtwoopt*{\mhchem@equilibriumLeftT}[2][][\hspace{\mhchem@arrowminlength}]%
{\mhchem@equilibriumLeft[\text{#1}][\text{#2}]}
\newcommandtwoopt*{\mhchem@equilibriumLeftC}[2][][\hspace{\mhchem@arrowminlength}]%
{\mhchem@equilibriumLeft[\ce{#1}][\ce{#2}]}
+
%%%%%%%%%%
% bonds - basic definition see in \cf
\newlength\mhchem@bondwidth%
@@ -484,9 +550,10 @@
%%%%%%%%%% \cf %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtoks\mhchem@cf@sup%
+\newtoks\mhchem@cf@number
\newtoks\tok@mhchem@cf@i%
-\providecommand*{\cf}[2][]{%
+\newcommand*{\cf}[2][]{%
\bgroup%
\def\sbond{{\ensuremath{-}}}%
\def\dbond{\rlap{\protect\raisebox{.2ex}{\sbond}}\protect\raisebox{-.2ex}{\sbond}}%
@@ -498,13 +565,18 @@
\edef\mhchem@mathortext##1{\noexpand\text{##1}}%
\edef\mhchem@mathortext@ii##1##2{##2}%
\else%
- \edef\mhchem@mathortext##1{\ifmmode\noexpand\mhchem@option@mathfont{##1}\else\noexpand\text{##1}\fi}%
- \edef\mhchem@mathortext@ii##1##2{\ifmmode\noexpand\mhchem@option@mathfont{##1}\else ##2\fi}%
+ \ifnum1<\mhchem@option@version%
+ \edef\mhchem@mathortext##1{\ifmmode\noexpand\mhchem@option@mathfont{##1}\else\noexpand\text{##1}\fi}%
+ \edef\mhchem@mathortext@ii##1##2{\ifmmode\noexpand\mhchem@option@mathfont{##1}\else ##2\fi}%
+ \else
+ \edef\mhchem@mathortext##1{\ifmmode ##1\else\noexpand\text{##1}\fi}%
+ \edef\mhchem@mathortext@ii##1##2{\ifmmode ##1\else ##2\fi}%
+ \fi%
\fi%
\ifmmode\else\mhchem@option@textfont\fi%
\ensuremath{%
\def\mhchem@cf@element{}%
- \def\mhchem@cf@number{}%
+ %\def\mhchem@cf@number{}%
%\def\mhchem@cf@sup{}%
\def\mhchem@cf@presub{}%
\def\mhchem@cf@presup{}%
@@ -527,20 +599,21 @@
\if\mhchem@cf@state s%
%
\else\if\mhchem@cf@state 1%
- {\mhchem@mathortext{\expandafter\mhchem@cf@frac\mhchem@cf@number/\mhchem@END}}%
+ {\mhchem@mathortext{\expandafter\mhchem@cf@frac\the\mhchem@cf@number/\mhchem@END}}%
\else\if\mhchem@cf@state n%
- {\mhchem@mathortext{\expandafter\mhchem@cf@frac\mhchem@cf@number/\mhchem@END}}%
+ {\mhchem@mathortext{\expandafter\mhchem@cf@frac\the\mhchem@cf@number/\mhchem@END}}%
\else%
\if\mhchem@option@usenonsimultaneoussubsuperscripts 0%
\mhchem@chemfive{\mhchem@cf@presup}{\mhchem@cf@presub}%
- {\mhchem@cf@element}{\mhchem@cf@number}{\the\mhchem@cf@sup}{}%
+ {\mhchem@cf@element}{\the\mhchem@cf@number}{\the\mhchem@cf@sup}{}%
\else%
\mhchem@chemfive{\mhchem@cf@presup}{\mhchem@cf@presub}%
- {\mhchem@cf@element}{\mhchem@cf@number}{}{\the\mhchem@cf@sup}%
+ {\mhchem@cf@element}{\the\mhchem@cf@number}{}{\the\mhchem@cf@sup}%
\fi%
\fi\fi\fi%
\def\mhchem@cf@element{}%
- \def\mhchem@cf@number{}%
+ %
+ \mhchem@cf@number{}%
%
\mhchem@cf@sup{}%
\def\mhchem@cf@presub{}%
@@ -618,35 +691,35 @@
\mhchem@cf@output%
\else%
\if\mhchem@cf@state e%
- \tok@mhchem@cf@i=\expandafter{\mhchem@cf@replaceminus{#1}}%
\mhchem@cf@sup=\expandafter{\the\mhchem@cf@sup%
- \expandafter\mhchem@cf@replacedot\expandafter{\the\tok@mhchem@cf@i}}%
+ \expandafter\mhchem@cf@replacedot\expandafter{\mhchem@cf@replaceminus{#1}}}%
+ %
+ %
+ %
+ %
\def\mhchem@cf@state{+}%
\else\if\mhchem@cf@state E%
\mhchem@cf@sup=\expandafter{\the\mhchem@cf@sup%
\mhchem@mathortext@ii{\mhchem@option@mathfont{#1}}{#1}}%
\def\mhchem@cf@state{+}%
\else\if\mhchem@cf@state p%
- \edef\mhchem@cf@presup{\mhchem@cf@presup%
- %\mhchem@cf@replaceminus{
- #1}%
- %}%
+ \g@addto@macro\mhchem@cf@presup{#1}%
\def\mhchem@cf@state{*}%
\else\if\mhchem@cf@state P%
\edef\mhchem@cf@presup{\mhchem@cf@presup%
\mhchem@mathortext@ii{\mhchem@option@mathfont{#1}}{#1}}%
\def\mhchem@cf@state{*}%
\else\if\mhchem@cf@state f%
- \g@addto@macro\mhchem@cf@number{#1}%
+ \mhchem@cf@number=\expandafter{\the\mhchem@cf@number#1}%
\def\mhchem@cf@state{+}%
\else\if\mhchem@cf@state F%
- \if\mhchem@END\mhchem@cf@number\mhchem@END%
- \else\edef\mhchem@cf@number{\mhchem@cf@number\,}\fi%
- \edef\mhchem@cf@number{\mhchem@cf@number%
+ \if\mhchem@END\the\mhchem@cf@number\mhchem@END%
+ \else\mhchem@cf@number=\expandafter{\the\mhchem@cf@number\,}\fi%
+ \mhchem@cf@number=\expandafter{\the\mhchem@cf@number%
\mhchem@mathortext@ii{\mhchem@option@mathfont{#1}}{#1}}%
\def\mhchem@cf@state{+}%
\else\if\mhchem@cf@state q%
- \edef\mhchem@cf@presub{\mhchem@cf@presub #1}%
+ \g@addto@macro\mhchem@cf@presub{#1}%
\def\mhchem@cf@state{*}%
\else\if\mhchem@cf@state Q%
\edef\mhchem@cf@presub{\mhchem@cf@presub%
@@ -747,7 +820,7 @@
\def\mhchem@cf@state{2}%
\fi\fi%
\fi%
- \edef\mhchem@cf@number{\mhchem@cf@number #1}%
+ \mhchem@cf@number=\expandafter{\the\mhchem@cf@number #1}%
\else\ifcat a\noexpand#1%
\if\mhchem@cf@state a%
\else%
@@ -764,20 +837,27 @@
\if\mhchem@cf@state s\def\mhchem@cf@state{p}%
\else\if\mhchem@cf@state 1\mhchem@cf@output\def\mhchem@cf@state{p}%
\else\if\mhchem@cf@state *\def\mhchem@cf@state{p}%
- \else\def\mhchem@cf@state{e}%
+ \else%
+ \if\mhchem@END\the\mhchem@cf@sup\mhchem@END%
+ \else\mhchem@cf@sup=\expandafter{\the\mhchem@cf@sup\,}\fi%
+ \def\mhchem@cf@state{e}%
\fi\fi\fi%
\else\if^\noexpand#1%
\if\mhchem@cf@state s\def\mhchem@cf@state{p}%
\else\if\mhchem@cf@state 1\mhchem@cf@output\def\mhchem@cf@state{p}%
\else\if\mhchem@cf@state *\def\mhchem@cf@state{p}%
- \else\def\mhchem@cf@state{e}%
+ \else%
+ \if\mhchem@END\the\mhchem@cf@sup\mhchem@END%
+ \else\mhchem@cf@sup=\expandafter{\the\mhchem@cf@sup\,}\fi%
+ \def\mhchem@cf@state{e}%
\fi\fi\fi%
\else\ifcat _\noexpand#1%
\if\mhchem@cf@state s\def\mhchem@cf@state{q}%
\else\if\mhchem@cf@state 1\mhchem@cf@output\def\mhchem@cf@state{q}%
\else\if\mhchem@cf@state *\def\mhchem@cf@state{q}%
+ \else\if\mhchem@cf@state 2\mhchem@cf@number=\expandafter{\the\mhchem@cf@number\,}\def\mhchem@cf@state{f}%
\else\def\mhchem@cf@state{f}%
- \fi\fi\fi%
+ \fi\fi\fi\fi%
\else%
\mhchem@cf@output@o{#1}%
\fi\fi\fi%
@@ -829,7 +909,7 @@
\mhchem@minispace% [3]
}%
\mhchem@mathortext@ii{% [5]
- \mhchem@option@mathfont{#3}%
+ \mhchem@option@mathfont #3%
}{\text{#3}}% [5]
\ifthenelse{\equal{#4#5}{}}{}{%
_{%
@@ -869,26 +949,150 @@
%
}
-\newcommand*{\mhchem@mathbox}[1]{\mathchoice%
+\newcommand*\mhchem@mathbox[2][]{%
+ \mathchoice%
+ {\mhchem@mathbox@ii{\displaystyle}{#1}{#2}}%
+ {\mhchem@mathbox@ii{\textstyle}{#1}{#2}}%
+ {\mhchem@mathbox@ii{\scriptstyle}{#1}{#2}}%
+ {\mhchem@mathbox@ii{\scriptscriptstyle}{#1}{#2}}}%
+\newcommand*\mhchem@mathbox@ii[3]{%
+ \setlength{\dimen1}{\widthof{\ensuremath{#1#2}}}%
+ \setlength{\dimen2}{\widthof{\ensuremath{#1#3}}}%
+ \ifdim\dimen1<\dimen2%
+ \mhchem@mathbox@i{#3}%
+ \else%
+ \makebox[\dimen1]{\ensuremath{\displaystyle#3}}%
+ \fi}
+\newcommand*\mhchem@mathbox@i[1]{\mathchoice%
{\mbox{\ensuremath{\displaystyle#1}}}%
{\mbox{\ensuremath{\textstyle#1}}}%
{\mbox{\ensuremath{\scriptstyle#1}}}%
{\mbox{\ensuremath{\scriptscriptstyle#1}}}}
-
-\newcommand*{\mhchem@mathboxright}[2]{\mathchoice%
+
+\newcommand*\mhchem@mathboxright[2]{\mathchoice%
{\makebox[#1][r]{\ensuremath{\displaystyle#2}}}%
{\makebox[#1][r]{\ensuremath{\textstyle#2}}}%
{\makebox[#1][r]{\ensuremath{\scriptstyle#2}}}%
{\makebox[#1][r]{\ensuremath{\scriptscriptstyle#2}}}}
-\def\mhchem@minispace{%
- \setlength{\dimen2}{0pt-\widthof{${}^8_8$}+
+\newcommand*\mhchem@minispace{%
+ \setlength{\dimen2}{0pt-\widthof{${}^8_8$}+%
\widthof{$\text{C}^8_8$}-\widthof{$\text{C}^{}_{}$}}% [3]
\kern\dimen2%
%
%
}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%% Options %%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\mhchem@option@version{0}
+\define@key{mhchem}{version}{\def\mhchem@option@version{#1}}
+
+\def\mhchem@option@mathfont{\mathrm}
+\def\mhchem@option@textfont{}
+\define@key{mhchem}{textfontcommand}{\def\mhchem@option@textfont{#1}}
+\define@key{mhchem}{textfontname}{\def\mhchem@option@textfont{\csname#1\endcsname}}
+\define@key{mhchem}{mathfontcommand}{\def\mhchem@option@mathfont{#1}}
+\define@key{mhchem}{mathfontname}{\def\mhchem@option@mathfont{\csname#1\endcsname}}
+\define@key{mhchem}{font}{%
+ \ifthenelse{\equal{sf}{#1}}{%
+ \def\mhchem@option@textfont{\sffamily}%
+ \def\mhchem@option@mathfont{\mathsf}%
+ }{\ifthenelse{\equal{}{#1}}{%
+ \def\mhchem@option@textfont{}%
+ \def\mhchem@option@mathfont{\mathrm}%
+ }{\PackageError{mhchem}{Font option `#1' unknown}}}%
+}
+
+\newlength\mhchem@option@minussidebearingleft
+\newlength\mhchem@option@minussidebearingright
+\setlength\mhchem@option@minussidebearingleft{0.06em}
+\setlength\mhchem@option@minussidebearingright{0.11em}
+\define@key{mhchem}{minus-sidebearing-left}{\setlength\mhchem@option@minussidebearingleft{#1}}
+\define@key{mhchem}{minus-sidebearing-right}{\setlength\mhchem@option@minussidebearingright{#1}}
+
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+
+\def\mhchem@option@usenonsimultaneoussubsuperscripts{0}%
+\def\mhchem@option@alwaystextmode{0}%
+
+\mhchem@definearrows{font}
+\define@key{mhchem}{arrows}{%
+ \ifthenelse{\equal{pgf}{#1}}{%
+ \RequirePackage{pgf}% for finding the tikz package more easily
+ \RequirePackage{tikz}%
+ }{}%
+ \mhchem@definearrows{#1}%
+}
+
+%%% begin: standard keyval handling as in many other packages
+\def\ProcessOptionsWithKV#1{%
+ \let\@tempc\relax%
+ \let\mhchem@tempa\@empty%
+ \@for\CurrentOption:=\@classoptionslist\do{%
+ \@ifundefined{KV@#1@\CurrentOption}%
+ {}%
+ {%
+ \edef\mhchem@tempa{\mhchem@tempa,\CurrentOption,}%
+ \@expandtwoargs\@removeelement\CurrentOption%
+ \@unusedoptionlist\@unusedoptionlist%
+ }%
+ }%
+ \edef\mhchem@tempa{%
+ \noexpand\setkeys{#1}{%
+ \mhchem@tempa\@ptionlist{\@currname.\@currext}%
+ }%
+ }%
+ \mhchem@tempa%
+ \let\CurrentOption\@empty%
+ \AtEndOfPackage{\let\@unprocessedoptions\relax}%
+}
+\ProcessOptionsWithKV{mhchem}\relax
+%%% end:
+
+\define@key{mhchem}{arrows}{\mhchem@definearrows{#1}}
+
+\newcommand*\mhchemoptions[1]{\setkeys{mhchem}{#1}}
+
+\ifnum0=\mhchem@option@version%
+ \PackageWarningNoLine{mhchem}{%
+ You did not specify a 'version' option for the mhchem\MessageBreak
+ package. This means you EITHER have an existing\MessageBreak
+ document and mhchem was updated to a newer version.\MessageBreak
+ Please check the mhchem manual in that case! OR, you\MessageBreak
+ are about to create a new document; in this case,\MessageBreak
+ please write \string\usepackage[version=3]{mhchem} in your preamble in\MessageBreak
+ order to use the most recent version of mhchem}%
+ \def\mhchem@option@version{1}%
+\else%
+\fi%
+
+
+
+
+
+
+
+
+
+
%TODO: option for CrO_4{}^{2-} instead of CrO_4^{2-} - proper switch option [wordstyle] and documentation
%TODO: option to use nicefrac
%TODO: option for automatically using nicefrac im text mode
@@ -903,4 +1107,5 @@
%TODO: always minimum length of arrows? override?
%TODO: count0 und dimen@ eliminieren
%
-%- ? option for labels on arrows in \scriptstyle? \textstyle? \ No newline at end of file
+%
+%- option for centered bonds? \ 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 b180595571f..60b67112090 100644
--- a/Master/texmf-dist/tex/latex/mhchem/rsphrase.sty
+++ b/Master/texmf-dist/tex/latex/mhchem/rsphrase.sty
@@ -1,5 +1,5 @@
%% rsphrase.sty
-%% Copyright 2004-2005 M.a-r.t-i.n H.e-n.s-e.l
+%% Copyright 2004-2006 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
@@ -48,7 +48,7 @@
% mhchem.pdf, legal.txt and whatsnew.txt.
%
%
-\ProvidesPackage{rsphrase}[2005/07/15 v3.00 Risk and Safety Phrases (mhchem bundle)]
+\ProvidesPackage{rsphrase}[2006/06/23 v3.03 Risk and Safety Phrases (mhchem bundle)]
\RequirePackage{ifthen}
\RequirePackage{textcomp}
@@ -107,10 +107,29 @@
\def\mhchem@rs@empty{}
\def\mhchem@rs@warning@german{\PackageWarning{rsphrase}{%
- Your use the language setting german. rsphrase%
- \MessageBreak only knows the current German spelling (ngerman)%
- \MessageBreak which therefore is used for all "german"%
- \MessageBreak phrases in this document}}
+ You use the language setting german (or austrian or%
+ \MessageBreak germanb). rsphrase only knows the current German
+ \MessageBreak spelling (ngerman or naustrian) which will be
+ \MessageBreak used for all "german" phrases in this document%
+ \MessageBreak }}
+
+\newcommand*{\mhchem@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
+}
\newcommand{\rsnumber}[2]%
[]%
@@ -119,23 +138,40 @@
{%
\gdef\mhchem@rs@phrase{\mhchem@rs@empty}%
%
- \iflanguage{danish}{\mhchem@rs@data@danish[#1]{#2}}{%
+ \mhchem@iflanguagename{danish}{\mhchem@rs@data@danish[#1]{#2}}{%
%
- \iflanguage{english}{\mhchem@rs@data@english[#1]{#2}}{% = USenglish, american
- \iflanguage{UKenglish}{\mhchem@rs@data@english[#1]{#2}}{% = british
+ \mhchem@iflanguagename{english}{\mhchem@rs@data@english[#1]{#2}}{% = USenglish, american
+ \mhchem@iflanguagename{USenglish}{\mhchem@rs@data@english[#1]{#2}}{%
+ \mhchem@iflanguagename{american}{\mhchem@rs@data@english[#1]{#2}}{%
+ \mhchem@iflanguagename{UKenglish}{\mhchem@rs@data@english[#1]{#2}}{% = british
+ \mhchem@iflanguagename{british}{\mhchem@rs@data@english[#1]{#2}}{%
%
- \iflanguage{french}{\mhchem@rs@data@french[#1]{#2}}{% = francais, canadien, acadian
+ \mhchem@iflanguagename{french}{\mhchem@rs@data@french[#1]{#2}}{% = francais, canadien, acadian
+ \mhchem@iflanguagename{francais}{\mhchem@rs@data@french[#1]{#2}}{%
+ \mhchem@iflanguagename{canadien}{\mhchem@rs@data@french[#1]{#2}}{%
+ \mhchem@iflanguagename{acadian}{\mhchem@rs@data@french[#1]{#2}}{%
%
- \iflanguage{ngerman}{\mhchem@rs@data@ngerman[#1]{#2}}{% = naustrian
- \iflanguage{german}{% = austrian, germanb,
+ \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@rs@warning@german%
+ \gdef\mhchem@rs@warning@german{}%
+ \mhchem@rs@data@ngerman[#1]{#2}%
+ }{%
+ \mhchem@iflanguagename{austrian}{%
\mhchem@rs@warning@german%
\gdef\mhchem@rs@warning@german{}%
\mhchem@rs@data@ngerman[#1]{#2}%
}{%
+ \mhchem@iflanguagename{germanb}{%
+ \mhchem@rs@warning@german%
+ \gdef\mhchem@rs@warning@german{}%
+ \mhchem@rs@data@ngerman[#1]{#2}%
+ }{%
%
- \iflanguage{spanish}{\mhchem@rs@data@spanish[#1]{#2}}{%
+ \mhchem@iflanguagename{spanish}{\mhchem@rs@data@spanish[#1]{#2}}{%
%
- }}}}}}}%
+ }}}}}}}}}}}}}}}}%
\ifthenelse{\equal{\mhchem@rs@phrase}{\mhchem@rs@empty}}%
{\gdef\mhchem@rs@phrase{}%
\PackageError{rsphrase}{R or S Phrase "#2" is unknown for your%
@@ -153,23 +189,40 @@
{%
\gdef\mhchem@rs@phrase{\mhchem@rs@empty}%
%
- \iflanguage{danish}{\mhchem@rs@data@danish[#1]{#2}}{%
+ \mhchem@iflanguagename{danish}{\mhchem@rs@data@danish[#1]{#2}}{%
%
- \iflanguage{english}{\mhchem@rs@data@english[#1]{#2}}{% = USenglish, american
- \iflanguage{UKenglish}{\mhchem@rs@data@english[#1]{#2}}{% = british
+ \mhchem@iflanguagename{english}{\mhchem@rs@data@english[#1]{#2}}{% = USenglish, american
+ \mhchem@iflanguagename{USenglish}{\mhchem@rs@data@english[#1]{#2}}{%
+ \mhchem@iflanguagename{american}{\mhchem@rs@data@english[#1]{#2}}{%
+ \mhchem@iflanguagename{UKenglish}{\mhchem@rs@data@english[#1]{#2}}{% = british
+ \mhchem@iflanguagename{british}{\mhchem@rs@data@english[#1]{#2}}{%
%
- \iflanguage{french}{\mhchem@rs@data@french[#1]{#2}}{% = francais, canadien, acadian
+ \mhchem@iflanguagename{french}{\mhchem@rs@data@french[#1]{#2}}{% = francais, canadien, acadian
+ \mhchem@iflanguagename{francais}{\mhchem@rs@data@french[#1]{#2}}{%
+ \mhchem@iflanguagename{canadien}{\mhchem@rs@data@french[#1]{#2}}{%
+ \mhchem@iflanguagename{acadian}{\mhchem@rs@data@french[#1]{#2}}{%
%
- \iflanguage{ngerman}{\mhchem@rs@data@ngerman[#1]{#2}}{% = naustrian
- \iflanguage{german}{% = austrian, germanb,
+ \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@rs@warning@german%
+ \gdef\mhchem@rs@warning@german{}%
+ \mhchem@rs@data@ngerman[#1]{#2}%
+ }{%
+ \mhchem@iflanguagename{austrian}{%
\mhchem@rs@warning@german%
\gdef\mhchem@rs@warning@german{}%
\mhchem@rs@data@ngerman[#1]{#2}%
}{%
+ \mhchem@iflanguagename{germanb}{%
+ \mhchem@rs@warning@german%
+ \gdef\mhchem@rs@warning@german{}%
+ \mhchem@rs@data@ngerman[#1]{#2}%
+ }{%
%
- \iflanguage{spanish}{\mhchem@rs@data@spanish[#1]{#2}}{%
+ \mhchem@iflanguagename{spanish}{\mhchem@rs@data@spanish[#1]{#2}}{%
%
- }}}}}}}%
+ }}}}}}}}}}}}}}}}%
\ifthenelse{\equal{\mhchem@rs@phrase}{\mhchem@rs@empty}}%
{\gdef\mhchem@rs@phrase{}%
\PackageError{rsphrase}{R or S phrase "#2" is unknown for your%
@@ -803,7 +856,7 @@
\mhchem@rs@ii[S23]{#2}{S23.1}{Do not breathe gas}{}%
\mhchem@rs@ii[S23]{#2}{S23.2}{Do not breathe fumes}{}%
\mhchem@rs@ii[S23]{#2}{S23.3}{Do not breathe vapour}{}%
- \mhchem@rs@ii[S23]{#2}{S23.4}{Do not breathe spay}{}%
+ \mhchem@rs@ii[S23]{#2}{S23.4}{Do not breathe spray}{}%
\mhchem@rs@ii{#2}{S24}{Avoid contact with skin}{}%
\mhchem@rs@ii{#2}{S25}{Avoid contact with eyes}{}%
\mhchem@rs@ii{#2}{S26}{In case of contact with eyes, rinse immediately with
diff --git a/Master/texmf-dist/tpm/mhchem.tpm b/Master/texmf-dist/tpm/mhchem.tpm
index 2c713e6f27c..ad19a805087 100644
--- a/Master/texmf-dist/tpm/mhchem.tpm
+++ b/Master/texmf-dist/tpm/mhchem.tpm
@@ -3,8 +3,8 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/mhchem.zip">
<TPM:Name>mhchem</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/01/09 00:44:40</TPM:Date>
- <TPM:Version>2.05</TPM:Version>
+ <TPM:Date>2006/06/23 12:32:00</TPM:Date>
+ <TPM:Version></TPM:Version>
<TPM:Creator>rahtz</TPM:Creator>
<TPM:Title>
Typeset chemical formulae/equations and Risk and Safety phrases
@@ -23,15 +23,14 @@ spelling), and Spanish.
<TPM:Author>Martin Hensel</TPM:Author>
<TPM:Size>302381</TPM:Size>
<TPM:Build/>
- <TPM:RunFiles size="150224">
+ <TPM:RunFiles size="160142">
texmf-dist/tex/latex/mhchem/mhchem.sty
texmf-dist/tex/latex/mhchem/rsphrase.sty
texmf-dist/tpm/mhchem.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="152157">
+ <TPM:DocFiles size="276311">
texmf-dist/doc/latex/mhchem/legal.txt
texmf-dist/doc/latex/mhchem/mhchem.pdf
-texmf-dist/doc/latex/mhchem/whatsnew.txt
</TPM:DocFiles>
<TPM:Provides>Package/mhchem</TPM:Provides>
</rdf:Description>
diff --git a/Master/texmf/lists/mhchem b/Master/texmf/lists/mhchem
index 89369b2552d..85346e4d95f 100644
--- a/Master/texmf/lists/mhchem
+++ b/Master/texmf/lists/mhchem
@@ -1,6 +1,5 @@
texmf-dist/doc/latex/mhchem/legal.txt
texmf-dist/doc/latex/mhchem/mhchem.pdf
-texmf-dist/doc/latex/mhchem/whatsnew.txt
texmf-dist/tex/latex/mhchem/mhchem.sty
texmf-dist/tex/latex/mhchem/rsphrase.sty