I am writing a class based on book.cls, to which I want to have an option that is a list, so I can do
\documentclass[languages={french, english}]{testops}
I have define the key using l3key2e. But it seems that the option parser of the class doesn't allow to use =, if all pass the options to book.
If I don't pass the all the options to book, them the document process. But I would like to pass the options not defined by l3keys2e to the class, so I don't have to re-define the usual options of the bookclass (paper size, fontsize, ....).
Is there any way to do this, and at the same time, passing the other options to bookclass?
MWE
\begin{filecontents}{testops.cls}
\ProvidesClass{\jobname}[2018-11-20 v1.0 SE Test package]
\RequirePackage{pgfopts}
\RequirePackage{expl3,l3keys2e,xparse}
\ExplSyntaxOn
\keys_define:nn { testops }
{ languages .default:n = {english},
languages .clist_gset:N = \g_testops_languages_clist,
}
\cs_new_protected_nopar:Nn \__printlanguages:
{
\clist_use:Nnnn \g_testops_languages_clist { ~and~ } { ,~ } { ~and~ }
}
\NewDocumentCommand { \printlanguages} {} {\__printlanguages:}
\ProcessKeysOptions { testops } % Parses the option list
\ExplSyntaxOff
\PassOptionsToClass{\CurrentOption}{book} %%% <-- THIS LINE RISES THE ERROR
\LoadClass{book}
\endinput
\end{filecontents}
% ------------------
\documentclass[languages={french,spanish,englis}]{testops}
\begin{document}
\printlanguages
\end{document}