9

Traditionally, LaTeX packages will use package options (I mean the options in \usepackage[...]{package}) for setup. However, I have noticed in some modern packages, e.g. siunitx, unicode-math, ctex, etc, one can set the options using a command, e.g. \sisetup.

Personally, I don't like passing too much options to a package so I prefer the later method. Could anyone give some advice on which method is better?

1 Answer 1

16

It is best to set things up using a \foosetup command and then (possibly) also make those options available as package options using kvoptions or similar packages.

the advantage of having a separate setup command is that it can be run more than once which avoids many issues with option clashes and also the package option list is somewhat aggressively normalised for expansion and white space which can interfere with option values that you may want to set. However for simple options it is often convenient to just set them in the \usepackage option list.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .