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

60
votes
1answer
769 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
563 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. ...
20
votes
2answers
5k 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} ...
16
votes
1answer
970 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?
14
votes
3answers
3k 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: ... ...
14
votes
2answers
1k 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
3answers
6k 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 ...
14
votes
1answer
3k 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: ...
14
votes
1answer
497 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 ...
13
votes
2answers
255 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 ...
13
votes
2answers
193 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
3answers
4k 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 ...
13
votes
2answers
177 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 ...
12
votes
2answers
472 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
2answers
310 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
3answers
3k 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: ...
11
votes
1answer
538 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 ...
11
votes
1answer
377 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
1answer
90 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
159 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
484 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 ...
9
votes
1answer
95 views

xkvltxp gives keyval error in case of biblatex's options on multiple lines

A keyval error arises if both: xkvltxp is loaded biblatex is loaded with options on multiple lines. The following MWE shows this strange behavior: \documentclass{article} % \usepackage{xkvltxp} ...
8
votes
2answers
237 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
516 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
139 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
291 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
410 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
128 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 ...
7
votes
2answers
753 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 ...
7
votes
2answers
537 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
668 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
4k 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. ...
6
votes
2answers
116 views

Creating a custom character that automatically adjusts size in math mode? [duplicate]

After a lot of searching, I finally found the .pdf's for the elusive Griffiths script r character used in his ubiquitous undergraduate electrodynamics book. I made a simple package that allows me to ...
6
votes
1answer
148 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
1answer
182 views

'Unknown option' for my own package

I create a package: one common file that includes others. In common package file (russian_post.sty) I define options: \DeclareOption{times}{\@seriffalse} \DeclareOption{landscape}{\@lscapetrue} ...
6
votes
2answers
103 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
73 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
1answer
76 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
153 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
0answers
95 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
82 views

Is there a way to create a standalone folder/document with non standard packages?

I am working on an article which will be compiled on another machines (of somebody else). I don't want to depend on the other person to install missing packages. Is there a way to include them with ...
5
votes
2answers
109 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
237 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
2answers
177 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 ...
5
votes
1answer
53 views

Having multiple contradictory options, how to handle them?

Lets say you are writing a package, which has the usual pair of draft and final-mode. But how should I handle, if this package gets the global option final and the local draft? Consider the ...
5
votes
1answer
121 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
123 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}} ...
5
votes
2answers
98 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
402 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 ...