Questions tagged [xkeyval]

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

xkeyval is a package that extend the keyval package developed by David Carlisle and offers additional macros for setting keys and declaring and setting class or package options. This distribution also includes several additional packages like xkvview, xkvltxp, and pst-xkey.

137 questions
10
votes
2 answers

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…
Jay
  • 2,895
  • 2
  • 27
  • 38
8
votes
1 answer

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 be expandable, % or use xkvltxp package before…
Adam
  • 1,268
6
votes
1 answer

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 \define@cmdkeys{fam}[my@]{% fonta, fontb, % ... %…
Tobi
  • 56,353
6
votes
1 answer

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 \define@boolkey would? I've done the following, but it…
Seamus
  • 73,242
5
votes
1 answer

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 purposes. In order to achieve that behaviour,…
user31729
4
votes
1 answer

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 to write a wrapper command for some other…
user31729
3
votes
0 answers

How to define an option with two arguments?

I am writing a package in which I want to define an option myvalues in such a way that \usepackage[myvalues={10,11}]{mypackage} would execute \mycommand[10]{11} and \usepackage[myvalues=11]{mypackage} would execute \mycommand{11}. I know how to…
Glen Brown
  • 31
  • 1
3
votes
1 answer

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 chapter_name1 [arg1=true]or [arg1] file2.tex \chapter…
BusyBee
  • 123
  • 4
2
votes
1 answer

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 LaTeX Companion for explanation. Type H
2
votes
1 answer

why can't I set \columncolor via \setkeys?

I'm trying to create a new columntype with options as in the source below, and all option work fine, except for the b option, which gives this error message: ! Undefined control sequence. \KV@xcol@b #1->\columncolor …
2
votes
2 answers

How to make xkeyval accept a value containing both \par and a comma

I am writing a package and I would ideally like to save long stretches of code using the key-value mechanism of xkeyval. That is, I want to be able to say something like \setkeys{foo}{mytext={This is some long text, including…
2
votes
1 answer

Hyper link execution for each attribute

I am using authblk.sty and xkeyval.sty. I am using the link for each author. I needs to be execute the keyvalue code link={http://people/u/78814}. But i don't know how to control the authblk.sty file for each author links and execute the keyvalue…
CS Kumar
  • 1,253
2
votes
1 answer

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 MWE with what I wanted to achieve (expected) and…
hakoja
  • 325
1
vote
1 answer

How to declare a boolean switch with xkeyval?

I'm trying to write an aptly-named package xkeyvalisinsanelydifficult such that the user can \usepackage either as \usepackage{xkeyvalisinsanelydifficult} or \usepackage[turnedon]{xkeyvalisinsanelydifficult}, but (preferably, if possible) not…
1
vote
1 answer

! Package xkeyval Error: `frame' undefined in families `Gin'

I have this error in compiling the wiley template ! Package xkeyval Error: `frame' undefined in families `Gin'. The main file is as follow including the packages. Please guide me... %% Run LaTeX on this file several times to get Table of…
1
2