diff options
author | Karl Berry <karl@freefriends.org> | 2015-10-15 21:18:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-10-15 21:18:08 +0000 |
commit | 1a53ed5fef3415d75bf09d6c089f10085113434a (patch) | |
tree | e16e66c5b79962741c8d456729c4bedd8d4c19d5 /Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex | |
parent | 4018267c3c2e5466bff0abae9561a686d05da81e (diff) |
chemmacros (15oct15)
git-svn-id: svn://tug.org/texlive/trunk@38649 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.reactions.code.tex | 36 |
1 files changed, 28 insertions, 8 deletions
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 a3468239f06..8138ca6e7dc 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 @@ -25,7 +25,7 @@ % % The Current Maintainer of this work is Clemens Niederberger. % -------------------------------------------------------------------------- -\ChemModule{reactions}{2015/09/15 reaction environments} +\ChemModule{reactions}{2015/10/14 reaction environments} \chemmacros_load_module:n {chemformula} @@ -87,21 +87,40 @@ \tl_new:N \reactionlistname \tl_new:N \l__chemmacros_reaction_heading_tl -\cs_if_exist:NTF \chapter - { \tl_set:Nn \l__chemmacros_reaction_heading_tl { \chapter* } } - { \tl_set:Nn \l__chemmacros_reaction_heading_tl { \section* } } +\cs_new:Npn \__chemmacros_reaction_heading:n #1 + { \l__chemmacros_reaction_heading_tl { #1 } } +\cs_generate_variant:Nn \__chemmacros_reaction_heading:n { V } \tl_set:Nn \l__chemmacros_reaction_lorname_tl { \chemmacros_translate:n {reaction} } \tl_set:Nn \reactionlistname { \chemmacros_translate:n {list-of-reactions} } -\cs_new:Npn \__chemmacros_reaction_heading:n #1 - { \l__chemmacros_reaction_heading_tl { #1 } } -\cs_generate_variant:Nn \__chemmacros_reaction_heading:n { V } +\keys_define:nn {chemmacros/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} + { + list-heading-cmd .code:n = + \cs_set_protected:Npn \__chemmacros_reaction_heading:n ##1 {#1} + } +\EndChemCompatibility + +\cs_if_exist:NTF \chapter + { + \keys_set:nn {chemmacros/reactions} + { list-heading-cmd = \chapter* {#1} } + } + { + \keys_set:nn {chemmacros/reactions} + { list-heading-cmd = \section* {#1} } + } \cs_new_protected:Npn \listofreactions { \__chemmacros_reaction_heading:V \reactionlistname - \@starttoc { lor } + \@starttoc {lor} } \cs_new_protected:Npn \l@reaction #1#2 @@ -187,3 +206,4 @@ 2015/09/15 - adapt to `method' option => do not use chemformula's macros directly +2015/10/14 - new option `list-heading-cmd' |