Am 01.12.2015 um 20:36 schrieb Richard Heck:
> On 11/30/2015 04:33 AM, David wrote:
>> Dear list,
>>
>> 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 [1].
>> 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). 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 systems I use)
>>
>> What other options do I have?
> Copy todonotes.module to todonotes2.module. Open it and make whatever
> changes you
> wish (I'd make some change to the first line and description so you know
> which is which),
> then reconfigure LyX so it is seen and use the modified version in this
> paper.
>
> Alternatively, copy the contents of todonotes.module to Local Layout and
> make your
> changes there. Then remove the ToDo Notes module from the list of used
> modules.
>
> Richard
>

Thanks for these interesting approaches, Richard! In this regard, it
would also be nice if one could point Lyx to module files that are
located outside ~/.lyx
This way I could save the module file together with my document (in a
git repo) and have it ready wherever I need it.

Contrary to what I wrote before, passing the options as global options
to the document class *does* work. On my first try, I didn't see the
effect because I use the tikzexternalize package and todonotes renders
its notes with Tikz. This prevented rerendering.

David

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to