I have my own letterclass using scrlttr2:
%mwe.cls
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mwe}[2010/11/19 mwe.cls]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrlttr2}}
\ProcessOptions\relax
%\RequirePackage{graphicx}
\RequirePackage[english]{babel}
\LoadClass{scrlttr2}
that I want to customize with .lco-files, like:
%mweelco.lco
\setkomavar{date}{.lco read!!}
Now I want to use it in a letter:
\documentclass[mwelco]%
{mwe}%(1)
\begin{document}
\begin{letter}{--Im Hause--}
%\LoadLetterOptions{mwelco}%(2)
\opening{test}
Content
\end{letter}
\end{document}
I want to give (1) the mwelco-option as an option to the documentclass and would rather not want to (2) use later in the file a \LoadLetterOptions.
However, only (2) works but (1) does not.
More strangely, if I comment babel out, then (1) and (2) work. Also, if I comment babel out and require graphicx (for argument's sake) also (1) and (2) work.
So there is some interaction between DeclareOption* and babel, that gets into my way. (Last September, with older texlive, it worked. Just checked, with out-of-the-box teelive-2019 babel works with (1) and (2).) I am using up-todate-texlive-2020.
edit (let me explain ``doesn't work¨ better):
I expected the behavior, that saying in the tex-file: \documentclass[mwelco]{mwe}
would lead mwe.cls to (A) load scrlttr2, (B) make scrlttr2 load the mwelco.lco file. But this does not happen.
Two ways that make this work are: (C) comment out the required babel or (D) to \LoadLetterOptions{mwelco}
in the letter.tex. Clearly, (C) is unacceptable and (D) is clumsy and spreads an option to the letter class to a location much later.
So it seems that requiring babel even after \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrlttr2}} \ProcessOptions\relax
in the package seems to have side effect on the option mwelco being passed to scrlttr2 or not. This is what I can not understand. I would appreciate help in avoiding this problem.