summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-03-21 23:03:32 +0000
committerKarl Berry <karl@freefriends.org>2014-03-21 23:03:32 +0000
commit75be5262a5f80a24cf575c485d368b188d8da97d (patch)
tree6e246aa46f34cfa4701a4ab1b90ecc143a65a217 /Master
parent92d905be3ae707fa5be86dc2700f7f37465fd0f6 (diff)
mhchem (21mar14)
git-svn-id: svn://tug.org/texlive/trunk@33255 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/README4
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/mhchem.pdfbin200638 -> 200831 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mhchem/mhchem.tex8
-rw-r--r--Master/texmf-dist/tex/latex/mhchem/mhchem.sty68
4 files changed, 68 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/latex/mhchem/README b/Master/texmf-dist/doc/latex/mhchem/README
index 459a989f95d..3266f80279b 100644
--- a/Master/texmf-dist/doc/latex/mhchem/README
+++ b/Master/texmf-dist/doc/latex/mhchem/README
@@ -1,7 +1,7 @@
-The mhchem Bundle 2014-02-01
+The mhchem Bundle 2014-03-20
containing
-- mhchem v3.15
+- mhchem v3.16
- hpstatement v1.00
- rsphrase v3.11
diff --git a/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf b/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf
index 80bf7eaa935..6633ea7559c 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 970ec7f0603..30448a88f6e 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.15,\\% check
+ mhchem v3.16,\\% check
hpstatement v1.01 and\\
rsphrase v3.11}%
}
@@ -813,6 +813,12 @@ Meaning and usage of \macro{bond} changed.
\section{Most Recent Changes}% check
+\minisec{2014-03-20 mhchem v3.16}
+\begin{compactitem}
+\item fix: \verb|\bond| not expanded too early -- thanks to Heiko Oberdiek
+\item fix: \verb|\cee| understands \verb|\\[10pt]| -- thanks to David Carlisle
+\end{compactitem}
+
\minisec{2014-02-01 mhchem v3.15}
\begin{compactitem}
\item follow the IUPAC Red Book more closely (staggered superscripts, \ce{NO3-})
diff --git a/Master/texmf-dist/tex/latex/mhchem/mhchem.sty b/Master/texmf-dist/tex/latex/mhchem/mhchem.sty
index 949bd97f148..8b90f9713f0 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}[2014/02/01 v3.15 for typesetting chemical formulae]
+\ProvidesPackage{mhchem}[2014/03/20 v3.16 for typesetting chemical formulae]
\RequirePackage{ifthen}
\RequirePackage{calc}[1998/07/07]
\RequirePackage{twoopt}
@@ -65,9 +65,14 @@
\else%
\mhchem@cee@ii#1&\mhchem@END\mhchem@ENDEND%
\g@addto@macro\mhchem@ce@out{\\}%
- \mhchem@cee@i#2#3\mhchem@ENDEND%
+ \@ifnextchar[%
+ \mhchem@cee@optArg%
+ \mhchem@cee@i#2#3\mhchem@ENDEND%
\fi%
}
+\def\mhchem@cee@optArg[#1]{%
+ \g@addto@macro\mhchem@ce@out{[#1]}\mhchem@cee@i%
+}
\long\def\mhchem@cee@ii#1&#2#3\mhchem@ENDEND{%
\ifx\mhchem@END#2%
@@ -91,7 +96,51 @@
%%%%%%%%%% \ce %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\DeclareRobustCommand\ce[1]{\mhchem@ce{#1}}
+
+%%% \/ %%% Prevent argument from expanding when written to .aux
+%%%%%%%%%% Solution by Heiko Oberdiek
+%%%%%%%%%% http://tex.stackexchange.com/questions/160306/prevent-caption-from-expanding-argument-too-early
+\newcommand*{\ce}{%
+ \ifx\protect\@typeset@protect
+ \csname ce \expandafter\endcsname
+ \else
+ \ifx\protect\@unexpandable@protect
+ \protect@unexpand@cmd@arg\aaaa
+ \else
+ \ifx\protect\string
+ \protect@string@cmd@arg\aaaa
+ \else
+ \expandafter\protect@unknown@cmd@arg
+ \csname aaaa \endcsname
+ \fi
+ \fi
+ \fi
+}
+\expandafter\newcommand\csname ce \endcsname[1]{%
+ \mhchem@ce{#1}%
+}
+% unexpanded protect
+\def\protect@unexpand@cmd@arg#1\else#2\fi\fi\fi#3{%
+ \fi\fi
+ \ifx\thepage\relax
+ \detokenize
+ \else
+ \unexpanded
+ \fi
+ {#1{#3}}%
+}
+% display protect
+\def\protect@string@cmd@arg#1\else#2\fi\fi\fi#3{%
+ \fi\fi\fi
+ \detokenize{#1{#3}}%
+}
+% unknown protect
+\def\protect@unknown@cmd@arg#1\fi\fi\fi{%
+ \fi\fi\fi
+ \protect#1%
+}
+%%%%%%%%%%
+%%% /\ %%%
\edef\mhchem@char@lbrace{\string{} %}
\begingroup%
@@ -476,7 +525,7 @@
}{}}}%
\renewcommandtwoopt*\mhchem@arrow@equilibriumRightM[2][][]{%
\ensuremath{{}\mathrel{%
- \@ifempty{##1}{% if only above, center optically; if above AND below, center exactly to avoid misalignment
+ \@ifempty{##1}{%
\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@}$}}%
@@ -530,7 +579,7 @@
}{}}}%
\renewcommandtwoopt*\mhchem@arrow@equilibriumRightM[2][][]{%
\ensuremath{{}\mathrel{%
- \@ifempty{##1}{% if only above, center optically; if above AND below, center exactly to avoid misalignment
+ \@ifempty{##1}{%
\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}$}}%
@@ -915,10 +964,10 @@
\ifnum 2=\mhchem@option@version%
\let\bond\sbond%
\else\ifnum 2<\mhchem@option@version%
- \DeclareRobustCommand*\bond{\mhchem@bond}%
+ \def\bond{\mhchem@bond}%
\fi\fi%
- \DeclareRobustCommand\dbond{\rlap{\protect\raisebox{.2ex}{\sbond}}\protect\raisebox{-.2ex}{\sbond}}%
- \DeclareRobustCommand\tbond{\rlap{\protect\raisebox{.4ex}{\sbond}}%
+ \def\dbond{\rlap{\protect\raisebox{.2ex}{\sbond}}\protect\raisebox{-.2ex}{\sbond}}%
+ \def\tbond{\rlap{\protect\raisebox{.4ex}{\sbond}}%
\rlap{\sbond}\protect\raisebox{-.4ex}{\sbond}}%
\def\hyphen{\mhchem@hyphen}%
\bool_if:NF \__mhchem_cf_cfActive_bool
@@ -1816,7 +1865,8 @@
{ 1 }
{
\tl_put_right:Nx \__mhchem_cf_result_tl
- { \exp_not:N \mhchem@mathOrText { \exp_not:N \mhchem@cf@frac \exp_not:V \__mhchem_cf_element_tl / \exp_not:N \mhchem@END { \mhchem@option@skipAfterFracAmount } } } }
+ { \exp_not:N \mhchem@mathOrText { \exp_not:N \mhchem@cf@frac \exp_not:V \__mhchem_cf_element_tl / \exp_not:N \mhchem@END { \mhchem@option@skipAfterFracAmount } } }
+ }
{ 9 }
{
\tl_put_right:Nx \__mhchem_cf_result_tl