summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/README4
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/mhchem.pdfbin202670 -> 202823 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/mhchem.tex9
-rw-r--r--Master/texmf-dist/tex/latex/mhchem/mhchem.sty139
4 files changed, 91 insertions, 61 deletions
diff --git a/Master/texmf-dist/doc/latex/mhchem/README b/Master/texmf-dist/doc/latex/mhchem/README
index c987ef97966..797dd509ec4 100644
--- a/Master/texmf-dist/doc/latex/mhchem/README
+++ b/Master/texmf-dist/doc/latex/mhchem/README
@@ -1,7 +1,7 @@
-The mhchem Bundle 2015-01-05
+The mhchem Bundle 2015-02-09
containing
-- mhchem v3.18
+- mhchem v3.19
- hpstatement v1.01
- rsphrase v3.11
diff --git a/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf b/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf
index f07b6fd0bf9..dae451d1870 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
index b0d10c6191d..418bf4f2fe0 100644
--- a/Master/texmf-dist/doc/latex/mhchem/mhchem.tex
+++ b/Master/texmf-dist/doc/latex/mhchem/mhchem.tex
@@ -62,7 +62,7 @@
The mhchem Bundle\\[0.3em]
\Large\textmd{%
Documentation for the Packages\\
- mhchem v3.18,\\% check
+ mhchem v3.19,\\% check
hpstatement v1.01 and\\
rsphrase v3.11}%
}
@@ -71,7 +71,7 @@
mhchem\makebox[0pt][l]{\textcolor{white}{NOSPAM}}@MartinHensel\makebox[1pt][l]{\textcolor{white}{.}}.de%
}
\date{%
- 2015-01-09% check
+ 2015-02-09% check
}
\maketitle
@@ -812,6 +812,11 @@ Meaning and usage of \macro{bond} changed.
\section{Most Recent Changes}% check
+\minisec{2015-02-09 mhchem v3.19}
+\begin{compactitem}
+\item fixed an incompatibility when running without (implicit) pdftexcmds
+\end{compactitem}
+
\minisec{2015-01-05 mhchem v3.18}
\begin{compactitem}
\item rewrote further large parts using \LaTeX3, preparing for new features
diff --git a/Master/texmf-dist/tex/latex/mhchem/mhchem.sty b/Master/texmf-dist/tex/latex/mhchem/mhchem.sty
index 50d11a60c0d..aba1aec977d 100644
--- a/Master/texmf-dist/tex/latex/mhchem/mhchem.sty
+++ b/Master/texmf-dist/tex/latex/mhchem/mhchem.sty
@@ -27,7 +27,7 @@
% This work consists of all files listed in manifest.txt.
%
%
-\ProvidesPackage{mhchem}[2015/01/05 v3.18 for typesetting chemical formulae]
+\ProvidesPackage{mhchem}[2015/02/09 v3.19 for typesetting chemical formulae]
\RequirePackage{ifthen}
\RequirePackage{calc}[1998/07/07]
\RequirePackage{amsmath}
@@ -1065,53 +1065,61 @@
\resizebox{\mhchem@smallbondwidth}{\mhchem@bondheight}{\sbond}%
\resizebox{\mhchem@smallbondwidth}{\mhchem@bondheight}{\sbond}}%
\phantom{\sbond}}%
-\def\mhchem@bond#1{%
- \ifnum\pdf@strcmp{#1}{-}=0%
- \sbond%
- \else\ifnum\pdf@strcmp{#1}{1}=0%
- \sbond%
- \else\ifnum\pdf@strcmp{#1}{=}=0%
- \dbond%
- \else\ifnum\pdf@strcmp{#1}{2}=0%
- \dbond%
- \else\ifnum\pdf@strcmp{#1}{##}=0%
- \tbond%
- \else\ifnum\pdf@strcmp{#1}{3}=0%
- \tbond%
- \else\ifnum\pdf@strcmp{#1}{~}=0%
- \mhchem@setbondwidth%
- \mhchem@halfbond%
- \else\ifnum\pdf@strcmp{#1}{~-}=0%
- \mhchem@setbondwidth%
- \rlap{\protect\raisebox{.2ex}{\mhchem@halfbond}}%
- \protect\raisebox{-.2ex}{\sbond}%
- \else\ifnum\pdf@strcmp{#1}{~--}=0%
- \mhchem@setbondwidth%
- \rlap{\protect\raisebox{.4ex}{\mhchem@halfbond}}%
- \rlap{\sbond}%
- \protect\raisebox{-.4ex}{\sbond}%
- \else\ifnum\pdf@strcmp{#1}{~=}=0%
- \mhchem@setbondwidth%
- \rlap{\protect\raisebox{.4ex}{\mhchem@halfbond}}%
- \rlap{\sbond}%
- \protect\raisebox{-.4ex}{\sbond}%
- \else\ifnum\pdf@strcmp{#1}{-~-}=0%
- \mhchem@setbondwidth%
- \rlap{\protect\raisebox{.4ex}{\sbond}}%
- \rlap{\mhchem@halfbond}%
- \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\fi\fi\fi%
-}
+\ExplSyntaxOn
+\char_set_catcode_letter:n { 126 } % tilde
+\cs_new_protected:Npn \mhchem@bond #1
+ {
+ \str_case:nnn {#1}
+ {
+ { - } { \sbond }
+ { 1 } { \sbond }
+ { = } { \dbond }
+ { 2 } { \dbond }
+ { ## } { \tbond }
+ { 3 } { \tbond }
+ { ~ }
+ {
+ \mhchem@setbondwidth
+ \mhchem@halfbond
+ }
+ { ~- }
+ {
+ \mhchem@setbondwidth
+ \rlap{\protect\raisebox{.2ex}{\mhchem@halfbond}}
+ \protect\raisebox{-.2ex}{\sbond}
+ }
+ { ~-- }
+ {
+ \mhchem@setbondwidth
+ \rlap{\protect\raisebox{.4ex}{\mhchem@halfbond}}
+ \rlap{\sbond}
+ \protect\raisebox{-.4ex}{\sbond}
+ }
+ { ~= }
+ {
+ \mhchem@setbondwidth
+ \rlap{\protect\raisebox{.4ex}{\mhchem@halfbond}}
+ \rlap{\sbond}
+ \protect\raisebox{-.4ex}{\sbond}
+ }
+ { -~- }
+ {
+ \mhchem@setbondwidth
+ \rlap{\protect\raisebox{.4ex}{\sbond}}
+ \rlap{\mhchem@halfbond}
+ \protect\raisebox{-.4ex}{\sbond}
+ }
+ { ... } { {\cdot}{\cdot}{\cdot} }
+ { .... } { {\cdot}{\cdot}{\cdot}{\cdot} }
+ { -> } { {\rightarrow} }
+ { <- } { {\leftarrow} }
+ }
+ {
+ %todo Tilde is not a space anymore, here
+ \PackageError{mhchem}{Unknown~bond~type~in~\string\bond~(#1)}%
+ }
+ }
+\ExplSyntaxOff % end of Expl with tilde
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% loop helpers %%%%%%%%%%
@@ -2407,15 +2415,29 @@
%%%%%%%%%%%%%%%%%%%%%
\cs_new_protected:Npn \__mhchem_chemfive:nnnnnn #1#2#3#4#5#6
{
- \mhchem@prepostscript%
- {\mhchem@mathOrText{\smash[t]{2+}}}%
- {\mhchem@mathOrText{\smash[t]{2}}}%
- {\mhchem@mathOrText{#1}}%
- {\mhchem@mathOrText{#2}}%
- {\mhchem@mathOrText@ii{\mhchem@option@mathFont{#3}}{\text{#3}}}%
- {\mhchem@mathOrText{#4}}%
- {\mhchem@mathOrText{#5}}%
- {\mhchem@mathOrText{#6}}%
+ \str_if_eq:VnTF \mhchem@option@superscriptstacked { true }
+ {
+ \mhchem@prepostscript%
+ {\mhchem@mathOrText{\smash[t]{2+}}}%
+ {\mhchem@mathOrText{\smash[t]{2}}}%
+ {\mhchem@mathOrText{#1}}%
+ {\mhchem@mathOrText{#2}}%
+ {\mhchem@mathOrText@ii{\mhchem@option@mathFont{#3}}{\text{#3}}}%
+ {\mhchem@mathOrText{#4#6}}%
+ {\mhchem@mathOrText{#5}}%
+ {}%
+ }
+ {
+ \mhchem@prepostscript%
+ {\mhchem@mathOrText{\smash[t]{2+}}}%
+ {\mhchem@mathOrText{\smash[t]{2}}}%
+ {\mhchem@mathOrText{#1}}%
+ {\mhchem@mathOrText{#2}}%
+ {\mhchem@mathOrText@ii{\mhchem@option@mathFont{#3}}{\text{#3}}}%
+ {\mhchem@mathOrText{#4}}%
+ {\mhchem@mathOrText{#5}}%
+ {\mhchem@mathOrText{#6}}%
+ }
}
\ExplSyntaxOff
@@ -2570,6 +2592,9 @@
\def\mhchem@option@textcdot{\cdot}
\define@key{mhchem}{textcdot}{\def\mhchem@option@textcdot{#1}}
+\def\mhchem@option@superscriptstacked{0}
+\define@key{mhchem}{superscriptstacked}[true]{\def\mhchem@option@superscriptstacked{#1}}%
+
%%% begin: standard keyval handling as in many other packages
\def\ProcessOptionsWithKV#1{%
\let\@tempc\relax%