Thank you, that is very helpful.
As this is several of those \setenumerates I like the \@ifpackageloaded{}{} better. greetings, el On 2018-02-24 19:22 , Richard Heck wrote: > On 02/24/2018 10:06 AM, Jürgen Spitzmüller wrote: >> Am Samstag, den 24.02.2018, 16:00 +0200 schrieb Dr Eberhard Lisse: >>> Hi, >>> >>> I have created a template which uses the above module and sets up >>> stuff >>> like: >>> >>> \setenumerate[1]{label*=\arabic*., ref=\arabic*} >>> >>> in the preamble. >>> >>> If I use a (numbered) list in the text, enumitem.sty is loaded, hence >>> the above works, but if I don't enumitem.sty is not loaded and the >>> above >>> generates an error. >>> >>> I enclosed a MWE, just make the word test a list (enumerate or >>> itemize) >>> and the error should go away. >>> >>> Can that be considered a bug? >> No. This is by design. >> >>> Is there a workaround? >> \@ifpackageloaded{enumitem}{% >> <your stuff> >> }{} > > Alternatively, in the module itself (or wherever the layout is), put > that code > into the Preamble section for the Enumerate style, e.g.: > > Style Enumerate > Preamble > \setenumerate[1]{label*=\arabic*., ref=\arabic*} > EndPreamble > End > > Note that this would over-write any previous Preamble declaration, though. > Probably we should have an AddToPreamble for these, too. > > Richard > >