{xkeyval} is for questions dealing with additional macros for setting keys. This package is an extension of the `keyval` package.

learn more… | top users | synonyms

43
votes
17answers
3k views

A big list of every keyval package

I lose track of all the different keyval packages. Can we maintain a list here? (Community wiki, one package per answer with a brief description of scope. I've started things off but need help ...
21
votes
4answers
366 views

Does the order of specified key-values matter?

The following screen shot shows how the order of specified key-values affects the output. When using dx=\psPiH,xunit=\psPi. When using xunit=\psPi,dx=\psPiH. Minimal Working Example ...
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: ... ...
11
votes
1answer
136 views

Storing environment arguments by \immediate\write

As I have stated already in other questions I am writing a problem/solution package. There are many of them, for sure, I have made much progress, using it in 'everydays' productivity for my needs, but ...
9
votes
1answer
113 views

Working with keys instead of \def

I have looked around on TeX.SX and I have learnt a lot of things. One of the things I have not yet mastered is how to use the key=value function that packages like keyval or xkeyval offer or even ...
8
votes
3answers
728 views

How to write a class that accepts an optional key-value pair?

a user-defined class: \ProvidesClass{preview}[2012/12/15 v 0.01 class for creating a tight PSTricks diagram] \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} \ProcessOptions\relax ...
7
votes
3answers
275 views

how to ``open'' the curly bracket in a macro?

In tikz, the macro \draw accept a optical argument of parameters separated with comma, e.g. \draw[->, red] (0, 0) -- (1, 1) I have a self defined macro, in which I want to pass a macro as this ...
7
votes
3answers
412 views

How to define a key=value that has an equivalent boolean value key

Assume you're defining a key=value align for some environment realign that you'll use in the following way: \usepackage{xkeyval}% http://ctan.org/pkg/xkeyval \newenvironment{realign}[1][] ...
7
votes
2answers
516 views

xkeyval: how to use default key value?

I am trying to use the xkeyval package to include key arguments in a new environment. It seems to work except for default values. Here's my best try so far: \documentclass{article} ...
7
votes
1answer
95 views

Splitting a CSV list from a xkeyval key argument into parts

Is it possible to store the key value argument (a cvs list) to a macro (via \def) and split/further process the content of that macro with \forcsvlist command from etoolbox package? I want to ...
6
votes
2answers
132 views

Using an expanded macro for optional environment argument

I'd like to open an environment, passing the content of a macro to the optional arguments. Up to now I tried different approaches using \expandafter, however I could not get the expected behaviour. ...
6
votes
2answers
110 views

etoolbox ifblank error with xkeyval

I am trying to create my first class, which is basically just my ordinary preamble with a set of options. These options are handled by xkeyval using the following syntax: \NeedsTeXFormat{LaTeX2e} ...
6
votes
1answer
80 views

Need help to understand xkeyval example

I found an "easy" example how to use xkeyval here using the following code: \ProvidesPackage{myemph}[2011/03/12 v1.0 a test package] \providecommand\my@emphstyle{\em} % Note that the argument must ...
6
votes
1answer
253 views

Do I really have to initialize xkeyval’s key manually?

If I define some (many) keys with xkeyval do I really have to initialize them to use them if the key is not set explicitly? \documentclass{article} \usepackage{xkeyval} \makeatletter ...
5
votes
2answers
111 views

Boolean key value in xkeyval fails

It is possible to hand over a boolean key value stored in a macro to a command such as \edef\SomeKeyValue{true}% \DummyCommand[DummyBooleanKey=\SomeKeyValue]%%% where DummyBooleanKey is a boolean ...
5
votes
1answer
234 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
84 views

Keyvalue argument and non key argument conflict

