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.

Filter by
Sorted by
Tagged with
5
votes
1answer
261 views

What is the difference between \PassOptionsToPackage and inline options passing?

I have noticed that, for example, ClassicThesis config file uses this style: \PassOptionsToPackage{utf8}{inputenc} \usepackage{inputenc} instead of \usepackage[utf8]{inputenc}. What is the ...
2
votes
0answers
218 views

Setting up kvoptions with a setup command [closed]

The hyperref package (for example) provides a \hypersetup command where key-value options can be provided as an alternative to \usepackage[key=value]{hyperref}. I'm trying to do the same, using ...
6
votes
1answer
413 views

In IEEEtran, why does `fontspec` package automatically change the font type once loaded?

By default, the body text font for IEEEtran document class is like this: When I load fontspec package, the font type changes: What is the name of the new font? How can I retain the original IEEEtran ...
0
votes
0answers
310 views

Options with color package clash with acmart documentclass? [duplicate]

I'm trying to use a package that imports color with the dvipsnames,usenames options. Unfortunately, my document uses the ACM format, which appears to already import the color package with no options. ...
1
vote
1answer
99 views

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 ...
7
votes
2answers
245 views

Creating package options which are mutually exclusive and choosing a default

I want to automatize some of the code that I usually include to setup my theorem environment functionality into a package. So here is what I do to control within which counter my theorems are numbered:...
1
vote
1answer
144 views

Checking if certain package option is declared inside .sty

I'm writting a package in which the user may choose between three types of documents through declared options when issuing the \usepackage command: undergraduatethesis, technicalreport and ...
0
votes
1answer
470 views

'Unknown option' errors in custom package

I am playing around a little with creating a custom package for theorem environments and related functionality. Consider the following MWE: \RequirePackage{filecontents} \begin{filecontents}{test.sty}...
5
votes
1answer
867 views

key-value syntax in package options

I want to create a style file capturing my layout for theorem environments. In particular, I would like to pass an option to the package specifying the level of the theorem counter. So here is a ...
2
votes
1answer
66 views

Transfer all options of “geometry” to my package

In my package I need to use all of geometry package options, I can define one option landscape like this \DeclareOption{landscape}{ \geometry{landscape} } \ProcessOptions\relax My hope is ...
1
vote
0answers
116 views

Pass a list of package-options to a self-written documentclass using l3keys2e

I am writing a documentclass which loads several packages as default. I want to give the user the possibility to pass options to these packages using an documentclass option. Because most packages ...
2
votes
1answer
50 views

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 \...
1
vote
1answer
220 views

option newlinetospace in titlesec not working?

This is the mwe showing the issue. % !TeX program = lualatex \documentclass[9pt, twoside]{extbook} \usepackage[utf8]{luainputenc} \usepackage[T1]{fontenc} \usepackage{lipsum} % fancyhdr -------------...
2
votes
1answer
203 views

pdfpages, calc and moactitlepage conflict

I am unable to use the package pdfpages because it creates a conflict with another package i am using (moactitlepage) that i can't find documentation for. I'd like to find a way to use both together. ...
4
votes
1answer
147 views

Setting default values for LaTeX3 keys

I've written the following code for setting values of a key as part of a package I'm working on, and for some odd reason the default doesn't seem to work. When the package this is part of is specified ...
2
votes
2answers
2k views

How to declare several options for a package

I'm writing a package and already added two options with \DeclareOption. Then with \ExecuteOptions I set the default option. This works really well, but now I have to add a second option type and this ...
5
votes
2answers
538 views

Multiple arguments for modules in LyX - Importing algorithms2e with multiple options in LyX

I want to use the algorithm2e package in LyX (version 2.2.3). There is a LyX module that makes this task simple. However, I would like to adjust the arguments with which the package is imported. The ...
1
vote
1answer
61 views

What is paxcommands?

