From a5040429be9a2dfac01a8086da6a684b31d7e388 Mon Sep 17 00:00:00 2001 From: Clemens Niederberger Date: Thu, 3 Mar 2022 19:06:58 +0100 Subject: [PATCH] fix issue #49 --- code/chemmacros.lang.code.tex | 1 + code/chemmacros.phases.code.tex | 2 +- code/chemmacros.sty | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/chemmacros.lang.code.tex b/code/chemmacros.lang.code.tex index 65d2b90..b37fec6 100644 --- a/code/chemmacros.lang.code.tex +++ b/code/chemmacros.lang.code.tex @@ -92,6 +92,7 @@ {#3} \prop_gput:Nnn \g_chemmacros_translations_prop {#1(#2)} {#3} } +\cs_generate_variant:Nn \chemmacros_declare_translation:nnn {V} % #1: key % #2: csv list: { = , = } diff --git a/code/chemmacros.phases.code.tex b/code/chemmacros.phases.code.tex index 9112d54..5174910 100644 --- a/code/chemmacros.phases.code.tex +++ b/code/chemmacros.phases.code.tex @@ -38,7 +38,7 @@ { \mode_leave_vertical: \bool_if:NTF \l__chemmacros_phases_sub_bool - { \chemmacros_formula:n { {}_{(#1)} } } + { \ensuremath { \c_math_subscript_token { \chemmacros_text:n { (#1) } } } } { \skip_horizontal:N \l__chemmacros_phases_space_dim \chemmacros_text:n { (#1) } diff --git a/code/chemmacros.sty b/code/chemmacros.sty index df085d2..1bb6c30 100644 --- a/code/chemmacros.sty +++ b/code/chemmacros.sty @@ -1132,6 +1132,7 @@ {#3} \prop_gput:Nnn \g_chemmacros_translations_prop {#1(#2)} {#3} } +\cs_generate_variant:Nn \chemmacros_declare_translation:nnn {V} % #1: key % #2: csv list: { = , = } @@ -1858,7 +1859,7 @@ { \mode_leave_vertical: \bool_if:NTF \l__chemmacros_phases_sub_bool - { \chemmacros_formula:n { {}_{(#1)} } } + { \ensuremath { \c_math_subscript_token { \chemmacros_text:n { (#1) } } } } { \skip_horizontal:N \l__chemmacros_phases_space_dim \chemmacros_text:n { (#1) }