Questions tagged [kvoptions]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
58 views

How to reverse Latex 2021-06-01 Update? => kvoptions error

I am working with my university's template and everything was just working fine, till I updated all Packages in MiKTeX automatically. Just after this update I get this warning (I have never had this ...
2
votes
0answers
22 views

Forwarding a kvoption DefaultOption to a StringOption

I want to use kvoptions for a package, with a string option, and I want unknown options to be used as values for that string option. Like this: \ProvidesPackage{kvo}[2020/10/20 v 0.01 playing with ...
0
votes
1answer
49 views

Usage of string value in kvoptions

I followed the sample of Heiko with very excellent explanation about his approach of my request. Since my main idea is to have as well a subtitle I'm little bit stuck why the ˋsubtitleˋ is not set - ...
1
vote
2answers
124 views

Is this a correct way to handle Boolean options?

In trying to get a better understanding of kvoptions I have the following minimal example package and document. In the package, I construct a new macro command based on the logical states of three ...
0
votes
2answers
71 views

Weird 'ProvidesPackage' vs 'newenvironment' macro expansion

currently improving an existing package ('ditaa', based on ditaa0_9.jar) to add support for svg (implemented in ditaa-0.11.0-standalone.jar) yet I'm facing strange macro definition/expansion. ...
0
votes
3answers
68 views

kvoptions not working in a package setup command

I have a short demo using kvoptions to provide package options at load time. I wanted to experiment with a package setup command and found that removing the options from the \usepackage{kvtest} ...
0
votes
0answers
43 views

How to achieve local class options?

I am writing a custom class and want to use some option keywords (such as draft) that are also shared by some packages that I need to import, which leads to unintended results. This is because, by ...
0
votes
0answers
36 views

Unused global options with custom class and kvoptions

I'm trying to make a custom latex class that dynamically can load a different base class. I've got that working so far but I'm getting the warning LaTeX Warning: Unused global option(s): [baseclass=...
1
vote
0answers
55 views

Font selection using key=val in custom article class

I am writing a simple class based on article that loads some commonly used packages and sets some defaults. The document font should be a key=value option \documentclass{myarticle}. For example, font=...
0
votes
0answers
439 views

Package 'kvsetkeys' error Undefined key {family} [duplicate]

While compiling my document, I am getting the following error message. I updated my packages and especially, kvsetkeys and kvoptions packages. Kindly guide me how to fix this. \documentclass[12pt,...
1
vote
0answers
40 views

Class wrapper: Why “unused global option(s)” warning

I am trying to write a wrapper around some documentclasses as a small test. Everything works so far, but why do I get an LaTeX Warning: Unused global option(s): [math=true,tikz=true,base=normal,type=...
2
votes
2answers
59 views

Package minted Warning: Unexpected value for option `chapter'(minted) is ignored on input line 77

I am importing minted like this: \documentclass[english,12pt,a4paper,twoside,chapter=TITLE,section=TITLE,]{abntex2} \usepackage[newfloat,chapter,outputdir=setup/cache]{minted} \begin{document} Hi. \...
2
votes
2answers
43 views

Get an error, when passing bool variable in my own style file

I wrote a package to customize my footnotes. For now only one feature matters: I want to give a bool parameter to change the font of my footnotes. The style file looks like this: \NeedsTeXFormat{...
1
vote
1answer
146 views

How negate value of Boolean option in package using kvoptions

In the package created by the following source, how can one change the value of \optB to true if \optA is true — so that the message written to the log would become >>> optB is true ...
0
votes
2answers
206 views

Passing boolean key value from one package to another with kvoptions

The source document below first writes two packages, each using keys and kvoptions; the first package passes a boolean option to the second and calls the second. Despite the preamble line \...
2
votes
1answer
218 views

Using key option to package that uses string cases

What's wrong with the following package and source file? I get an error at line 14, after [Other], of mypackage.sty, and a "Missing \begin{document}" error resulting. The source: \documentclass{...
2
votes
1answer
139 views

Incompatibility between kvoptions and babel

I'm using kvoptions in my document class and it's worked nicely so far, but after a major rewrite I started getting strange errors that I was able to trace back to the babel package. MWE: %% myclass....
1
vote
1answer
140 views

Query beamer document class option aspectratio in a .sty file

I am writing my own latex beamer style. I want to use different background graphics depending on the aspect ratio chosen in the documentclass in the main file, like \documentclass[12pt, aspectratio=...
2
votes
1answer
782 views

Error “\RequirePackage or \LoadClass in Options Section” in document class

I tried to make a document class out of a LaTeX document (that was generated from the default Pandoc LaTeX template, just FYI). The document compiled perfectly with XeLaTeX but I can't get the ...
1
vote
1answer
84 views

How to test if a macro's value (set via kvoptions in a package) is empty or blank (e.g. using etoolbox)?

I have no idea, why this test fails and how to get it to work: \documentclass{article} \usepackage{filecontents} \begin{filecontents}{myTestSty.sty} \NeedsTeXFormat{LaTeX2e}[1994/06/01] \...
1
vote
1answer
401 views

Conflicts with existing macro when using kvoptions: Undefined control sequence

I am trying to use kvoptions pacakage to allow passing key options to my style file. Here is a MWE of the style file: \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{test} \newcommand{\rtitle}{TITLE} \...
2
votes
1answer
356 views

What’s the equivalence of \ExecuteOptions when kvoptions is used?

Consider the following short .sty package: %% This is file `mypackage.sty' \NeedsTeXFormat{LaTeX2e}[1997/06/01] \ProvidesPackage{mypackage} \DeclareOption{myoptionone}{Do something} \DeclareOption{...
3
votes
0answers
347 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 ...
3
votes
3answers
61 views

Passing macros as kvoptions to listing package commands does not work

I would like to save chosen listings style to a variable \mlstyle and use it later in some commands or definitions. However, while: \lstinputlisting[style=Matlab-editor]{a.mat} a version that I ...
2
votes
0answers
91 views

Can pgfkeys be used to create nested key hierarchies

I currently have the following following setup (but with many more keys), which works, but isn't as clean as I'd like it. \pgfkeys { /title/.is family, /title, first/.estore in = \title@first,...
1
vote
0answers
873 views

Require Package Options

I would like to create a sty file that sources another custom sty file. I have all files in a directory /home/Desktop/Common/Latex/LatexSetup. I have tried the following code, which fails. \...
1
vote
0answers
126 views

How to choose the right options/key-value package? [closed]

I want to spruce up my department's thesis document class with better / less idiosyncratic class options support. So, I've noticed this community wiki question: A big list of every keyval package ......
0
votes
0answers
70 views

How can one use macros to define colors?

I want to write a package which may be loaded with key-value options that are meant to be used to define colors by means of the package xcolor. The package kvoptions is to be used to facilitate the ...
2
votes
1answer
270 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 ...
2
votes
1answer
92 views

Special characters in kvoptions (like \\)

I try to write a little package for my personal use. For this I use kvoptions. Now I have to give a string to one of the options which contains \\ but this fails with: undefined control sequence. \let ...
1
vote
1answer
66 views

Integrate package into main document

My document uses (via \usepackage) a non-standard local package, that I have written. The document has to be uploaded to a publisher, and apparently they do not offer a way to upload the package as ...
3
votes
2answers
961 views

Unused global options in custom class [duplicate]

Consider the following example class file \NeedsTeXFormat{LaTeX2e} \ProvidesClass{myclass} \RequirePackage{kvoptions} \DeclareBoolOption{foo} \ProcessKeyvalOptions* \ifmyclass@foo \def\@title{foo} ...
2
votes
2answers
517 views

Can I use kvoptions - DeclareStringOption with Spanish characters?

I've just discovered kvoptions package to pass options to my sty file. I want to pass the title of the document but it contains Spanish characters (á,é,í,ó,ú) and it can't be rendered well. I use this ...
4
votes
1answer
151 views

Are dynamic defaults possible with kvoptions?

I'm writing a package with two options; one of the defaults should change, depending on the other option. Currently, the definitions are: \SetupKeyvalOptions{family=gitlog,prefix=gitLog@} \...
7
votes
2answers
745 views

Evaluate strings of key-value option in custom package by using a switch-case environment

I'm trying to write a custom package MyUnicodefonts where I'd like to store all my font settings for various math fonts and roman fonts (later also mono and sans). In my document I intend to choose ...
1
vote
1answer
342 views

Spaces and commata in StringOptions (as possible in hyperref)

I want to write a little documentclass which can be used with options, e. g. \documentclass[title=a]{xyz} In order to do this, I wrote in the xyz.cls \RequirePackage{kvoptions} \SetupKeyvalOptions{ ...
0
votes
1answer
124 views

Get the list of all options and parse them in a loop (kvoptions)

I'm writing a small package and am using kvoptions to parse key-val options passed to it as: \RequirePackage{kvoptions} \SetupKeyvalOptions{family=my,prefix=my@} \DeclareStringOption[bar]{foo} \...
2
votes
1answer
884 views

kvoptions is missing from texlive 2014

I upgraded from texlive 2007 to texlive 2014 on my Mac OS X. Now source files that previously compiled fine give the error messages below. I looked at the previous question suggesting to do "tlmgr ...
3
votes
1answer
240 views

kvoptions declare local complementary options

Given the following declarations in a tst package using kvoptions \ProvidesPackage{tst} ... \DeclareBoolOption{abc} \DeclareComplementaryOption{cba}{abc} Which is the correct way of declaring both ...
5
votes
1answer
420 views

DeclareLocalOption of kvoptions does not work [closed]

Consider the following tst package: \NeedsTeXFormat{LaTeX2e}[2011/06/27] \ProvidesPackage{tst}[2014/12/01 v1.0 tst package] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \SetupKeyvalOptions{%...
5
votes
1answer
145 views

Conflict between tkz-fct and thmtools?

I'm using TeXLive 2014. Here's a MWE: \documentclass{article} \usepackage{tkz-fct} % Must appear before {thmtools} \usepackage{thmtools} \declaretheorem{theorem} \begin{document} \begin{...
1
vote
1answer
1k views

Getting “Unknown option” error with \DeclareStringOption in custom package

I'm trying to write a package for personal use that takes custom arguments as follows: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ZTPS}[2014/15/10 v1.0 Zach Taylor Problem Set] \RequirePackage[margin=...
1
vote
0answers
430 views

Migrating from xkeyval to kvoptions: how to retrieve \define@choicekey? [closed]

I'm in the process of migrating a class I wrote from xkeyval to kvoptions, mainly because I'd like to provide class options whose values could be list of comma separated values: \documentclass[...
4
votes
1answer
522 views

Unrecognized key-values

I try to implement a personnal class using key-value options (I am a beginner in that field). For exemple, I would like to specify the language (for babel package) with an option "langue=xxx" with "...
9
votes
1answer
1k 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: \NeedsTeXFormat{LaTeX2e}[1994/06/01]...
14
votes
1answer
2k 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 of ...
2
votes
1answer
919 views

kvoptions and conditional environment

I'm trying to create a package with a single option, which provides an environment, which behaves differently if called by latex or pdflatex XeLaTeX. I tried to use kvoptions, but I'm a little lost. ...
7
votes
2answers
1k 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 ...
3
votes
1answer
286 views

How do I prevent the beamer class from removing my global options

I'm currently writing a latex package (or actually a beamer theme, but apparently that makes no difference) and I want to be able to specify a few things using key-value pairs in the global options. ...
7
votes
1answer
719 views

Mark key-value class options as used

I have written a wrapper for the scrartcl class in the following way: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{mycls}[2012/08/23] \RequirePackage{kvoptions} \DeclareStringOption{title} \...