summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemmacros
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemmacros')
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.acid-base.code.tex6
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.all.code.tex9
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex26
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.charges.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.chemformula.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.errorcheck.code.tex6
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.greek.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.isotopes.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.lang.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.mechanisms.code.tex6
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.newman.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.nomenclature.code.tex10
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.orbital.code.tex34
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.particles.code.tex6
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.phases.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.polymers.code.tex166
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex8
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.redox.code.tex8
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.spectroscopy.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.thermodynamics.code.tex15
-rw-r--r--Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty5
21 files changed, 264 insertions, 65 deletions
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.acid-base.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.acid-base.code.tex
index 97e9e05750c..2bb4a557d6e 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.acid-base.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.acid-base.code.tex
@@ -60,7 +60,7 @@
\cs_new_protected:Npn #1 {}
\prop_put:Nnn \l__chemmacros_eq_constants_prop {#1} {#2}
\tl_new:c {l__chemmacros_#2_tl}
- \keys_define:nn {chemmacros/acid-base}
+ \chemmacros_define_keys:nn {acid-base}
{ #2 .tl_set:c = l__chemmacros_#2_tl }
}
\tl_set:cn
@@ -90,11 +90,11 @@
\chemmacros_if_compatiblity:nnT {>=} {5.4}
{
- \keys_define:nn {chemmacros/acid-base}
+ \chemmacros_define_keys:nn {acid-base}
{ eq-constant .tl_set:N = \l__chemmacros_equilibrium_constant_tl }
}
-\keys_define:nn {chemmacros/acid-base}
+\chemmacros_define_keys:nn {acid-base}
{
p-style .choice: ,
p-style / slanted .code:n = \cs_set_eq:NN \chemmacros_p_style:n \textsl ,
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.all.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.all.code.tex
index b90b5ee39ae..89bec822113 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.all.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.all.code.tex
@@ -25,15 +25,16 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
-\ChemModule{all}{2015/10/14 load all libraries}
+\ChemModule{all}{2016/03/07 load all libraries}
\msg_new:nnn {chemmacros} {all-modules}
{
You~ are~ loading~ *all*~ of~ chemmacros'~ module~ through~ the~ `all'~
module!~ This~ is~ fine~ but~ not~ really~ encouraged.~ Do~ really~ need~
all~ of~ `isotopes' ,~ `mechanisms' ,~ `newman' ,~ `nomenclature' ,~
- `orbital' ,~ `particles' ,~ `phases' ,~ `reactions' ,~ `redox' ,~ `scheme'
- ,~ `spectroscopy' ,~ `symbols' ,~ `thermodynamics' ,~ `units' ...?
+ `orbital' ,~ `particles' ,~ `phases' ,~ `polymers' ,~ `reactions' ,~
+ `redox' ,~ `scheme' ,~ `spectroscopy' ,~ `symbols' ,~ `thermodynamics' ,~
+ `units' ...?
}
\chemmacros_load_modules:n
@@ -53,6 +54,7 @@
orbital ,
particles ,
phases ,
+ polymers ,
reactions ,
redox ,
scheme ,
@@ -70,3 +72,4 @@
2015/10/14 - add info message discouraging the usage of this module
- add `errorcheck' module
+2016/03/07 - add `polymer' module
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex
index 1f20afb1e25..1cfdfaf7a30 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex
@@ -151,6 +151,27 @@
}
% --------------------------------------------------------------------------
+\cs_new_protected:Npn \chemmacros_define_keys:nn #1#2
+ { \keys_define:nn {chemmacros/#1} {#2} }
+\cs_generate_variant:Nn \chemmacros_define_keys:nn {x}
+
+\cs_new_protected:Npn \chemmacros_set_keys:nn #1#2
+ { \keys_set:nn {chemmacros/#1} {#2} }
+\cs_generate_variant:Nn \chemmacros_set_keys:nn {x,nx}
+
+\cs_new_protected:Npn \chemmacros_set_keys_groups:nnn #1#2#3
+ { \keys_set_groups:nnn {chemmacros/#1} {#2} {#3} }
+
+\cs_new_protected:Npn \chemmacros_set_keys_filter:nnn #1#2#3
+ { \keys_set_filter:nnn {chemmacros/#1} {#2} {#3} }
+
+\cs_new_protected:Npn \chemmacros_define_global_keys:n #1
+ { \keys_define:nn {chemmacros} {#1} }
+
+\cs_new_protected:Npn \chemmacros_set_global_keys:n #1
+ { \keys_set:nn {chemmacros} {#1} }
+
+% --------------------------------------------------------------------------
% basic tools:
\cs_new:Npn \chemmacros_remove_backslash:N #1
{ \exp_after:wN \use_none:n \token_to_str:N #1 }
@@ -295,7 +316,7 @@
{ \keys_set:nn {chemmacros/#1} {#2} }
}
-\keys_define:nn {chemmacros}
+\chemmacros_define_global_keys:n
{ modules .code:n = \chemmacros_load_modules:n {#1} }
% --------------------------------------------------------------------------
@@ -316,7 +337,7 @@
{ \RequirePackage {#2} [#3] }
{ \RequirePackage [#1] {#2} [#3] }
}
- \keys_define:nn {chemmacros}
+ \chemmacros_define_global_keys:n
{
#2 .choice: ,
#2 / unknown .code:n =
@@ -337,3 +358,4 @@
\chemmacros_if_document:TF
2015/10/14 - load `errorcheck' module
2016/02/09 - starred version of \NewChemMacroset
+2016/03/07 - \chemmacros_define_keys:nn and friends
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.charges.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.charges.code.tex
index 0ba5fc00519..48bbf1d3a91 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.charges.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.charges.code.tex
@@ -44,7 +44,7 @@
\bool_set_true:N \l__chemmacros_circled_chem_bool
-\keys_define:nn { chemmacros / charges }
+\chemmacros_define_keys:nn {charges}
{
circletype .choice: ,
circletype / math .code:n =
@@ -137,7 +137,7 @@
\cs_new_protected:Npn \fsscrp
{ \ensuremath { \scriptscriptstyle \chemmacros_formal_plus: } }
-\keys_define:nn {chemmacros/charges}
+\chemmacros_define_keys:nn {charges}
{
partial-format .tl_set:N = \l__chemmacros_partial_charge_format_tl
}
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 20e8be12ba9..f9bddf7f04f 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
@@ -107,7 +107,7 @@
\EndChemCompatibility
\ChemCompatibilityFrom{5.1}
-\keys_define:nn {chemmacros}
+\chemmacros_define_global_keys:n
{
formula .choices:nn =
{ chemformula , mhchem }
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.errorcheck.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.errorcheck.code.tex
index 500efe139b9..d6a89e4eb6d 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.errorcheck.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.errorcheck.code.tex
@@ -25,7 +25,7 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
-\ChemModule{errorcheck}{2015/10/14 error checking for unloaded modules}[5.2]
+\ChemModule{errorcheck}{2016/03/08 error checking for unloaded modules}[5.2]
\msg_new:nnn {chemmacros} {undefined}
{ The~ #1~ `#2'~ is~ undefined.~ You~ need~ to~ load~ the~ `#3'~ module. }
@@ -76,6 +76,9 @@
% orbital module
\chemmacros_command_requires_module:Nn \orbital {orbital}
+% polymers module
+\chemmacros_command_requires_module:Nn \makepolymerdelims {polymers}
+
% reactions module
\chemmacros_environment_requires_module:nn {reaction} {reactions}
\chemmacros_environment_requires_module:nn {reaction*} {reactions}
@@ -113,4 +116,5 @@
\tex_endinput:D
2015/10/14 - first version
+2016/03/08 - add `polymers' module
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.greek.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.greek.code.tex
index 6111cd0119e..44143552ef9 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.greek.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.greek.code.tex
@@ -54,7 +54,7 @@
}
% an option for manual selection:
-\keys_define:nn {chemmacros}
+\chemmacros_define_global_keys:n
{
greek .code:n = \chemmacros_choose_chemgreek_mapping:n {#1}
}
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.isotopes.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.isotopes.code.tex
index 4799dfe0c8f..fdb8a62b5ee 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.isotopes.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.isotopes.code.tex
@@ -200,7 +200,7 @@
\bool_new:N \l__chemmacros_isotope_super_bool
\tl_new:N \l__chemmacros_isotope_side_connect_tl
-\keys_define:nn {chemmacros/isotopes}
+\chemmacros_define_keys:nn {isotopes}
{
format .choice: ,
format / super .code:n =
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.lang.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.lang.code.tex
index 0c58394caa6..6872adaf469 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.lang.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.lang.code.tex
@@ -58,7 +58,7 @@
\DeclareExpandableDocumentCommand \ChemTranslate {m}
{ \chemmacros_translate:n {#1} }
-\keys_define:nn {chemmacros}
+\chemmacros_define_global_keys:n
{
language .value_required:n = true ,
language .code:n =
@@ -72,7 +72,7 @@
}
\ChemCompatibilityTo{5.2}
-\keys_define:nn {chemmacros}
+\chemmacros_define_global_keys:n
{
german .meta:n = { language = german } ,
ngerman .meta:n = { language = ngerman }
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.mechanisms.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.mechanisms.code.tex
index db28e0cf05e..83460feb761 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.mechanisms.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.mechanisms.code.tex
@@ -45,7 +45,7 @@
\tl_set:Nn \l__chemmacros_mechanisms_ar_tl { #3 }
}
-\keys_define:nn {chemmacros/mechanisms}
+\chemmacros_define_keys:nn {mechanisms}
{
type .choice: ,
type / .code:n =
@@ -145,8 +145,8 @@
\cs_new_protected:Npn \chemmacros_mechanisms:n #1
{
\tl_if_blank:nTF {#1}
- { \keys_set:nn {chemmacros/mechanisms} { type } }
- { \keys_set:nn {chemmacros/mechanisms} { type = #1 } }
+ { \chemmacros_set_keys:nn {mechanisms} { type } }
+ { \chemmacros_set_keys:nn {mechanisms} { type = #1 } }
\mbox
{
\tl_use:N \l__chemmacros_mechanisms_ar_tl
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.newman.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.newman.code.tex
index 3821f966192..7fbf68463f0 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.newman.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.newman.code.tex
@@ -46,7 +46,7 @@
\bool_new:N \l__chemmacros_newman_tikz_back_bool
-\keys_define:nn { chemmacros / newman }
+\chemmacros_define_keys:nn {newman}
{
ring .tl_set:N = \l__chemmacros_newman_tikz_ring_tl ,
atoms .tl_set:N = \l__chemmacros_newman_tikz_front_tl ,
@@ -65,7 +65,7 @@
\NewDocumentCommand \newman { o d() > { \SplitArgument { 5 } { , } } m }
{
\group_begin:
- \IfNoValueF { #1 } { \keys_set:nn { chemmacros / newman } { #1 } }
+ \IfNoValueF { #1 } { \chemmacros_set_keys:nn {newman} { #1 } }
\IfNoValueTF { #2 }
{ \chemmacros_newman_atoms:nnnnnnn { } #3 }
{ \chemmacros_newman_atoms:nnnnnnn { #2 } #3 }
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 dd10e64107f..431129e7482 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
@@ -220,7 +220,7 @@
\NewDocumentCommand \LetChemIUPAC { mm }
{ \chemmacros_let_iupac:NN #1 #2 }
-\keys_define:nn {chemmacros/nomenclature}
+\chemmacros_define_keys:nn {nomenclature}
{
iupac .choice: ,
iupac / restricted .code:n =
@@ -239,7 +239,7 @@
\dim_new:N \l__chemmacros_cip_kern_dim
\dim_set:Nn \l__chemmacros_cip_kern_dim { .075em }
-\keys_define:nn {chemmacros/nomenclature}
+\chemmacros_define_keys:nn {nomenclature}
{ cip-kern .dim_set:N = \l__chemmacros_cip_kern_dim }
\ChemCompatibilityTo{5.1}
@@ -304,7 +304,7 @@
% coordination chemistry
\bool_new:N \l__chemmacros_bridge_super_bool
-\keys_define:nn { chemmacros / nomenclature }
+\chemmacros_define_keys:nn {nomenclature}
{
bridge-number .choice: ,
bridge-number / sub .code:n =
@@ -388,7 +388,7 @@
\dim_new:N \l__chemmacros_iupac_break_dim
\dim_set:Nn \l__chemmacros_iupac_break_dim { .03em }
-\keys_define:nn { chemmacros / nomenclature }
+\chemmacros_define_keys:nn {nomenclature}
{
hyphen-pre-space .dim_set:N = \l__chemmacros_iupac_hyphen_pre_dim ,
hyphen-post-space .dim_set:N = \l__chemmacros_iupac_hyphen_post_dim ,
@@ -666,7 +666,7 @@
\tl_new:N \l__chemmacros_latin_format_tl
\tl_set:Nn \l__chemmacros_latin_format_tl { \itshape }
-\keys_define:nn { chemmacros / nomenclature }
+\chemmacros_define_keys:nn {nomenclature}
{
latin-format .tl_set:N = \l__chemmacros_latin_format_tl ,
latin-format .initial:n = \textit
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.orbital.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.orbital.code.tex
index 29aa6242541..72622f37f07 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.orbital.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.orbital.code.tex
@@ -114,7 +114,7 @@
\bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
}
-\keys_define:nn { chemmacros / orbital / s }
+\chemmacros_define_keys:nn {orbital/s}
{
phase .choice: ,
phase / + .code:n =
@@ -127,7 +127,7 @@
\cs_new_protected:Npn \__chemmacros_orbital_s_draw:n #1
{
- \keys_set:nn { chemmacros / orbital / s } { #1 }
+ \chemmacros_set_keys:nn {orbital/s} {#1}
\bool_if:NTF \l__chemmacros_orbital_s_phase_bool
{
\tl_if_in:NnTF \l__chemmacros_orbital_s_color_tl { ! }
@@ -163,7 +163,7 @@
\bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
}
-\keys_define:nn { chemmacros / orbital / p }
+\chemmacros_define_keys:nn {orbital/p}
{
phase .choice: ,
phase / + .code:n =
@@ -179,7 +179,7 @@
\cs_new_protected:Npn \__chemmacros_orbital_p_draw:n #1
{
- \keys_set:nn { chemmacros / orbital / p } { #1 }
+ \chemmacros_set_keys:nn {orbital/p} {#1}
\bool_if:NTF \l__chemmacros_orbital_p_phase_bool
{
\tl_if_in:NnTF \l__chemmacros_orbital_p_color_tl { ! }
@@ -259,7 +259,7 @@
\bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
}
-\keys_define:nn { chemmacros / orbital / sp }
+\chemmacros_define_keys:nn {orbital/sp}
{
phase .choice: ,
phase / + .code:n =
@@ -273,7 +273,7 @@
\cs_new_protected:Npn \__chemmacros_orbital_sp_draw:n #1
{
- \keys_set:nn { chemmacros / orbital / sp } { #1 }
+ \chemmacros_set_keys:nn {orbital/sp} {#1}
\bool_if:NTF \l__chemmacros_orbital_sp_phase_bool
{
\tl_if_in:NnTF \l__chemmacros_orbital_sp_color_tl { ! }
@@ -350,7 +350,7 @@
\bool_set_false:N \l__chemmacros_orbital_type_spthree_bool
}
-\keys_define:nn { chemmacros / orbital / sp2 }
+\chemmacros_define_keys:nn {orbital/sp2}
{
phase .choice: ,
phase / + .code:n =
@@ -364,7 +364,7 @@
\cs_new_protected:Npn \__chemmacros_orbital_sptwo_draw:n #1
{
- \keys_set:nn { chemmacros / orbital / sp2 } { #1 }
+ \chemmacros_set_keys:nn {orbital/sp2} {#1}
\bool_if:NTF \l__chemmacros_orbital_sptwo_phase_bool
{
\tl_if_in:NnTF \l__chemmacros_orbital_sptwo_color_tl { ! }
@@ -441,7 +441,7 @@
\bool_set_true:N \l__chemmacros_orbital_type_spthree_bool
}
-\keys_define:nn { chemmacros / orbital / sp3 }
+\chemmacros_define_keys:nn {orbital/sp3}
{
phase .choice: ,
phase / + .code:n =
@@ -455,7 +455,7 @@
\cs_new_protected:Npn \__chemmacros_orbital_spthree_draw:n #1
{
- \keys_set:nn { chemmacros / orbital / sp3 } { #1 }
+ \chemmacros_set_keys:nn {orbital/sp3} {#1}
\bool_if:NTF \l__chemmacros_orbital_spthree_phase_bool
{
\tl_if_in:NnTF \l__chemmacros_orbital_spthree_color_tl { ! }
@@ -523,7 +523,7 @@
% --------------------------------------------------------------------------
% main command
-\keys_define:nn { chemmacros / orbital }
+\chemmacros_define_keys:nn {orbital}
{
overlay .bool_set:N = \l__chemmacros_orbital_overlay_bool ,
overlay .default:n = true ,
@@ -536,7 +536,7 @@
}
}
-\keys_define:nn { chemmacros / orbital / type }
+\chemmacros_define_keys:nn {orbital/type}
{
s .code:n = { \__chemmacros_orbital_type_s: } ,
p .code:n = { \__chemmacros_orbital_type_p: } ,
@@ -559,12 +559,12 @@
{ \__chemmacros_orbital_spthree_draw:n { #1 } }
}
-\NewDocumentCommand \orbital { o m }
+\NewDocumentCommand \orbital {om}
{
\group_begin:
- \keys_set:nn { chemmacros / orbital / type } { #2 }
- \IfNoValueTF { #1 }
- { \chemmacros_orbital:n { } }
- { \chemmacros_orbital:n { #1 } }
+ \chemmacros_set_keys:nn {orbital/type} {#2}
+ \IfNoValueTF {#1}
+ { \chemmacros_orbital:n { } }
+ { \chemmacros_orbital:n {#1} }
\group_end:
}
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 a714cba19a0..a373a0f58d8 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
@@ -53,13 +53,13 @@
\dim_new:N \l__chemmacros_nucleophile_dim
\dim_set:Nn \l__chemmacros_nucleophile_dim { .1em }
-\keys_define:nn {chemmacros/particles}
+\chemmacros_define_keys:nn {particles}
{
space .dim_set:N = \l__chemmacros_nucleophile_dim
}
\EndChemCompatibility
-\keys_define:nn {chemmacros/particles}
+\chemmacros_define_keys:nn {particles}
{
elpair .choice: ,
elpair / false .code:n =
@@ -94,7 +94,7 @@
{
\group_begin:
\IfNoValueF {##1}
- { \keys_set:nn {chemmacros/particles} {##1} }
+ { \chemmacros_set_keys:nn {particles} {##1} }
\use:c {__chemmacros_ \chemmacros_remove_backslash:N #1:}
\group_end:
}
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.phases.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.phases.code.tex
index f97b6491350..f2f9e6f0406 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.phases.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.phases.code.tex
@@ -33,7 +33,7 @@
\dim_new:N \l__chemmacros_phases_space_dim
\dim_set:Nn \l__chemmacros_phases_space_dim { .1333 em }
-\keys_define:nn {chemmacros/phases}
+\chemmacros_define_keys:nn {phases}
{
pos .choice: ,
pos / sub .code:n = \bool_set_true:N \l__chemmacros_phases_sub_bool ,
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.polymers.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.polymers.code.tex
new file mode 100644
index 00000000000..dc304d4ba55
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.polymers.code.tex
@@ -0,0 +1,166 @@
+% --------------------------------------------------------------------------
+%
+% the CHEMMACROS package -- module: `polymers'
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% --------------------------------------------------------------------------
+% https://github.org/cgnieder/chemmacros/
+% contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+% 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
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+\ChemModule{polymers}{2016/03/07 polymers}
+
+\chemmacros_load_modules:n {nomenclature,tikz}
+
+% --------------------------------------------------------------------------
+% copolymers
+\NewChemIUPAC \copolymer { \textit {co} }
+\LetChemIUPAC \co \copolymer
+
+\NewChemIUPAC \statistical { \textit {stat} }
+\LetChemIUPAC \stat \statistical
+
+\NewChemIUPAC \random { \textit {ran} }
+\LetChemIUPAC \ran \random
+
+\NewChemIUPAC \alternating { \textit {alt} }
+\LetChemIUPAC \alt \alternating
+
+\NewChemIUPAC \periodic { \textit {per} }
+\LetChemIUPAC \per \periodic
+
+\NewChemIUPAC \block { \textit {block} }
+\NewChemIUPAC \graft { \textit {graft} }
+
+% --------------------------------------------------------------------------
+% non-linear (co)polymers
+\NewChemIUPAC \blend { \textit {blend} }
+\NewChemIUPAC \comb { \textit {comb} }
+
+\NewChemIUPAC \complex { \textit {compl} }
+\LetChemIUPAC \compl \complex
+
+\NewChemIUPAC \cyclic { \textit {cyclo} }
+\LetChemIUPAC \cyclo \cyclic
+
+\NewChemIUPAC \branch { \textit {branch} }
+\NewChemIUPAC \network { \textit {net} }
+\LetChemIUPAC \net \network
+
+\NewChemIUPAC \ipnetwork { \textit {ipn} }
+\LetChemIUPAC \ipn \ipnetwork
+
+\NewChemIUPAC \sipnetwork { \textit {sipn} }
+\LetChemIUPAC \sipn \sipnetwork
+
+\NewChemIUPAC \star { \textit {star} }
+
+% --------------------------------------------------------------------------
+
+\tl_new:N \l__chemmacros_polymer_delimiter_left_tl
+\tl_new:N \l__chemmacros_polymer_delimiter_right_tl
+
+\tl_new:N \l__chemmacros_polymer_subscript_tl
+\tl_new:N \l__chemmacros_polymer_superscript_tl
+
+\dim_new:N \l__chemmacros_polymer_delimiter_height_dim
+\dim_new:N \l__chemmacros_polymer_delimiter_depth_dim
+
+\cs_new_protected:Npn \__chemmacros_set_polymer_delimiters:NN #1#2
+ {
+ \tl_set:Nn \l__chemmacros_polymer_delimiter_left_tl {#1}
+ \tl_set:Nn \l__chemmacros_polymer_delimiter_right_tl {#2}
+ }
+
+% #1: height
+% #2: depth
+% #3: opening node
+% #4: closing node
+% #5: subscript
+% #6: superscript
+\cs_new_protected:Npn \chemmacros_make_polymer_braces:nnnnnn #1#2#3#4#5#6
+ {
+ \dim_set:Nn \l__chemmacros_polymer_delimiter_height_dim { (#1+#2)/2 }
+ \dim_set:Nn \l__chemmacros_polymer_delimiter_depth_dim { (#1-#2)/2 }
+ \chemmacros_tikz_picture:nn {remember~ picture, overlay }
+ {
+ \chemmacros_tikz_node:n
+ { at = (#3) , yshift = \l__chemmacros_polymer_delimiter_depth_dim }
+ {
+ \c_math_toggle_token
+ \tex_left:D \l__chemmacros_polymer_delimiter_left_tl
+ \tex_vrule:D
+ height \l__chemmacros_polymer_delimiter_height_dim
+ depth \l__chemmacros_polymer_delimiter_height_dim
+ width \c_zero_dim
+ \tex_right:D .
+ \c_math_toggle_token
+ } ;
+ \chemmacros_tikz_node:n
+ { at = (#4) , yshift = \l__chemmacros_polymer_delimiter_depth_dim }
+ {
+ \c_math_toggle_token
+ \tex_left:D .
+ \tex_vrule:D
+ height \l__chemmacros_polymer_delimiter_height_dim
+ depth \l__chemmacros_polymer_delimiter_height_dim
+ width \c_zero_dim
+ \tex_right:D \l__chemmacros_polymer_delimiter_right_tl
+ \c_math_subscript_token { \hbox_overlap_right:n {#5} }
+ \c_math_superscript_token { \hbox_overlap_right:n {#6} }
+ \c_math_toggle_token
+ } ;
+ }
+ }
+\cs_generate_variant:Nn \chemmacros_make_polymer_braces:nnnnnn {nnnnVV}
+
+\chemmacros_define_keys:nn {polymers}
+ {
+ delimiters .code:n = \__chemmacros_set_polymer_delimiters:NN #1 ,
+ delimiters .initial:n = [] ,
+ superscript .tl_set:N = \l__chemmacros_polymer_superscript_tl ,
+ subscript .tl_set:N = \l__chemmacros_polymer_subscript_tl ,
+ subscript .initial:n = $n$
+ }
+
+\NewDocumentCommand \makepolymerdelims {O{}momm}
+ {
+ \group_begin:
+ \chemmacros_set_keys:nn {polymers} {#1}
+ \IfNoValueTF {#3}
+ {
+ \chemmacros_make_polymer_braces:nnnnVV {#2} {#2} {#4} {#5}
+ \l__chemmacros_polymer_subscript_tl
+ \l__chemmacros_polymer_superscript_tl
+ }
+ {
+ \chemmacros_make_polymer_braces:nnnnVV {#2} {#3} {#4} {#5}
+ \l__chemmacros_polymer_subscript_tl
+ \l__chemmacros_polymer_superscript_tl
+ }
+ \group_end:
+ }
+
+% --------------------------------------------------------------------------
+\tex_endinput:D
+
+2016/03/07 - first version
+2016/03/08 - \makepolymerdelims
+
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex
index 3be548df8ed..8f8a98f8d95 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex
@@ -94,13 +94,13 @@
\tl_set:Nn \l__chemmacros_reaction_lorname_tl { \chemmacros_translate:n {reaction} }
\tl_set:Nn \reactionlistname { \chemmacros_translate:n {list-of-reactions} }
-\keys_define:nn {chemmacros/reactions}
+\chemmacros_define_keys:nn {reactions}
{
list-name .tl_set:N = \reactionlistname ,
list-entry .tl_set:N = \l__chemmacros_reaction_lorname_tl ,
}
\ChemCompatibilityFrom{5.2}
-\keys_define:nn {chemmacros/reactions}
+\chemmacros_define_keys:nn {reactions}
{
list-heading-cmd .code:n =
\cs_set_protected:Npn \__chemmacros_reaction_heading:n ##1 {#1}
@@ -109,11 +109,11 @@
\cs_if_exist:NTF \chapter
{
- \keys_set:nn {chemmacros/reactions}
+ \chemmacros_set_keys:nn {reactions}
{ list-heading-cmd = \chapter* {#1} }
}
{
- \keys_set:nn {chemmacros/reactions}
+ \chemmacros_set_keys:nn {reactions}
{ list-heading-cmd = \section* {#1} }
}
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 cb2cc5db0ef..7d89d2e4ff9 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
@@ -246,7 +246,7 @@
\bool_set_true:N \l__chemmacros_ox_side_bool
}
-\keys_define:nn {chemmacros/redox}
+\chemmacros_define_keys:nn {redox}
{
pos .choice: ,
pos / top .code:n = \__chemmacros_ox_pos_top: ,
@@ -284,7 +284,7 @@
}
\ChemCompatibilityFrom{5.4}
-\keys_define:nn {chemmacros/redox}
+\chemmacros_define_keys:nn {redox}
{
explicit-zero-sign .bool_set:N = \l__chemmacros_ox_explicit_zero_sign_bool ,
explicit-zero-sign .default:n = true
@@ -296,7 +296,7 @@
\cs_new_protected:Npn \chemmacros_ox:nnnn #1#2#3#4
{
\group_begin:
- \keys_set:nn {chemmacros/redox} {#2}
+ \chemmacros_set_keys:nn {redox} {#2}
\tl_if_blank:nF {#1} { \__chemmacros_ox_pos_top: }
\__chemmacros_ox_write:nn {#3} {#4}
\group_end:
@@ -425,7 +425,7 @@
}
% redox-keys
-\keys_define:nn {chemmacros/redox}
+\chemmacros_define_keys:nn {redox}
{
dist .dim_set:N = \l__chemmacros_redox_dist_dim ,
dist .initial:n = {.6em} ,
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.spectroscopy.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.spectroscopy.code.tex
index 7dac76c2625..c0a91dea8b0 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.spectroscopy.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.spectroscopy.code.tex
@@ -153,7 +153,7 @@
\cs_new_eq:NN \__chemmacros_nmr_number:n \use:n
\cs_new_eq:NN \__chemmacros_nmr_position:n \use:n
-\keys_define:nn { chemmacros / spectroscopy }
+\chemmacros_define_keys:nn {spectroscopy}
{
unit .tl_set:N = \l__chemmacros_nmr_unit_tl ,
unit .default:n = \mega\hertz ,
@@ -353,7 +353,7 @@
\NewDocumentEnvironment {experimental} {o}
{
\group_begin:
- \IfNoValueF {#1} { \keys_set:nn {chemmacros/spectroscopy} {#1} }
+ \IfNoValueF {#1} { \chemmacros_set_keys:nn {spectroscopy} {#1} }
\bool_set_true:N \l__chemmacros_nmr_inner_bool
\cs_set_eq:NN \# \chemmacros_nmr_number:n
\cs_set_eq:NN \pos \chemmacros_nmr_position:n
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.thermodynamics.code.tex b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.thermodynamics.code.tex
index 3905aaf5987..0838397b169 100644
--- a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.thermodynamics.code.tex
+++ b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.thermodynamics.code.tex
@@ -43,7 +43,7 @@
\tl_set:Nn \l__chemmacros_state_sp_right_tl { \standardstate }
\tl_set:Nn \l__chemmacros_state_sb_pos_tl {left}
-\keys_define:nn {chemmacros/thermodynamics}
+\chemmacros_define_keys:nn {thermodynamics}
{
pre .tl_set:N = \l__chemmacros_state_pre_tl ,
post .tl_set:N = \l__chemmacros_state_post_tl ,
@@ -66,7 +66,7 @@
% subscript-left
% subscript-right
\group_begin:
- \keys_set:nn {chemmacros/thermodynamics} {#1}
+ \chemmacros_set_keys:nn {thermodynamics} {#1}
\ensuremath
{
\chemmacros_text:V \l__chemmacros_state_pre_tl
@@ -90,7 +90,8 @@
\cs_new_protected:Npn \chemmacros_declare_state:Nn #1#2
{
- \keys_define:xn {chemmacros/thermodynamics/\chemmacros_remove_backslash:N #1}
+ \chemmacros_define_keys:xn
+ {thermodynamics/\chemmacros_remove_backslash:N #1}
{
pre .meta:nn = {chemmacros/thermodynamics} { pre = ##1 } ,
post .meta:nn = {chemmacros/thermodynamics} { post = ##1 } ,
@@ -109,16 +110,18 @@
\DeclareDocumentCommand #1 { sO{}D(){}m }
{
\group_begin:
- \keys_set:xn {chemmacros/thermodynamics/\chemmacros_remove_backslash:N #1} {#2}
+ \chemmacros_set_keys:xn
+ {thermodynamics/\chemmacros_remove_backslash:N #1}
+ {#2}
\tl_if_blank:nF {##3}
{
- \keys_set:nx {chemmacros/thermodynamics}
+ \chemmacros_set_keys:nx {thermodynamics}
{ subscript-\l__chemmacros_state_sb_pos_tl = \exp_not:n {##3} }
}
\ensuremath
{
\chemmacros_state:nV {##2} \l__chemmacros_state_symbol_tl
- \keys_set_groups:nnn {chemmacros/thermodynamics} {variables} {##2}
+ \chemmacros_set_keys_groups:nnn {thermodynamics} {variables} {##2}
\IfBooleanF {##1} { = \SI {##4} { \l__chemmacros_state_unit_tl } }
}
\group_end:
diff --git a/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty b/Master/texmf-dist/tex/latex/chemmacros/chemmacros.sty
index 5ffd6a34089..31e6f679976 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 {2016/02/10}
+\tl_const:Nn \c_chemmacros_date_tl {2016/03/08}
\tl_const:Nn \c_chemmacros_version_major_number_tl {5}
-\tl_const:Nn \c_chemmacros_version_minor_number_tl {4}
+\tl_const:Nn \c_chemmacros_version_minor_number_tl {5}
\tl_const:Nn \c_chemmacros_version_subrelease_tl {}
\tl_const:Nx \c_chemmacros_version_number_tl
{\c_chemmacros_version_major_number_tl.\c_chemmacros_version_minor_number_tl}
@@ -505,3 +505,4 @@ Version history
- fixed erroneous definition of \NewChemMacroset
(base)
- new option `explicit-zero-sign' (redox)
+2016/03/08 - version 5.5 - new module `polymers'