From 8abada29009890b3f73568d9bcefffbdacaaf0a0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 25 Jun 2018 20:56:15 +0000 Subject: mhchem (25jun18) git-svn-id: svn://tug.org/texlive/trunk@48088 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/mhchem/README | 6 ++-- Master/texmf-dist/doc/latex/mhchem/mhchem.pdf | Bin 440134 -> 270500 bytes Master/texmf-dist/doc/latex/mhchem/mhchem.tex | 11 +++++-- Master/texmf-dist/tex/latex/mhchem/mhchem.sty | 45 ++++++++++++-------------- 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/Master/texmf-dist/doc/latex/mhchem/README b/Master/texmf-dist/doc/latex/mhchem/README index e44cc204ebf..410e80eb3cb 100644 --- a/Master/texmf-dist/doc/latex/mhchem/README +++ b/Master/texmf-dist/doc/latex/mhchem/README @@ -1,7 +1,7 @@ -The mhchem Bundle 2017-07-24 +The mhchem Bundle 2018-06-22 containing -- mhchem v4.07 +- mhchem v4.08 - hpstatement v1.02 - rsphrase v3.11 @@ -17,7 +17,7 @@ Risk and Safety (R and S) Phrases that are used to label chemicals. -Copyright 2004-2017 Martin Hensel +Copyright 2004-2018 Martin Hensel This work may be distributed and/or modified under the conditions of the LaTeX Project Public License version 1.3c diff --git a/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf b/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf index 30d21584fa4..f2b900e2875 100644 Binary files a/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf and b/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf differ diff --git a/Master/texmf-dist/doc/latex/mhchem/mhchem.tex b/Master/texmf-dist/doc/latex/mhchem/mhchem.tex index 4c0303ef2d8..7e6f2e5bfbf 100644 --- a/Master/texmf-dist/doc/latex/mhchem/mhchem.tex +++ b/Master/texmf-dist/doc/latex/mhchem/mhchem.tex @@ -1,5 +1,5 @@ %% mhchem.tex -%% Copyright 2004-2017 Martin Hensel +%% Copyright 2004-2018 Martin Hensel % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License version 1.3c @@ -67,7 +67,7 @@ The mhchem Bundle\\[0.3em] \Large\textmd{% Documentation for the \LaTeX{} Packages\\ - mhchem v4.07,\\% check + mhchem v4.08,\\% check hpstatement v1.02 and\\ rsphrase v3.11}% } @@ -76,7 +76,7 @@ mhchem\makebox[0pt][l]{\textcolor{white}{NOSPAM}}@MartinHensel\makebox[1pt][l]{\textcolor{white}{.}}.de% } \date{% - 2017-07-24% check + 2018-06-22% check } \maketitle @@ -899,6 +899,11 @@ Meaning and usage of \macro{bond} changed. \section{Most Recent Changes}% check +\minisec{2018-06-22 mhchem v4.08} +\begin{compactitem} +\item Work around unicode-math incompatibilities +\end{compactitem} + \minisec{2017-07-24 mhchem v4.07} \begin{compactitem} \item Adapt to \LaTeX3 (expl3) changes diff --git a/Master/texmf-dist/tex/latex/mhchem/mhchem.sty b/Master/texmf-dist/tex/latex/mhchem/mhchem.sty index 227372cdca1..594b5e6d0e6 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-2017 Martin Hensel +%% Copyright 2004-2018 Martin Hensel % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License version 1.3c @@ -27,7 +27,7 @@ % This work consists of all files listed in manifest.txt. % % -\ProvidesPackage{mhchem}[2017/07/24 v4.07 for typesetting chemical formulae] +\ProvidesPackage{mhchem}[2018/06/22 v4.08 for typesetting chemical formulae] \RequirePackage{expl3} \RequirePackage{l3keys2e} \RequirePackage{calc}[1998/07/07] @@ -2335,7 +2335,7 @@ \l__mhchem_regex_bracedGroup_fregex {#1} { - \__mhchem_output_escapeFromMathToItalicMath:n {#1} + \__mhchem_output_escapeToItalicMath:n {#1} } % else { @@ -2346,10 +2346,11 @@ \group_begin: \bool_if:NTF \l__mhchem_output_isMathMode_bool { - \thinmuskip=0mu - \medmuskip=0mu - \thickmuskip=0mu - \__mhchem_output_escapeFromMathToItalicMath:n {#1} + \text { \ensuremath + { + \thinmuskip=0mu \medmuskip=0mu \thickmuskip=0mu + \__mhchem_output_escapeFromMathToItalicMath:n {#1} + } } } { \tl_set:Nn \l__mhchem_cg_withinMathTokens_tmpa_tl { #1 } @@ -2370,9 +2371,7 @@ \group_end: } { - \bool_if:NTF \l__mhchem_output_isMathMode_bool - { \__mhchem_output_escapeFromMathToItalicMath:n {#1} } - { \__mhchem_output_escapeFromTextToItalicMath:n {#1} } + \__mhchem_output_escapeToItalicMath:n {#1} } } } @@ -2486,7 +2485,7 @@ { \regex_replace_all:NnN \l__mhchem_regex_oneLowercaseLetter_regex - { \c{__mhchem_output_withFont:n}\cB[ \c{__mhchem_cg_itshape:n}\cB[ \0 \cE]\cE] } + { \c{__mhchem_cg_itshape:n}\cB[ \0 \cE] } #1 \regex_replace_all:NnN \l__mhchem_regex_hyphen_regex @@ -2938,19 +2937,13 @@ { \bool_if:NTF \l__mhchem_output_isMathMode_bool { \__mhchem_output_escapeFromMathToItalicMath:n {#1} } - { \__mhchem_output_escapeFromTextToItalicMath:n {#1} } + { \ensuremath { \mhchem@hook@beforeItalicMath #1 } } } \cs_new_protected:Npn \__mhchem_output_escapeFromMathToItalicMath:n #1 { - \text { \__mhchem_output_escapeFromTextToItalicMath:n {#1} } - } -\cs_new_protected:Npn \__mhchem_output_escapeFromTextToItalicMath:n #1 - { - \ensuremath - { - \mhchem@hook@beforeItalicMath - #1 - } + \bool_if:NTF \l__mhchem_option_unicodemath_bool + { \text { \ensuremath { \symit { \mhchem@hook@beforeItalicMath #1 } } } } + { \text { \ensuremath { \mhchem@hook@beforeItalicMath #1 } } } } \cs_new_protected:Npn \__mhchem_output_skipAfterAmount: @@ -3022,9 +3015,9 @@ { \smash{\raisebox{-0.4em}{\scalebox{1.3}{*}}} } } \cs_new_protected:Npn \__mhchem_output_commaDecimal: - { \__mhchem_output_withFont:n { , } } + { \__mhchem_output_withFont:n { {,} } } \cs_new_protected:Npn \__mhchem_output_commaEnumeration: - { \__mhchem_output_withFont:n { , } \ensuremath { \mkern3mu } } + { \__mhchem_output_withFont:n { {,} } \ensuremath { \mkern3mu } } \cs_new_protected:Npn \__mhchem_output_commaAuto: { \__mhchem_regex_peek:NTF \l__mhchem_regex_digit_pregex @@ -3032,7 +3025,7 @@ { \__mhchem_output_commaEnumeration: } } \cs_new_protected:Npn \__mhchem_output_commaEnumerationSmall: - { \__mhchem_output_withFont:n { , } \ensuremath { \mkern1mu } } + { \__mhchem_output_withFont:n { {,} } \ensuremath { \mkern1mu } } \cs_new_protected:Npn \__mhchem_output_commaAutoSmall: { \__mhchem_regex_peek:NTF \l__mhchem_regex_digit_pregex @@ -3402,6 +3395,7 @@ { \mhchemoptions{layout=staggered-flat} } } +\bool_new:N \l__mhchem_option_unicodemath_bool \AtBeginDocument { \bool_if:nF \l__mhchem_option_textgreekSelectedByUser_bool @@ -3412,6 +3406,9 @@ { \chemgreek_declare_mapping_alias:nn { mhchem-math } { \l_chemgreek_active_mapping_tl } } + \@ifpackageloaded {unicode-math} + { \bool_set_true:N \l__mhchem_option_unicodemath_bool } + { \bool_set_false:N \l__mhchem_option_unicodemath_bool } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- cgit v1.2.3