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.tex29
1 files changed, 23 insertions, 6 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 ccc506e8c23..373634815c1 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
@@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-% Copyright 2011-2015 Clemens Niederberger
+% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -25,7 +25,7 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
-\ChemModule{particles}{2015/07/15 particles}
+\ChemModule{particles}{2016/01/13 particles}
\chemmacros_load_modules:n {charges,chemformula}
@@ -49,6 +49,16 @@
\bool_new:N \l__chemmacros_nucleophile_elpair_bool
\bool_new:N \l__chemmacros_elpair_dots_bool
+\ChemCompatibilityFrom{5.3}
+\dim_new:N \l__chemmacros_nucleophile_dim
+\dim_set:Nn \l__chemmacros_nucleophile_dim { .1em }
+
+\keys_define:nn {chemmacros/particles}
+ {
+ space .dim_set:N = \l__chemmacros_nucleophile_dim
+ }
+\EndChemCompatibility
+
\keys_define:nn {chemmacros/particles}
{
elpair .choice: ,
@@ -72,7 +82,12 @@
\cs_set_protected:cpn {__chemmacros_ \chemmacros_remove_backslash:N #1:}
{
\bool_if:NTF \l__chemmacros_nucleophile_elpair_bool
- { \chemmacros_elpair:n { #2 } \chemmacros_chemformula:n { {}^{-} } }
+ {
+ \chemmacros_elpair:n { #2 }
+ \chemmacros_if_compatiblity:nnT {>=} {5.3}
+ { \skip_horizontal:N \l__chemmacros_nucleophile_dim }
+ \chemmacros_chemformula:n { {}^{-} }
+ }
{ \chemmacros_chemformula:n { #2- } }
}
\DeclareDocumentCommand #1 {o}
@@ -98,9 +113,9 @@
% ions, molecules
% proton, hydroxide, hydronium/oxonium, water:
-\NewChemParticle \Hpl { H+ }
-\NewChemParticle \Hyd { OH- }
-\NewChemParticle \Oxo { H3O+ }
+\NewChemParticle \Hpl { H+ }
+\NewChemParticle \Hyd { OH- }
+\NewChemParticle \Oxo { H3O+ }
\NewChemParticle \water { H2O }
% electrophile:
@@ -116,3 +131,5 @@
\EndChemCompatibility
% --------------------------------------------------------------------------
+\tex_endinput:D
+2016/01/13 - new option particles/space