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.










share|improve this question


















  • 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












  • 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















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.










share|improve this question


















  • 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












  • 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













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.










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 at 19:41









faltfe

32918




32918








  • 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












  • 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














  • 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












  • 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








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










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....






share|improve this answer





















  • 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











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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

























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....






share|improve this answer





















  • 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















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....






share|improve this answer





















  • 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













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....






share|improve this answer












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....







share|improve this answer












share|improve this answer



share|improve this answer










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


















  • 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


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?