summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemmacros/chemmacros.module.base.code.tex
diff options
context:
space:
mode:
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.tex22
1 files changed, 15 insertions, 7 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 eab20de2076..d8a65a0096a 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
@@ -247,16 +247,24 @@
% load package #1 and add its options to chemmacros
% this requires that package #1 defines its options with l3keys using its
% name as module
-\cs_new_protected:Npn \chemmacros_integrate_package:nn #1#2
+\cs_new_protected:Npn \chemmacros_integrate_package:nnn #1#2#3
{
- \tl_if_blank:nTF {#2}
- { \RequirePackage {#1} }
- { \RequirePackage {#1} [#2] }
+ \tl_if_blank:nTF {#3}
+ {
+ \tl_if_blank:nTF {#1}
+ { \RequirePackage {#2} }
+ { \RequirePackage [#1] {#2} }
+ }
+ {
+ \tl_if_blank:nTF {#1}
+ { \RequirePackage {#2} [#3] }
+ { \RequirePackage [#1] {#2} [#3] }
+ }
\keys_define:nn {chemmacros}
{
- #1 .choice: ,
- #1 / unknown .code:n =
- \keys_set:no {#1} { \l_keys_key_tl = ##1 }
+ #2 .choice: ,
+ #2 / unknown .code:n =
+ \keys_set:no {#2} { \l_keys_key_tl = ##1 }
}
}