From 18db07516cb661b09e6076a35df5b0e5ae6c4044 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 8 Mar 2020 21:54:09 +0000 Subject: chemmacros (8mar20) git-svn-id: svn://tug.org/texlive/trunk@54183 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/chemmacros/chemmacros-manual.cls | 1 + .../chemmacros.module.chemformula.code.tex | 3 +++ .../chemmacros.module.nomenclature.code.tex | 4 ++++ .../chemmacros/chemmacros.module.redox.code.tex | 27 ++++++++++++++++++++-- .../texmf-dist/tex/latex/chemmacros/chemmacros.sty | 4 ++-- 5 files changed, 35 insertions(+), 4 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros-manual.cls b/Master/texmf-dist/tex/latex/chemmacros/chemmacros-manual.cls index 179e588d55b..43ed3897099 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros-manual.cls +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros-manual.cls @@ -378,5 +378,6 @@ \chemmacros@add@version{2019-11-17}{5.9} \chemmacros@add@version{2020-01-16}{5.9a} \chemmacros@add@version{2020-02-03}{5.10} +\chemmacros@add@version{2020-03-07}{5.11} \endinput diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.chemformula.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.chemformula.code.tex index 7bc4be0b0ac..c2fb135a7b6 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.chemformula.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.chemformula.code.tex @@ -238,3 +238,6 @@ if the users haven't decided for themselves and issue a warning 2016/05/03 - correct wrong method check 2020/02/02 - lazy boolean evaluation +2020/02/29 - use \ch even for simple formulas – resolves issue #28 +2020/03/02 - undo last change: this makes problems with oxidation numbers in a + reaction diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex index 3e5b6b616d2..0b9bbf64b84 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex @@ -711,6 +711,8 @@ { \group_begin: \bool_set_true:N \l__chemmacros_inside_iupac_bool + \chemmacros_if_compatibility:nnT {>} {5.10} + { \bool_set_true:N \l__chemmacros_in_document_bool } \chemmacros_set_keys:nn {nomenclature} {#1} \chemmacros_make_iupac: \chemmacros_make_shorthands: @@ -972,3 +974,5 @@ it does nothing as last token in \iupac 2020/01/02 - \chemmacros_show_iupac:N - \chemmacros_if_iupac:NTF +2020/02/29 - let \chemmacros_iupac:nn think we're in the document – fixes + issue #30 diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.redox.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.redox.code.tex index 2c0421b470f..f3f8b29a2d7 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.redox.code.tex +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.redox.code.tex @@ -52,9 +52,20 @@ \bool_new:N \l__chemmacros_ox_top_bool \bool_new:N \l__chemmacros_ox_align_center_bool +\ChemCompatibilityFrom{5.11} +\tl_new:N \l__chemmacros_ox_format_tl +\EndChemCompatibility + \int_new:N \l__chemmacros_ox_number_int \fp_new:N \l__chemmacros_ox_number_fp +\cs_new_protected:Npn \__chemmacros_ox_format:n #1 + { + \chemmacros_if_compatibility:nnTF {>=} {5.11} + { { \l__chemmacros_ox_format_tl {#1} } } + { \use:n {#1} } + } + \cs_new_protected:Npn \__chemmacros_ox_process_number:n #1 { \bool_if:NTF \l__chemmacros_ox_parse_bool @@ -180,7 +191,10 @@ \hbox_set:Nn \l__chemmacros_tmpa_box { \chemmacros_text:n - { \relsize {-3} \__chemmacros_ox_process_number:n {#1} } + { + \__chemmacros_ox_format:n + { \relsize {-3} \__chemmacros_ox_process_number:n {#1} } + } } \hbox_set:Nn \l__chemmacros_tmpb_box { \chemmacros_chemformula:n {#2} } \chemmacros_math:n @@ -196,7 +210,10 @@ { \box_use:N \l__chemmacros_tmpb_box \tl_use:N \l__chemmacros_ox_side_connect_tl - ( \__chemmacros_ox_process_number:n {#1} ) + ( + \__chemmacros_ox_format:n + { \__chemmacros_ox_process_number:n {#1} } + ) } } \bool_if:NT \l__chemmacros_ox_top_bool @@ -285,6 +302,11 @@ } \EndChemCompatibility +\ChemCompatibilityFrom{5.11} +\chemmacros_define_keys:nn {redox} + { format .tl_set:N = \l__chemmacros_ox_format_tl } +\EndChemCompatibility + % \ox[]{,} % \ox*[]{,} => always number on the top \cs_new_protected:Npn \chemmacros_ox:nnnn #1#2#3#4 @@ -433,3 +455,4 @@ 2015/09/30 - new option `explicit-zero-sign' 2020/02/02 - lazy boolean evaluation - prefer \legacy_if:nTF over \chemmacros_if_tex:nnTF +2020/03/02 - add option redox/format diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty index ca76b8ab2cb..f994ff62712 100644 --- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty +++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty @@ -31,9 +31,9 @@ % -------------------------------------------------------------------------- % package information: -\tl_const:Nn \c_chemmacros_date_tl {2020/02/03} +\tl_const:Nn \c_chemmacros_date_tl {2020/03/07} \tl_const:Nn \c_chemmacros_version_major_number_tl {5} -\tl_const:Nn \c_chemmacros_version_minor_number_tl {10} +\tl_const:Nn \c_chemmacros_version_minor_number_tl {11} \tl_const:Nn \c_chemmacros_version_subrelease_tl {} \tl_const:Nx \c_chemmacros_version_number_tl { -- cgit v1.2.3