I've been writing my own class and all the tutorials I've found use the following command to handle font options: \DeclareOption{sansserif}{ \PassOptionsToPackage{\CurrentOption}{paxcommands} } ...
5
votes
2answers
101 views

How to detect whether a package supports an option, or not?

I'm working on a customised report class, aimed at technical documentation in our company. Among other bells and whistles, I'd like to use the "lmodern" package with the "lighttt" option preferably. ...
3
votes
0answers
380 views

Can the optidef package accommodate breaking a long constraint?

The optidef package accommodates breaking a long objective function using the \breakObjective command (documentation section 9.9). I have a constraint that is too long. The workaround below uses \...
2
votes
1answer
252 views

Can't add to table of contents (using cuisine package, memoir class)

According to package documentation, adding "contents" as an argument should add the recipe titles to the TOC, but it's not working. \documentclass[11pt, a4paper, openright]{memoir} \usepackage[utf8]{...
1
vote
1answer
56 views

Producing multiple PDFs with different package options called

I write my worksheets with a package \usepackage{handout}. The package has a few options [solutions], [teachingnotes], [nospace]. I was wondering if there is a way to set up my compiler to produce ...
1
vote
2answers
757 views

Bad mathchar with semantic package

I get the following error message when using the semantic package: ! Bad mathchar (32768). <to be read again> \relax l.13 \begin{document} The problem goes away if I ...
3
votes
1answer
337 views

Resetting RequirePackage arguments in class, allowing subsequent usepackage call

How do I allow someone using my custom document class to \usepackage some library that I've already \RequirePackage'd with specific options? Optimally, when they call \usepackage, it would operate as ...
2
votes
1answer
575 views

Declaring a Default Option in custom style

I'd like to create a style file that lets me choose between two versions of a document, one that contains identifying information and one that does not---is "suitable for blind review". My idea is to ...
0
votes
0answers
817 views

Unknown option keeplastbox for package `flushend`

I'm working with a fresh install of MiKTEX and TeXstudio on a new Windows computer. On my other computer I can compile my article without error. But on this new computer, I get the error: Unknown ...
2
votes
1answer
166 views

Verify that option was set

Based on this answer I'm able to verify that an option was set to specific values. But how do I verify that an option was set in case the actual value doesn't matter. I.e. how do I make sure an option ...
1
vote
1answer
167 views

Variable-like options in a package

I turned my most used packages and macros and environments into a package (and defined options for some). There is one thing I could not figure out. Say I have this environment definition in my custom ...
3
votes
1answer
207 views

Why does biblatex not process global options

For some reason biblatex doesn't seem to be reading global options. The following tex file produces a single citation, but not in the authoryear style. If I uncomment the PassOptionsToPackage line, it ...
5
votes
0answers
192 views

Issues with grffile passing options to graphicx (draft/final)

I’ve been trying to set draft mode globally on my document, but I still want \includegraphics to work normally, so the graphicx package should receive the final option. I’m also using the grffile ...
1
vote
0answers
491 views

Correct way to pass options to (class) loaded packages

I write a document with the book class and have a file (mainstyle.sty) with a number of packages that I use (pdfx, lipsum, placeins, etc\ldots). I recently started playing around with tufte-book and ...
4
votes
2answers
265 views

pgfkeys with multiple values for a class option key has incompatibilities with some packages

Like discussed on the chat TexAndFriends, I'm currently adding the ability to define languages in my own class file. Here is my minimal (non working) example. My class file with the packages I'm ...
2
votes
1answer
391 views

Add an new option to a package

