texlive[48088] Master/texmf-dist: mhchem (25jun18)

commits+karl at tug.org commits+karl at tug.org
Mon Jun 25 22:56:15 CEST 2018


Revision: 48088
          http://tug.org/svn/texlive?view=revision&revision=48088
Author:   karl
Date:     2018-06-25 22:56:15 +0200 (Mon, 25 Jun 2018)
Log Message:
-----------
mhchem (25jun18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/mhchem/README
    trunk/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf
    trunk/Master/texmf-dist/doc/latex/mhchem/mhchem.tex
    trunk/Master/texmf-dist/tex/latex/mhchem/mhchem.sty

Modified: trunk/Master/texmf-dist/doc/latex/mhchem/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mhchem/README	2018-06-25 20:56:02 UTC (rev 48087)
+++ trunk/Master/texmf-dist/doc/latex/mhchem/README	2018-06-25 20:56:15 UTC (rev 48088)
@@ -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 @@
 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

Modified: trunk/Master/texmf-dist/doc/latex/mhchem/mhchem.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/mhchem/mhchem.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mhchem/mhchem.tex	2018-06-25 20:56:02 UTC (rev 48087)
+++ trunk/Master/texmf-dist/doc/latex/mhchem/mhchem.tex	2018-06-25 20:56:15 UTC (rev 48088)
@@ -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 @@
 
 \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

Modified: trunk/Master/texmf-dist/tex/latex/mhchem/mhchem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mhchem/mhchem.sty	2018-06-25 20:56:02 UTC (rev 48087)
+++ trunk/Master/texmf-dist/tex/latex/mhchem/mhchem.sty	2018-06-25 20:56:15 UTC (rev 48088)
@@ -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,20 +2937,14 @@
   {
     \bool_if:NTF \l__mhchem_output_isMathMode_bool
       { \__mhchem_output_escapeFromMathToItalicMath:n {#1} }
-      { \__mhchem_output_escapeFromTextToItalicMath:n {#1} }
+      { \ensuremath { \mhchem at hook@beforeItalicMath #1 } }
   }
 \cs_new_protected:Npn \__mhchem_output_escapeFromMathToItalicMath:n #1
   {
-    \text { \__mhchem_output_escapeFromTextToItalicMath:n {#1} }
+    \bool_if:NTF \l__mhchem_option_unicodemath_bool
+      { \text { \ensuremath { \symit { \mhchem at hook@beforeItalicMath #1 } } } }
+      { \text { \ensuremath {          \mhchem at hook@beforeItalicMath #1 } } }
   }
-\cs_new_protected:Npn \__mhchem_output_escapeFromTextToItalicMath:n #1
-  {
-    \ensuremath
-      {
-        \mhchem at 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 }
   }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the tex-live-commits mailing list