Questions tagged [package-options]

These reference options specified to the package at loading time. For optional arguments to macros or environments, use {optional-arguments} instead.

These reference options specified to the package at loading time. They are intended to modify the default loading parameters for the package.

Typical usage would be via

\usepackage[<options>]{<package>}

Other methods may be specific to the package. For example, hyperref supplies the macro \hypersetup{<options>} to specify package options after loading the package itself. geometry does something similar through \geometry{<options>}.

Options may also be passed to a package; typically used when writing a package that relies on other packages. The macro \PassOptionsToPackage is used for this.

The LaTeX kernel provides \DeclareOption, \ExecuteOption and \ProcessOption macros, whereas the xkeyval package extends the possibilities for package and class options.

285 questions
10
votes
2 answers

How to circumvent ‘Option clash for package …’ error?

I use a package foo that requires a package bar with some options. Now, assume that I need bar to be loaded with a different set of options. Unfortunately, when I try to load bar myself I usually end up with an Option clash for package bar LaTeX…
mhp
  • 8,692
10
votes
1 answer

Pass package options at loading time or later?

(This isn't really about a LaTeX issue but more about personal taste and arguments herefore.) Do you prefer to pass package options at loading time with, say, \usepackage[something]{geoemtry} \usepackage[something]{siunitx} or later in the preamble…
8
votes
2 answers

How to use commands or multiline values for package options/parameters?

I would like to know if there's a way to use a command (including custom commands created with \newcommand) as parameter/option values). I would like to do something like…
Karl
7
votes
1 answer

\ExecuteOptions error \CurrentOption \@nil

I try to follow this scheme : If not DeclareOption but have an error of this type : I get an error when using `\ExecuteOptions` together with `\usepackage{geometry}` but I don't understand how to fix it. Here is my MWE…
Tarass
  • 16,912
4
votes
0 answers

How to list options supported by a package?

Sometimes options supported by a package are scattered all over a 100-page documentation rather than given in a list, and it is hard to understand if the package implements certain functionality. Is there a universal way to list or print all options…
4
votes
1 answer

! LaTeX Error: Option clash for package geometry (but I haven't loaded package twice)

I am currently trying to create a landscape document using r markdown. Since I also want the header to be in landscape, I have the following mystyles.sty…
Paul
  • 141
4
votes
1 answer

Can one reconfigure packages after \usepackage?

Is it possible to change the options a package was invoked with after the fact? That is, could one define \OopsIWishIHadWrittenDraftWhenIncludingGraphicx so…
2
votes
1 answer

How do I pass the right option to select english?

OK I'm not a LaTeX developer but I'm using someone else's file to produce a document. I don't know LaTeX at all, How do I pass a command option to tell the package to use english and not french when this is in the .cls…
2
votes
1 answer

How can an unused documentclass option affect other packages?

This is a sort of followup on this question of mine about overprinting. Apparantly, I don't understand how global options are passed from classes to packages as well as I hoped I did. This…
mrf
  • 904
2
votes
2 answers

Bad mathchar with semantic package

I get the following error message when using the semantic package: ! Bad mathchar (32768). \relax l.13 \begin{document} The problem goes away if I load the semantic package with just the inference option.…
dow
  • 648
  • 4
  • 9
2
votes
0 answers

Using amspset package

I use the amspset package. I understand there are options to use the cm font (Computer Modern) and also an option called "unboxed" to remove boxes from the questions. What is the correct command to activate these options? I Use BaKoMa TeX on…
Eric Auld
  • 121
  • 1
2
votes
0 answers

I am trying to send options to a style file using boolean declare option

$Ok trying minimal examples: here is doofus.tex \documentclass[english]{letter} \usepackage[T1]{fontenc} \usepackage{color} \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX…
2
votes
1 answer

Options for ``footmisc'' package

Is there a command for footmisc similar to siunitx's \sisetup for setting options in another way than via \usepackage[]{footmisc}? I can't find anything in the manual.
1
vote
1 answer

Will it work if I use \PassOptionsToPackage twice to the same package?

Sometimes I need to \PassOptionsToPackage under certain conditions. Would it work if I \PassOptionsToPackage multiple times to the same package? For example, when I…
Jinwen
  • 8,518
1
vote
1 answer

How do I define, using the package 'options', a new command type option which is capable of invoking its default argument?

I am trying to use the package options to define a new command type option which invokes the default argument when not provided with an argument. I have tried the following MWE which defines the new option type myopttype. It works for the example in…
user24098
  • 1,235
1
2