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,## 2\reserved@a {##1,##2\rese... 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.
{}in\documentclassoptions. 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 '18 at 19:45article? – faltfe Nov 20 '18 at 19:51\@removeelementis 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 '18 at 20:01