summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex')
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex28
1 files changed, 18 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex
index a373a0f58d8..fc07911ccc7 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex
@@ -25,14 +25,21 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
-\ChemModule{particles}{2016/01/13 particles}
+\ChemModule{particles}{2016/04/02 particles}
\chemmacros_load_modules:n {charges,chemformula}
% --------------------------------------------------------------------------
% particles
\cs_new_protected:Nn \chemmacros_define_particle:Nn
- { \cs_set_protected:Npn #1 { \chemmacros_chemformula:n {#2} } }
+ {
+ \tl_set_rescan:Nnn \l__chemmacros_tmpa_tl { \ExplSyntaxOff } {#2}
+ \use:x
+ {
+ \cs_set_protected:Npn \exp_not:N #1
+ { \chemmacros_chemformula:n { \exp_not:V \l__chemmacros_tmpa_tl } }
+ }
+ }
\NewChemMacroset {Particle} {mm}
{ \chemmacros_define_particle:Nn #1 {#2} }
@@ -88,7 +95,7 @@
{ \skip_horizontal:N \l__chemmacros_nucleophile_dim }
\chemmacros_chemformula:n { {}^{-} }
}
- { \chemmacros_chemformula:n { #2- } }
+ { \chemmacros_chemformula:n { #2^{-} } }
}
\DeclareDocumentCommand #1 {o}
{
@@ -105,19 +112,19 @@
% --------------------------------------------------------------------------
% particles:
-\NewChemParticle \el { e- }
-\NewChemParticle \prt { p+ }
+\NewChemParticle \el { e^- }
+\NewChemParticle \prt { p^+ }
\NewChemParticle \ntr { n^0 }
% ions, molecules
% proton, hydroxide, hydronium/oxonium, water:
-\NewChemParticle \Hpl { H+ }
-\NewChemParticle \Hyd { OH- }
-\NewChemParticle \Oxo { H3O+ }
-\NewChemParticle \water { H2O }
+\NewChemParticle \Hpl { H^+ }
+\NewChemParticle \Hyd { OH^- }
+\NewChemParticle \Oxo { H_3O^+ }
+\NewChemParticle \water { H_2O }
% electrophile:
-\NewChemParticle \El { E+ }
+\NewChemParticle \El { E^+ }
% nucleophiles:
\NewChemNucleophile \Nuc {Nu}
@@ -131,3 +138,4 @@
% --------------------------------------------------------------------------
\tex_endinput:D
2016/01/13 - new option particles/space
+2016/04/02 - adapt to formula methods `chemist' and `chemfig'