I have made a package called byzantinemusic( see https://www.ctan.org/pkg/byzantinemusic) One could use this package to write music in modern byzantine notation using the command \usepackage{...
1
vote
2answers
385 views

Can not load biblatex with options

it seems that I cannot load the biblatex package with initial options: \usepackage[ style=alphabetic, backend=biber, date=long, dateabbrev=true ]{biblatex} this gives me the following errors ...
2
votes
2answers
2k views

Biblatex using polyglossia language setting

I noticed biblatex uses the language option passed to polyglossia first, before acknowledging the option passed to it via the language = <language> option. Here is the MWE that illustrates the ...
5
votes
2answers
163 views

Giving numerical value to a package

I am playing around with making a package for some of my LaTeX commands and environments. The problem I am encountering is that the package will need to take a numerical value, which have a default ...
5
votes
1answer
140 views

Why does using a lstset option in usepackage command make pdflatex not terminate?

Question Why does passing a wrong (as in non-existing) option to listings upon package loading result in a non-terminating pdflatex run, instead of - say - a simple error message? Background ...
1
vote
2answers
4k views

MikTeX: Package installation repair

I was compiling a TeX file with marvosym package - which was not installed in my computer. When it was automatically attempting to install the marvosym package, I force closed the program thinking ...
5
votes
1answer
1k views

Help with Options in MIT Poker Package?

I'm trying to write a paper for university and it involves using poker cards in latex. I'm using the Poker MIT Package: http://web.mit.edu/foley/games/Arcadia/sr/poker/poker.sty provides the poker....
5
votes
2answers
3k views

passing the extension to \includesvg - damned if you do, damned if you don't

I'm trying to use the svg package, for some svg files I have in a graphics/ subdirectory. My includegraphics command used to be: \includegraphics{graphics/foo.png} Now, if I write: \includesvg{...
2
votes
1answer
735 views

“Extra \fi” error when defining mutually exclusive package options with conditionals

I have been trying to create a package, which loads the babel package and sets the language with an option. I've been getting strange errors when trying to define mutually exclusive package options, ...
7
votes
2answers
18k views

Package xcolor Error: Undefined color `ForestGreen'

I am using the following packages in my files Latex sources: \usepackage{color} \usepackage[table,xcdraw]{xcolor} \usepackage[usenames, dvipsnames]{color} \newcommand{\ricardo}[1]{\colorbox{...
18
votes
1answer
737 views

Is there a reason for \usepackage with options in a separate line?

I understand that these two commands do the same thing: \usepackage[letterpaper, landscape, margin=2in]{geometry} and \usepackage{geometry} \geometry{legalpaper, landscape, margin=2in} Is there ...
2
votes
1answer
259 views

\@ifpackagewith doesn't behave as I expected with global options

When I compile the following code, I expect a "Yes" but I get a "No" instead. Is there something subtle going on or is my method for checking wrong? If so, how can I see which options have been passed ...
10
votes
3answers
596 views

When/How should a class load biblatex

I would like to write a custom class that loads the biblatex package, but I am having trouble with option clashes. For example, the following MWE gives me an error % arara: pdflatex % arara: biber % ...
1
vote
0answers
153 views

Using the dvi2tty package

I want to convert a .dvi file using dvi2tty but I don't know how. I downloaded the dvi2tty package, which contains only some .tex files and other extensions, and I can't see from where to start. Could ...
7
votes
2answers
9k views

algorithm2e - override defaults

I'm using using algorithm2e package with the following settings: \usepackage[ruled,vlined,linesnumbered,noresetcount]{algorithm2e} But for some subset of algorithms in the same document, I want to ...
3
votes
1answer
122 views

Can't pass \ in option to package processed with xkeyval - TeX capacity exceeded

I have a test package that uses the xkeyval package to process options. The package works when I pass an option value that does not have \ in it but when I pass yy=\tiny I get ! TeX capacity ...
3
votes
1answer
598 views

Updating from an old enumitem package - Lubuntu

I've installed Texmaker on my netbook running LXLE (built on Lubuntu 12.04) and when I tried to compile a file I'd been working on with Texmaker on Windows, I get an error saying: Unknown option ...
9
votes
2answers
2k views

Set biblatex options after loading

I use biblatex with the following call: \usepackage[style=authoryear, mergedate=false, maxcitenames=1, mincitenames=1, maxbibnames=999, minbibnames=999, uniquename=false, uniquelist=...