0

I moved part of the code in a class to a new package. This package can handle a couple of options defined using l3keys and processed with l3keys2e (one option being multichoice). My problem is that I want to make these options available to the main class. So, the idea is to set the options in \documentclass to be passed to the package.

The only way I figured is to define the same options in the class; basically coping \keys_define from the package in the class. This code duplication looks quite unelegant to me.

What is the way to avoid this code duplication?

TeXtnik
  • 5,853
  • 2
    Use a unknown handler in the class and pass all unknown options to the package with \PassOptionsToPackage{options}{yourpackage}. Just like you would do with L2e. And please always add a MWE to help us give more specific advice. – TeXnician Dec 29 '18 at 08:24
  • Basically you have already done it. Looking at your last question, you could do exactly the same: https://tex.stackexchange.com/a/462835/124577 – TeXnician Dec 29 '18 at 10:26

0 Answers0