KOMAscript gives error when using parenthesis within options
up vote
1
down vote
favorite
Coming up from my previous question How to use equal sign inside class option with pgfopts I switched the base class from article
to scrartcl
and ran into a compile error.
l.451 FamilyProcessOptions{KOMA}
relax
Missing character: There is no , in font nullfont!
Missing character: There is no , in font nullfont!
! You can't use `macro parameter character #' in horizontal mode.
> @removeelement #1#2#3->def reserved@a ##1,#1,##
2reserved@a {##1,##2rese...
l.451 FamilyProcessOptions{KOMA}
Here is the example I've used
begin{filecontents}{jobname.cls}
ProvidesClass{jobname}[2018-11-20 v1.0 SE Test package]
RequirePackage{pgfopts}
pgfkeys{
testproj/.cd,
mystuff/.store in = myValue,
mystuff = {} % <-- Set default to empty
}
ProcessPgfOptions{/testproj}
LoadClass[myValue]{scrartcl} % article is working
endinput
end{filecontents}
documentclass[mystuff={hello=SE,test=1}]{jobname}
%pgfkeys{/testproj/mystuff = {hello=SE}} % <-- working as aspected
begin{document}
myValue: myValue
end{document}
Is this a bug in KOMAScript or do I miss something else? The goal is using scrreprt
and scrbook
.
koma-script class-options
add a comment |
up vote
1
down vote
favorite
Coming up from my previous question How to use equal sign inside class option with pgfopts I switched the base class from article
to scrartcl
and ran into a compile error.
l.451 FamilyProcessOptions{KOMA}
relax
Missing character: There is no , in font nullfont!
Missing character: There is no , in font nullfont!
! You can't use `macro parameter character #' in horizontal mode.
> @removeelement #1#2#3->def reserved@a ##1,#1,##
2reserved@a {##1,##2rese...
l.451 FamilyProcessOptions{KOMA}
Here is the example I've used
begin{filecontents}{jobname.cls}
ProvidesClass{jobname}[2018-11-20 v1.0 SE Test package]
RequirePackage{pgfopts}
pgfkeys{
testproj/.cd,
mystuff/.store in = myValue,
mystuff = {} % <-- Set default to empty
}
ProcessPgfOptions{/testproj}
LoadClass[myValue]{scrartcl} % article is working
endinput
end{filecontents}
documentclass[mystuff={hello=SE,test=1}]{jobname}
%pgfkeys{/testproj/mystuff = {hello=SE}} % <-- working as aspected
begin{document}
myValue: myValue
end{document}
Is this a bug in KOMAScript or do I miss something else? The goal is using scrreprt
and scrbook
.
koma-script class-options
2
basically you can not use{}
indocumentclass
options. As it happens I'm currently looking at whether it is possible to extend latex here (the easy part) in a way that it is compatible with all existing packages (the hard part)
– David Carlisle
Nov 20 at 19:45
github.com/latex3/latex2e/issues/85
– David Carlisle
Nov 20 at 19:47
Well, I see it is not that easy as expected. But why was it working usingarticle
?
– faltfe
Nov 20 at 19:51
3
the KOMA classes have their own key-val handler (they have to process keys like fontsize=12pt), and this is interfering.
– Ulrike Fischer
Nov 20 at 19:55
you might have got lucky but@removeelement
is in the latex format and if the element you try to remove (typically an option from the unused option list) has a brace group it fails rather spectacularly, it just was not written with key=value processing in mind at all.
– David Carlisle
Nov 20 at 20:01
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Coming up from my previous question How to use equal sign inside class option with pgfopts I switched the base class from article
to scrartcl
and ran into a compile error.
l.451 FamilyProcessOptions{KOMA}
relax
Missing character: There is no , in font nullfont!
Missing character: There is no , in font nullfont!
! You can't use `macro parameter character #' in horizontal mode.
> @removeelement #1#2#3->def reserved@a ##1,#1,##
2reserved@a {##1,##2rese...
l.451 FamilyProcessOptions{KOMA}
Here is the example I've used
begin{filecontents}{jobname.cls}
ProvidesClass{jobname}[2018-11-20 v1.0 SE Test package]
RequirePackage{pgfopts}
pgfkeys{
testproj/.cd,
mystuff/.store in = myValue,
mystuff = {} % <-- Set default to empty
}
ProcessPgfOptions{/testproj}
LoadClass[myValue]{scrartcl} % article is working
endinput
end{filecontents}
documentclass[mystuff={hello=SE,test=1}]{jobname}
%pgfkeys{/testproj/mystuff = {hello=SE}} % <-- working as aspected
begin{document}
myValue: myValue
end{document}
Is this a bug in KOMAScript or do I miss something else? The goal is using scrreprt
and scrbook
.
koma-script class-options
Coming up from my previous question How to use equal sign inside class option with pgfopts I switched the base class from article
to scrartcl
and ran into a compile error.
l.451 FamilyProcessOptions{KOMA}
relax
Missing character: There is no , in font nullfont!
Missing character: There is no , in font nullfont!
! You can't use `macro parameter character #' in horizontal mode.
> @removeelement #1#2#3->def reserved@a ##1,#1,##
2reserved@a {##1,##2rese...
l.451 FamilyProcessOptions{KOMA}
Here is the example I've used
begin{filecontents}{jobname.cls}
ProvidesClass{jobname}[2018-11-20 v1.0 SE Test package]
RequirePackage{pgfopts}
pgfkeys{
testproj/.cd,
mystuff/.store in = myValue,
mystuff = {} % <-- Set default to empty
}
ProcessPgfOptions{/testproj}
LoadClass[myValue]{scrartcl} % article is working
endinput
end{filecontents}
documentclass[mystuff={hello=SE,test=1}]{jobname}
%pgfkeys{/testproj/mystuff = {hello=SE}} % <-- working as aspected
begin{document}
myValue: myValue
end{document}
Is this a bug in KOMAScript or do I miss something else? The goal is using scrreprt
and scrbook
.
koma-script class-options
koma-script class-options
asked Nov 20 at 19:41
faltfe
32918
32918
2
basically you can not use{}
indocumentclass
options. As it happens I'm currently looking at whether it is possible to extend latex here (the easy part) in a way that it is compatible with all existing packages (the hard part)
– David Carlisle
Nov 20 at 19:45
github.com/latex3/latex2e/issues/85
– David Carlisle
Nov 20 at 19:47
Well, I see it is not that easy as expected. But why was it working usingarticle
?
– faltfe
Nov 20 at 19:51
3
the KOMA classes have their own key-val handler (they have to process keys like fontsize=12pt), and this is interfering.
– Ulrike Fischer
Nov 20 at 19:55
you might have got lucky but@removeelement
is in the latex format and if the element you try to remove (typically an option from the unused option list) has a brace group it fails rather spectacularly, it just was not written with key=value processing in mind at all.
– David Carlisle
Nov 20 at 20:01
add a comment |
2
basically you can not use{}
indocumentclass
options. As it happens I'm currently looking at whether it is possible to extend latex here (the easy part) in a way that it is compatible with all existing packages (the hard part)
– David Carlisle
Nov 20 at 19:45
github.com/latex3/latex2e/issues/85
– David Carlisle
Nov 20 at 19:47
Well, I see it is not that easy as expected. But why was it working usingarticle
?
– faltfe
Nov 20 at 19:51
3
the KOMA classes have their own key-val handler (they have to process keys like fontsize=12pt), and this is interfering.
– Ulrike Fischer
Nov 20 at 19:55
you might have got lucky but@removeelement
is in the latex format and if the element you try to remove (typically an option from the unused option list) has a brace group it fails rather spectacularly, it just was not written with key=value processing in mind at all.
– David Carlisle
Nov 20 at 20:01
2
2
basically you can not use
{}
in documentclass
options. As it happens I'm currently looking at whether it is possible to extend latex here (the easy part) in a way that it is compatible with all existing packages (the hard part)– David Carlisle
Nov 20 at 19:45
basically you can not use
{}
in documentclass
options. As it happens I'm currently looking at whether it is possible to extend latex here (the easy part) in a way that it is compatible with all existing packages (the hard part)– David Carlisle
Nov 20 at 19:45
github.com/latex3/latex2e/issues/85
– David Carlisle
Nov 20 at 19:47
github.com/latex3/latex2e/issues/85
– David Carlisle
Nov 20 at 19:47
Well, I see it is not that easy as expected. But why was it working using
article
?– faltfe
Nov 20 at 19:51
Well, I see it is not that easy as expected. But why was it working using
article
?– faltfe
Nov 20 at 19:51
3
3
the KOMA classes have their own key-val handler (they have to process keys like fontsize=12pt), and this is interfering.
– Ulrike Fischer
Nov 20 at 19:55
the KOMA classes have their own key-val handler (they have to process keys like fontsize=12pt), and this is interfering.
– Ulrike Fischer
Nov 20 at 19:55
you might have got lucky but
@removeelement
is in the latex format and if the element you try to remove (typically an option from the unused option list) has a brace group it fails rather spectacularly, it just was not written with key=value processing in mind at all.– David Carlisle
Nov 20 at 20:01
you might have got lucky but
@removeelement
is in the latex format and if the element you try to remove (typically an option from the unused option list) has a brace group it fails rather spectacularly, it just was not written with key=value processing in mind at all.– David Carlisle
Nov 20 at 20:01
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
This might possibly be safe but it's a very delicate area of latex2e code
begin{filecontents}{jobname.cls}
ProvidesClass{jobname}[2018-11-20 v1.0 SE Test package]
RequirePackage{pgfopts}
pgfkeys{
testproj/.cd,
mystuff/.store in = myValue,
mystuff = {} % <-- Set default to empty
}
letzzz @expandtwoargs
def@expandtwoargs#1#2#3{%
edeftmp@zz{noexpandzzznoexpand#1{noexpanddetokenize{#2}}{noexpanddetokenize{#3}}}%
tmp@zz}
ProcessPgfOptions{/testproj}
LoadClass[myValue]{scrartcl} % article is working
let@expandtwoargszzz
endinput
end{filecontents}
documentclass[mystuff={hello=SE,test=1}]{jobname}
%pgfkeys{/testproj/mystuff = {hello=SE}} % <-- working as aspected
begin{document}
myValue: myValue
end{document}
it detokenizes the arguments (making {}
safe) before using in@
but this may have unexpected consequences elsewhere....
This seems to work. As far as I could test it there is no unexpected consequence. But probably it is better to do some rework so that I won't need that magic.
– faltfe
9 hours ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
This might possibly be safe but it's a very delicate area of latex2e code
begin{filecontents}{jobname.cls}
ProvidesClass{jobname}[2018-11-20 v1.0 SE Test package]
RequirePackage{pgfopts}
pgfkeys{
testproj/.cd,
mystuff/.store in = myValue,
mystuff = {} % <-- Set default to empty
}
letzzz @expandtwoargs
def@expandtwoargs#1#2#3{%
edeftmp@zz{noexpandzzznoexpand#1{noexpanddetokenize{#2}}{noexpanddetokenize{#3}}}%
tmp@zz}
ProcessPgfOptions{/testproj}
LoadClass[myValue]{scrartcl} % article is working
let@expandtwoargszzz
endinput
end{filecontents}
documentclass[mystuff={hello=SE,test=1}]{jobname}
%pgfkeys{/testproj/mystuff = {hello=SE}} % <-- working as aspected
begin{document}
myValue: myValue
end{document}
it detokenizes the arguments (making {}
safe) before using in@
but this may have unexpected consequences elsewhere....
This seems to work. As far as I could test it there is no unexpected consequence. But probably it is better to do some rework so that I won't need that magic.
– faltfe
9 hours ago
add a comment |
up vote
1
down vote
accepted
This might possibly be safe but it's a very delicate area of latex2e code
begin{filecontents}{jobname.cls}
ProvidesClass{jobname}[2018-11-20 v1.0 SE Test package]
RequirePackage{pgfopts}
pgfkeys{
testproj/.cd,
mystuff/.store in = myValue,
mystuff = {} % <-- Set default to empty
}
letzzz @expandtwoargs
def@expandtwoargs#1#2#3{%
edeftmp@zz{noexpandzzznoexpand#1{noexpanddetokenize{#2}}{noexpanddetokenize{#3}}}%
tmp@zz}
ProcessPgfOptions{/testproj}
LoadClass[myValue]{scrartcl} % article is working
let@expandtwoargszzz
endinput
end{filecontents}
documentclass[mystuff={hello=SE,test=1}]{jobname}
%pgfkeys{/testproj/mystuff = {hello=SE}} % <-- working as aspected
begin{document}
myValue: myValue
end{document}
it detokenizes the arguments (making {}
safe) before using in@
but this may have unexpected consequences elsewhere....
This seems to work. As far as I could test it there is no unexpected consequence. But probably it is better to do some rework so that I won't need that magic.
– faltfe
9 hours ago
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
This might possibly be safe but it's a very delicate area of latex2e code
begin{filecontents}{jobname.cls}
ProvidesClass{jobname}[2018-11-20 v1.0 SE Test package]
RequirePackage{pgfopts}
pgfkeys{
testproj/.cd,
mystuff/.store in = myValue,
mystuff = {} % <-- Set default to empty
}
letzzz @expandtwoargs
def@expandtwoargs#1#2#3{%
edeftmp@zz{noexpandzzznoexpand#1{noexpanddetokenize{#2}}{noexpanddetokenize{#3}}}%
tmp@zz}
ProcessPgfOptions{/testproj}
LoadClass[myValue]{scrartcl} % article is working
let@expandtwoargszzz
endinput
end{filecontents}
documentclass[mystuff={hello=SE,test=1}]{jobname}
%pgfkeys{/testproj/mystuff = {hello=SE}} % <-- working as aspected
begin{document}
myValue: myValue
end{document}
it detokenizes the arguments (making {}
safe) before using in@
but this may have unexpected consequences elsewhere....
This might possibly be safe but it's a very delicate area of latex2e code
begin{filecontents}{jobname.cls}
ProvidesClass{jobname}[2018-11-20 v1.0 SE Test package]
RequirePackage{pgfopts}
pgfkeys{
testproj/.cd,
mystuff/.store in = myValue,
mystuff = {} % <-- Set default to empty
}
letzzz @expandtwoargs
def@expandtwoargs#1#2#3{%
edeftmp@zz{noexpandzzznoexpand#1{noexpanddetokenize{#2}}{noexpanddetokenize{#3}}}%
tmp@zz}
ProcessPgfOptions{/testproj}
LoadClass[myValue]{scrartcl} % article is working
let@expandtwoargszzz
endinput
end{filecontents}
documentclass[mystuff={hello=SE,test=1}]{jobname}
%pgfkeys{/testproj/mystuff = {hello=SE}} % <-- working as aspected
begin{document}
myValue: myValue
end{document}
it detokenizes the arguments (making {}
safe) before using in@
but this may have unexpected consequences elsewhere....
answered Nov 20 at 20:34
David Carlisle
478k3811071841
478k3811071841
This seems to work. As far as I could test it there is no unexpected consequence. But probably it is better to do some rework so that I won't need that magic.
– faltfe
9 hours ago
add a comment |
This seems to work. As far as I could test it there is no unexpected consequence. But probably it is better to do some rework so that I won't need that magic.
– faltfe
9 hours ago
This seems to work. As far as I could test it there is no unexpected consequence. But probably it is better to do some rework so that I won't need that magic.
– faltfe
9 hours ago
This seems to work. As far as I could test it there is no unexpected consequence. But probably it is better to do some rework so that I won't need that magic.
– faltfe
9 hours ago
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461020%2fkomascript-gives-error-when-using-parenthesis-within-options%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
basically you can not use
{}
indocumentclass
options. As it happens I'm currently looking at whether it is possible to extend latex here (the easy part) in a way that it is compatible with all existing packages (the hard part)– David Carlisle
Nov 20 at 19:45
github.com/latex3/latex2e/issues/85
– David Carlisle
Nov 20 at 19:47
Well, I see it is not that easy as expected. But why was it working using
article
?– faltfe
Nov 20 at 19:51
3
the KOMA classes have their own key-val handler (they have to process keys like fontsize=12pt), and this is interfering.
– Ulrike Fischer
Nov 20 at 19:55
you might have got lucky but
@removeelement
is in the latex format and if the element you try to remove (typically an option from the unused option list) has a brace group it fails rather spectacularly, it just was not written with key=value processing in mind at all.– David Carlisle
Nov 20 at 20:01