Many classes provide \part, \chapter, \section and even more deeply nested sectioning levels. All of them allow three forms of usage (I restrict for sake of simplicity to \section, it just stands ...
5
votes
1answer
2k views

xkeyval error: 'defernums' undefined in families

Relative noob in LaTeX, and I'm trying to adapt an existing (public) template (with attribution) to my own needs, and the first step is gutting all the project specific code and setting up the ...
5
votes
1answer
364 views

xkeyval declaring package option keys that are choice keys or boolkeys

xkeyval provides \DeclareOptionX which effectively defines a key like \define@key does but that can be used as a package option. How can I \DeclareOptionXs that behave like \define@choicekey or ...
5
votes
1answer
160 views

Generate xkeyval boolean keys 'on the fly'

I am not a TeX/LaTeX specialist, recently I wrote a package concerning 'problems' and 'solutions' which is intended to be displayed at the end of the document, however it is not restricted to that ...
4
votes
3answers
202 views

Using a macro evaluating to a set of xkeyval arguments as argument to another command

I am trying to code a macro that adds xkeyval arguments contained in a macro to a list of default xkeyval arguments. The following minimal example explains better what I want to do. ...
4
votes
2answers
92 views

Keyword command parameters with table (tabular)

I am trying to make a command with named (key-value) parameters to produce a table row. The reason is that table has more than 9 columns (command parameters) that will have position changed, be ...
4
votes
1answer
45 views

Providing optional key without value

I would like to prepare a macro with an optional argument like [wide], using xkeyval. (something whether to use \figure or \figure* inside) My test program below presents the output test0=false ...
4
votes
1answer
928 views

Strip one level of braces for using keyval-value within nested keyval

I have defined my own figure command using xkeyval and I want to pass arguments for the nested \includegraphics as one of its keyvalues (maybe I stripped too much code, but I hope you get the idea): ...
4
votes
1answer
50 views

How to parametrize tex processing using command line? [duplicate]

Unfortunately, I cannot write a better title for the question. I am trying to parametrize my workflow, where I will allow myself to override page margins from the command line with the following: ...
4
votes
1answer
69 views

How to make xkvview record keyreader defined keys?

Since keyreader is based on xkeyval i wonder if it’s possible to make it wokr with xkvview which comes with xkeyval. \documentclass{scrartcl} \usepackage{xkvview} \usepackage{keyreader} ...
4
votes
1answer
46 views

PSTricks package giving xkeyval error

I have been trying to solve this error by myself but did not find a way. So if someone out there can help me, any help is greatly appreciated! I use Texmaker to run MikTex 2.9. I want to use the ...
3
votes
1answer
213 views

Programming with LaTeX xkeyval

I have assigned to do the following task. Since I am not good at Latex I am wondered its possibilities. I would like to assign parameter while developing document. EX: file1.tex \chapter ...
3
votes
2answers
186 views

How do I define tikz styles with a xkeyval command?

I would like to write a command which allows the user to change tikz styles. My code goes like this: \documentclass{article} \usepackage{tikz,xkeyval} \makeatletter \def\DEFstyle{} ...
3
votes
1answer
224 views

How to define package options in a command (for reuse)?

I need some options of the listings package several times in my document. I am thus wondering if one can define (and later change) these options once somewhere in the preamble via a command/macro, for ...
3
votes
1answer
44 views

`xkeyval` key doesn't work for setting `fragile` option in beamer

I'm trying to set a custom macro to create frames in my presentations. However, when I tried to set the options I can pass to the frame using xkeyval the whole macro stops working. How can I pass the ...
3
votes
1answer
121 views

Passing arguments to a .sty-file - a specific case

After having plowed through (i.e. read and trimmed down the given examples in an attempt to apply them to my case) these documentations and guides: Implementing key-value input: An introduction The ...
3
votes
2answers
89 views

Resolve xkeyval key from a definition

How can I resolve an xkeyvalue from a definition? The code \documentclass{article} \usepackage{xkeyval} \define@key{mykeys}{foo}[foo-default]{\def\x{Key 'foo' does nothing}} ...
3
votes
1answer
45 views

Is there a way to provide a starred variant of a (xkeyval) boolean (class) option

I'd like to define, for a class I'm working on, two boolean keys rather similar and, instead of giving them different names, I'd like to let the latter be a starred variant of the former. Let me give ...
3
votes
1answer
128 views

Problem with package gmp (or with xkeyval?)

I use the "gmp" package which allows to insert MetaPost coding (placed inside an mpost or mpost* environment) in a LaTeX source file. In few words, it does approximately the same job as other packages ...
3
votes
1answer
47 views

Command with xkeyval keys from different families

As I stated in some other questions and on my profile page, I am writing a problem-solution package (I know, there are some of them already) I have used xkeyval package and my keys, but now, I want ...
3
votes
1answer
157 views

Enable and disable contents of \chapter command

I have large set of contents for the user. For a different user I would like to show different contents. For this I would like to produce different output by showing and not showing some of the ...
3
votes
1answer
77 views

TL update affects fixme handling of options?

A few hours ago, the following code worked fine (albeit in a larger document): \documentclass{article} \RequirePackage{xkvltxp} ...
2
votes
1answer
997 views

xkeyval error when I try to use fontspec and OpenType fonts in XeLaTeX

I can't seem to get XeLaTeX to load OpenType fonts using \fontspec. Section 4.2 of the fontspec documentation says that I need to load OpenType fonts by filename rather than font name, but when I ...
2
votes
1answer
54 views

Not getting xkeyval to work (as intended) for a simple custom command

I'm trying the use the xkeyval package to define a very simple command using keys. However, I'm utterly confused by its behavior, and the package documentation is not exactly helpful either. Here's a ...
2
votes
1answer
358 views

xkeyval gives error with siunitx on some LaTeX installations

\documentclass{article} \usepackage{siunitx} \begin{document} \SI[per-mode = fraction]{3.00e8}{\meter\per\second} \end{document} I've tested this on three different computers, all running ...
2
votes
1answer
333 views

xkeyval example does not compile

I have read the docs and the tutorial about kvoptions and xkeyval but I can not get my xkeyval example to compile. This is the error: ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or ...
2
votes
1answer
802 views

Chemstyle xkeyval error

I recently installed texlive-science from the Ubuntu repos and received the following error when I compile: ! Package xkeyval Error: `load-configurations' undefined in families `key'. LaTeX works ...
2
votes
1answer
134 views

xkeyval's \presetkeys

Please is there a way to avoid xkeyval package bombing out in endless loop, as implied by the following simplified case? \documentclass{article} \usepackage{xkeyval} \makeatletter ...
2
votes
0answers
25 views

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

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: ...
1
vote
1answer
1k views

Help with xkeyval crashing pax/pdfpages

I'm preparing a document, and after trying to load some of my self-made style files, it started crashing. It is apparently the same problem as in [texhax] latest xkeyval breaks pdfpages and ...
1
vote
0answers
28 views

How to allow curly braces in command option

I need to store an URL parameter like &path=weigth:5|color:orange|enc:okydHa}peAXOHi@jANv@A@kJJmFAiDJuAHmDXcBb@cC`@gC^_DV}CJaCF{APaBVkBdAyEf@qC`@{B\aDSwB with later reencoding to utf8 and passing ...
1
vote
0answers
421 views

basic beamerposter example, keyval error

I found a beamerposter example at this url: http://www-i6.informatik.rwth-aachen.de/~dreuw/latexbeamerposter.php The content suggests that a number of packages may be required, therefore, I use the ...
0
votes
0answers
20 views

Scaling title text in tikzposter-class

I'm unable to effectively scale the size of the poster title in the tikzposter class (v2.0). When defining my own titlestyle I set the titletextscale key, but it does not appear to have an effect. ...