In Lyx, is it possible to change package options of packages that are loaded by modules? Specifically, I tried to set the options of the todonotes package which I use in conjunction with the TODO Notes module. This module loads the package without passing any options to it. Specifically, it adds
\RequirePackage{todonotes}
to the preamble.
Adding another \usepackage[myOptions]{todonotes}
to my preamble causes an options clash. I tried to
- Set the options globally by passing them to the document class (as suggested by LaTex and this answer). No error, but also no effect.
- Use
\PassOptionsToPackage
. No error, but also no effect. I think this command must be used before loading the package, which I can't do as the module's preamble additions are done before the user's additions.
A possible solution would be to change the module itself. But I don't like this solution much because it would have a system wide effect where I only want it to affect the document. (Also, I don't want to change the moule on all machines I use)
What other options do I have?
\AtBeginDocument{\PassOptionsToPackage{…}}
. Another solution to prevent such clashes generally consists in writing the options as options for the document class. Not knowing what are these options, the class will propose them to every loaded package.AtBeginDocument
does not work in my case but passing the options to the doc class does. I had tried this but had the tikzexternalize package in effect which prevented a rerendering of the Todo notes.