diff options
author | Karl Berry <karl@freefriends.org> | 2016-02-12 00:25:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-02-12 00:25:33 +0000 |
commit | e61d83b5ff5c38ecb67a00a7081b0be2e944e5d9 (patch) | |
tree | 66e24504a0cbc6e790f35ff70ed6ae2babc34cc9 /Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex | |
parent | d8bace3003c56a242824b6f10d6c6b5ee4f8057b (diff) |
chemmacros (10feb16)
git-svn-id: svn://tug.org/texlive/trunk@39682 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex | 46 |
1 files changed, 38 insertions, 8 deletions
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 d62b2b5aa7e..1f20afb1e25 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 @@ -25,7 +25,7 @@ % % The Current Maintainer of this work is Clemens Niederberger. % -------------------------------------------------------------------------- -\ChemModule{base}{2015/10/14 basic chemmacros module} +\ChemModule{base}{2016/02/09 basic chemmacros module} % for the document hooks \ChemCompatibilityFrom{5.1} @@ -60,20 +60,45 @@ % #3: internal command call \cs_new_protected:Npn \chemmacros_new_macroset:nnn #1#2#3 { - \exp_args:Nc \NewDocumentCommand {NewChem#1} {#2} + \exp_args:Nc \NewDocumentCommand + { + NewChem + \str_upper_case:f { \tl_head:n {#1} } + \tl_tail:n {#1} + } + {#2} { \cs_if_free:NTF ##1 { #3 } { \msg_error:nnn {chemmacros} {new-#1} {##1} } } - \exp_args:Nc \NewDocumentCommand {RenewChem#1} {#2} + \exp_args:Nc \NewDocumentCommand + { + RenewChem + \str_upper_case:f { \tl_head:n {#1} } + \tl_tail:n {#1} + } + {#2} { \cs_if_free:NTF ##1 { \msg_error:nnn {chemmacros} {renew-#1} {##1} } { #3 } } - \exp_args:Nc \NewDocumentCommand {DeclareChem#1} {#2} {#3} - \exp_args:Nc \NewDocumentCommand {ProvideChem#1} {#2} + \exp_args:Nc \NewDocumentCommand + { + DeclareChem + \str_upper_case:f { \tl_head:n {#1} } + \tl_tail:n {#1} + } + {#2} + {#3} + \exp_args:Nc \NewDocumentCommand + { + ProvideChem + \str_upper_case:f { \tl_head:n {#1} } + \tl_tail:n {#1} + } + {#2} { \cs_if_free:NT ##1 { #3 } } \msg_new:nnn {chemmacros} {new-#1} { @@ -88,9 +113,6 @@ } } -\NewDocumentCommand \NewChemMacroset {mmm} - { \cs_new_protected:Npn \chemmacros_new_macroset:nnn {#1} {#2} {#3} } - \cs_new_protected:Npn \chemmacros_new_environment_macroset:nnn #1#2#3 { \exp_args:Nc \NewDocumentCommand {NewChem#1} {#2} @@ -120,6 +142,13 @@ \msg_new:nnn {chemmacros} {renew-#1} { You've~ tried~ to~ renew~ the~ #1~ ##1,~ but~ it~ doesn't~ exist. } } + +\NewDocumentCommand \NewChemMacroset {smmm} + { + \IfBooleanTF {#1} + { \chemmacros_new_environment_macroset:nnn {#2} {#3} {#4} } + { \chemmacros_new_macroset:nnn {#2} {#3} {#4} } + } % -------------------------------------------------------------------------- % basic tools: @@ -307,3 +336,4 @@ 2015/09/23 - new conditionals \chemmacros_if_preamble:TF and \chemmacros_if_document:TF 2015/10/14 - load `errorcheck' module +2016/02/09 - starred version of \NewChemMacroset |