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

learn more… | top users | synonyms

54
votes
1answer
640 views

Automated management of package options and loading order

This question led to a new package: pkgloader(CTAN, Github) LaTeX package conflicts are a common source of frustration: (1) (2) (3) (4) (5) (6). To quote Freek Dijkstra: Package conflicts ...
33
votes
3answers
549 views

Will LaTeX3 improve freedom of package ordering and reduce “options clash”?

A prefatory afterthought: you may think this question better asked on the LaTeX3 mailing list, but I believe there may be a more general interest in the rather Byzantine rules for package load order. ...
17
votes
2answers
4k views

Option clash with xcolor and TikZ

I want to draw some coloured circles, so I loaded tikz in my preamble. However, now xcolor is telling me that it has an "option clash". How should I fix this? \documentclass{article} ...
14
votes
2answers
962 views

Package options and \RequirePackage: order of commands and option conflicts?

How do the options of a \RequirePackage command interact with options specified for that same package elsewhere? Here is an example: The pdfx package, if loaded with the a-1b-option, executes the ...
14
votes
1answer
866 views

What does the hyperref option hypertexnames do?

The Manual of hyperref states that hypertexnames: use guessable names for links. What does this mean? What are the consequences of using this option?
13
votes
3answers
2k views

A package template using xkeyval?

I would like to write a package offering a number of commands. The package should accept options, and some of these options should be available as command options. Usage should be as follows: ... ...
13
votes
2answers
170 views

Load a package as optional argument

I'm creating my personal package. I'd like to use an option to turn on/off the line numbering provided by the package lineno. So, my sty file contains \RequirePackage{lineno} \linenumbers But if ...
13
votes
1answer
2k views

Option clash for package xcolor

Im doing a report, and having a rather large table in my appendix. And want to emphasize some specific values by coloring some single cells. I'm trying to do it with xcolor. But receiving the error: ...
13
votes
2answers
169 views

Load different options depending on package version

Is there any possibility to load a package with different options depending on the version of the package? The command \@ifpackagelater{package}{date}{true}{false} only works if the package is ...
13
votes
1answer
472 views

Where can I find out what various hyperref options do?

Where can I find a description of hyperref options, deeper than the one of the manual? I do not understand the meaning of several options. For instance, what is "redefines LaTeX internals" (option ...
12
votes
2answers
451 views

Did I misunderstand \RequirePackage? I don’t understand an option clash

Have a look at the following example, please. \documentclass{article} \usepackage{filecontents} \begin{filecontents}{my.sty} \RequirePackage{xcolor} \end{filecontents} \RequirePackage{my} ...
12
votes
3answers
5k views

I cannot get a (properly) underlined hyperlink in blue

First I just ignored the hyperref package and just wanted something that 'looked' like a link: \underline{\color{Blue} http://soundcloud.com} but I end up getting an underline about 3mm below the ...
12
votes
2answers
286 views

Is there a way to limit the scope of \usepackage?

When I tried to use the breqn package suggested by an answer to the question How do I break a long equation over lines It managed to break a whole bunch of unrelated equations (equations that did ...
11
votes
2answers
194 views

Applying options to already loaded package

Is there a way to apply some options to a package which is loaded in the cls file I am using? For instance, suppose that the cls file loads graphicx, and I want to apply the option demo to it from my ...
11
votes
3answers
2k views

a4paper, where should I declare it? In document class or geometry?

I currently have an article document class and I previously changed it to include printing on A4 paper: \documentclass[12pt, a4paper]{article} However, I had to change my margins to meet my ...
11
votes
1answer
357 views

LaTeX3: how to access package options

In my package I intend to write in expl3 syntax, how can I get access to the list of options passed to it on the document level via \usepackage[<option list>]{my-l3-pkg}? I know more or less ...
10
votes
3answers
2k views

Conflict between Options of Packages

I have these following packages defined in my preamble and once the file is ran, it creates an error of the following saying there is a clash within the package options. Packages are below: ...
10
votes
1answer
237 views

If not DeclareOption

I have some documents using a same custom package. That "header" package loads by default the package fullpage. But I would like to write a new LaTeX document, using the same header, but without ...
10
votes
1answer
74 views

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} ...
9
votes
3answers
150 views

How to make or add options for packages or functions

I'm using at this moment the Piano Package. This Package is a little limited so I want to change a few things. The standard color of the dots is orange. I want to change this in different situations. ...
9
votes
3answers
425 views

Mutually exclusive options in packages

Is there a standard way to define mutually exclusive options in a package? Could someone provide a simple example? Currently I am mostly intrested in LaTeX2e but it would be nice to see a LaTeX3 ...
9
votes
1answer
1k views

The kerning option of microtype

I wonder what the kerning option of the microtype package does? In the manual it says that kerning=true will give additional kerning. But how? Is this something that has to be specified in addition to ...
8
votes
2answers
223 views

Key Value option in package

I trying to write a package, and I'd like to specify whether there should be colour or not. I'd like to do: \usepackage[color=false]{foo} and have this set \RequirePackage[color=false]{hyperref} ...
8
votes
2answers
439 views

Loading package twice with \RequirePackage causes “option clash”

I thought that loading a package twice with the same options cannot lead to option clash, still I get a clash in the following simple example: \documentclass{article} ...
8
votes
1answer
115 views

Compare \CurrentOption with a string

I encountered a problem that I want to compare the \CurrentOption with a string. In the .tex file I have a code below. \usepackage[en-ver]{cufestatletter} Then I want to use \ifx to determine ...
7
votes
2answers
227 views

How can I stop the “setspace” package from processing a “doublespacing” documentclass option?

LaTeX does not behave as I expected with the following files. First file: \documentclass[doublespacing]{article} \usepackage{lipsum} % for dummy text only \begin{document} \lipsum \end{document} ...
7
votes
1answer
368 views

Disabling the draft option in a package

Within a package I'm making, I want ignore the default draft behavior and write my own. I have tried: \DeclareOption{draft}{ MYCOMMANDS ... \OptionNotUsed } \ProcessOptions If draft is used, my ...
7
votes
2answers
466 views

Different types of Blackboard Bold in the same document

I am using mtpro2 package and it has 7 (!) different options for the Blackboard Bold (BB) to choose from. However only 2 of them provide BB version of Greek letters. And in both cases the result is ...
6
votes
2answers
575 views

“Double use” of a4paper (geometry/KOMA)?

In my preamble, should I give the a4paper option just once or twice, i. e. once for the KOMA-script document class (scrartcl) and once for geometry? Is this redundant or does scrartcl need the option ...
6
votes
1answer
133 views

Where to get help for the package options?

OS: Windows 7 + SP1 TeX: MiKTeX 2.9 IDE: Kile 2.1 For getting help on usage of package options, I usually Google "foo options latex", where foo is the name of the package. I wanted to know whether ...
6
votes
2answers
108 views

Using option for sty file

I would like to create and option (namely grid) to my sty file to produce a grid covering the whole page. I had success using \newif\if@sigur@grid \DeclareOption{grid}{\@sigur@gridtrue} and using ...
6
votes
2answers
79 views

Passing an if-else option to a custom sty file

I have a custom .sty file loading needed packages and defining some commands and environments. Is there an easy way to either: define an if-else option define option's default value I am using the ...
6
votes
1answer
44 views

In \DeclareStringOption, what is the difference between <init> and <default>?

In the kvoptions package the following macro is defined: \DeclareStringOption [⟨init⟩] {⟨key⟩} [⟨default⟩] Following is the related documentation: A macro is created that remembers the value ...
6
votes
1answer
142 views

Nested parameters lost when generating new macros from package options

I've created a package which I would like to take in options and turn these into new macros (one new macro for each option). I also want these new macros to produce new macros in turn. For example, ...
6
votes
1answer
56 views

Expand package option, to make contained character math-active

In an answer to another question of mine, egreg posted code, which activates a character in math mode and gives it the function of \operatorname. Now I want to put this into a package and set the ...
6
votes
2answers
660 views

Pass keyval string option to babel

How to pass a keyval string option given to my package to babel? I load my package with \usepackage[languages={ngerman,english}]{mylang} In package mylang I want to handle this optional languages ...
6
votes
0answers
56 views

Appending options to hyperref

I am trying to append options to hyperref inside a package (say append.sty) I'm writing. More precisely, in the package I load the hyperref package and I tune it: ...
5
votes
2answers
93 views

Passing Options to Unknown Class

My goal is to process a LaTeX tex file with the draft option enabled for the document class, but from a terminal without having to edit the tex file or even open it to look at what class is being ...
5
votes
1answer
226 views

pass xkeyval option to class

I have read about passing options to classes in this thread, but do not understand what I'm doing wrong. My class is defined like so, using xkeyval and based on memoir. \NeedsTeXFormat{LaTeX2e} ...
5
votes
1answer
119 views

Changing the optional argument of a package at some point in the document

Is it possible to change the optional argument from <option 1> to <option 2> (given to a loaded package <package> via \usepackage[<option x>]{<package>}) at an arbitrary ...
5
votes
1answer
115 views

Handle class options in the order they're given

How can I pass options of my package in a specific order to another loaded package? \ProvidesPackage{L10n} \DeclareOption{english}{\PassOptionsToPackage{\CurrentOption}{babel}} ...
4
votes
1answer
299 views

Hyperref options

Consider the following two MEWs: \documentclass{article} \usepackage[colorlinks=false,pdfborder={0 0 0}]{hyperref} \begin{document} Click \href{http://www.latex-project.org/}{here} to go to the ...
4
votes
1answer
3k views

Option clash when using graphicx and tikz packages

The following code fails Option clash for package graphicx, it seems to be an incompatibility between the package graphicx (when the option pdftex is used) and the package tikz. ...
4
votes
1answer
62 views

Can one set global numberlike in thmtools?

I want all of my theorem-like environments to be numbered as if they were all theorems. Using thmtools I can do this with code like this: \usepackage{amsthm} \usepackage{thmtools} ...
4
votes
1answer
109 views

How do I add an option that sets a flag to a document class?

I want to add an option that sets a flag to a document class. That is, I want to be able to type \documentclass[foo]{class} and get one type of behavior, and type \documentclass{class} to get a ...
4
votes
1answer
78 views

Spaces in pfgopts options

Is there a simple way to allow spaces in the options of a package using pgfopts to process them, which is local to that package i.e. I don't have to include some package in the main document before ...
4
votes
2answers
92 views

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 this ...
4
votes
1answer
57 views

Treat floatbarriers like page borders?

When I use the figure environment I like using [bt] options. I now have subsections acting as floatbarriers (using the extraplaceins package), and [b] / [t] does not work due to my restraining ...
4
votes
0answers
135 views

Creating a dependency tree (\RequirePackage) for packages used in my document

Is there a way of creating a dependency tree for packages \RequirePackageing each other for those packages used in my document, ideally with the respective required options and version numbers? Are ...
3
votes
2answers
450 views

How to outsource \hypersetup to an external file?

I use the hyperref package and defined custom settings as follows: \usepackage{color} \usepackage[dvipsnames]{xcolor} \usepackage{url} \usepackage{hyperref} \hypersetup{ bookmarks=true, ...