{key-value} is about packages and macros using the key=value syntax for named parameters instead of numbered parameters.

learn more… | top users | synonyms

1
vote
0answers
32 views

Reason not to use a specific key val package

According to the very nice list of packages concerning this topic (A big list of every keyval package) I am confused which package I should use now to be prepared for the future. Any ideas which ...
8
votes
1answer
60 views

Does expl3 key-setting syntax have an equivalent of TikZ/PGF's .cd?

This question has the following form: 'I know how to do X using Y. I can also do X using Z but not so elegantly as using Y. Can I do X using Z in the same way that I can do X using Y, for a more ...
8
votes
1answer
39 views

How to convert the method to a key-value version?

I have been told a number of times now, that I should consider implementing a key-value version of my method \createPerson. I wan't to do this, but my problem is that I don't know how to go on with ...
5
votes
0answers
30 views

Is it possible to label (tag) a value of a (l3keys) key-value in order to reuse it elsewhere easily?

I have a command (\people[⟨options⟩]{⟨name⟩}) for entering people. Its optional argument lets the user specify possible people's (possibly multiple) attribute(s) with a (l3keys) key–value system: ...
10
votes
2answers
157 views

Misunderstanding from l3keys documentation

Based on the interface3 documentation and a nice article in TUGboat, Volume 31 (2010), No. 1 called Programming key–value in expl3 by Joseph Wright, I have been trying to put together a MWE that will ...
4
votes
0answers
59 views

How can I reliably and consistently save PGF keys filtered by path to a macro for later use?

I am trying to use PGF keys in TikZ with a relatively complex key tree. (Complex by my standards, that is - I'm sure it isn't that complicated in the scheme of things.) What I hoped to do is to ...
2
votes
0answers
32 views

How to import key words are areas latex reports from a list of values

I write long test reports. And generally i have a spreadsheet (xls) with all the relevant data regarding the tests. I would like to automatically include that data from excel throughout the report. ...
7
votes
2answers
99 views

user-defined markup aliases with l3

I would like to write a package providing semantic markup for scholarship in the humanities (loosely following TEI-XML). In the source code, users would use macros like \term for a foreign term or ...
2
votes
1answer
78 views

Can a command be defined to have key=value in it?

I am learning about making LaTeX commands. I thought that they were just macro, and the command is replaced literally by its definition. But the following example does not work and I wanted to ask if ...
5
votes
2answers
52 views

How can you force keys to display in a certain order?

I am building a catalog of items and would like to ensure that my fields always display in a certain order (for the sakes of argument lets us say in the order "Intentory Number, Weight, Diameter" even ...
3
votes
1answer
80 views

How do I remove keyval options from a template class?

I want to create a template class based on scrreprt.cls but with fewer options. Specifically, I need to restrict the font size to 11pt or 12pt (while still passing other options on to scrreprt.cls in ...
3
votes
2answers
121 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 ...
0
votes
0answers
36 views

Add key of enumerate (already defined by enumerate) in a new list

This is a follow-up question to Enumitem \SetEnumitemKey and conflict between multiple key before and after. Here is the code to set two keys, for a list named answers, without conflict (as it was ...
1
vote
0answers
33 views

Using key value in enumerate to another key value

This is a follow-up question to Enumitem \SetEnumitemKey and conflict between multiple key before and after. I want to use a key value in a list in the definition of another. Here I use a better ...
2
votes
1answer
57 views

Enumitem \SetEnumitemKey and conflict between multiple key before and after

I try to make life easier by setting key to list with the package enumitem. But, the options before and after seem to be in conflict when used more than once. Here is some code that show four ...
0
votes
0answers
54 views

Number format as optional key value argument for LaTeX function

I followed the answer as given in http://tex.stackexchange.com/a/34318/28093 in constructing a function which uses key values. It works fine, but I also want to be able to give the number format as ...
3
votes
1answer
93 views

How to configure complex options for graphics groups in LyX

I have a document with several images from a few different sources. I'd like to indicate different formatting options for each source. I understand I can use graphics groups for this, but I don't know ...
5
votes
1answer
87 views

Key names of the axis limits when not set explicitly

In the minimum working example below I use the keys xmin, xmax, ymin and ymax for calculations of coordinates for annotations. However, this only works when the axis limits are set explicitly in the ...
3
votes
1answer
37 views

Adding extra conditional to a sidenote command

Below is an adapted part of the code from the sidenotes package, which I intend to include in my class file. I'm trying to extend it with an optional argument [flip], with usage \sidenote[flip]{Text} ...
2
votes
1answer
283 views

How to get line width and inner sep values?

I try to get the values of line widths and node inner sep. How to read such a value form own style (if it will be specified during modifications of the picture) or if it is not specified in this ...
2
votes
1answer
21 views

Documentation for \newadjustboxkey

The documentation for package adjustbox has a brief section describing \newadjustboxkey, but it provides no examples. I tried searching the internet, but Google provided only three results for the ...
6
votes
1answer
87 views

Define \keys_filter:nnnN without modifying core functions

I would like to define a function \keys_filter:nnnN which would do the very same thing as \keys_set_filter:nnnN but without the setting. I realized that the setting is realized by a core function ...
1
vote
1answer
69 views

Short running title using xkeyval option

I will try to set the short running title using xkeyval package. But I don't how to execute this coding using the xkeyval option \title[shorttitle={Cross-linked aromatic polymers}]{Stabilized ...
6
votes
2answers
245 views

How to define macros in order to reuse key-value parameters?

I use the listings package to typeset code in my document. I have defined a new environment via \lstnewenvironment in which I use \lstset to set a large number of options through a list of key-values. ...
5
votes
2answers
112 views

A key-value side effect

In one of my macros, I wanted to set some width to either two-column or single column width. In other macros I do use key width, so I wanted to store the requested width in that key. So my first ...
4
votes
1answer
37 views

When are {} needed to surround a string in a keyval pair

I am using the package kvoptions and declaring various stringoption's. When do you need to embrace a string value when calling your package/class? E.g. In mypackage: ...
3
votes
3answers
89 views

Integer padding with something other than a zero

Consider the following example: \documentclass{article} \usepackage{siunitx,collcell} \sisetup{minimum-integer-digits=4} \begin{document} \begin{tabular}{S} {Header} \\ 1234 \\ 234 \\ 34 \\ 4 ...
7
votes
3answers
112 views

Defining default arguments for a macro?

Quick question, is there a way to define default arguments for a macro? For example, I have a page filled with these: \TextField[width=2cm,height=10pt,bordercolor=stuff]{Question 1} ...
3
votes
0answers
145 views

Beamer frame: add user options

I would like to add 2 more user options to \frame command. However, when calling \frame with both parameters at the same time in a specific order (the one with implicit value first), it generates an ...
1
vote
1answer
536 views

Unable to install keyval.sty

I have a minimal TeX Live installation in ~/texlive/2014. I was trying to install keyval.sty using tlmgr. So, I tried, tlmgr install keyval But it gives an error: tlmgr: package repository ...
1
vote
2answers
212 views

refstepcounter in tcolorbox option

I want to increment a counter and update the current label in the phantom key of the tcolorbox environment, but it is not working, as can be seen in the example below: \documentclass{article} ...
6
votes
1answer
112 views

How to pass figure position to keyval macro?

I want to wrap a macro around figure-env to make my document more readable. Here is minimal example of how it is now: \documentclass[10pt,a4paper]{article} \usepackage{keyval} \makeatletter ...
5
votes
1answer
84 views

pgfkeys computed (i.e., dynamically defined) key

I would like to perform some simple simulation in latex/tikz (in order to produce dynamical graphs). Say something like cellular automata, Ising model, etc. I need to store somewhere the value of ...
2
votes
0answers
56 views

Filtering key-value options

I want to define a new environment whose implementation depends on another environment. The first environment should accept a list of key-value options. Some of these options are for use only on this ...
3
votes
1answer
79 views

Accessing sub/keys with l3keys

I'm not sure if I'm taking it too far, but I think I've seen something like this around. This gives an error: \documentclass{scrartcl} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand \RULE {} ...
3
votes
1answer
100 views

How to add another optional option to the “printglossary” command?

I'm using the glossaries package to introduce my terms in my book. Now I want to add another option to the printglossary command named "column" as below: ‎‎‎\printglossary[‎‎column=X]‎% which X is ...
7
votes
1answer
388 views

Reading - and effect - of (default) tikz/pgf keys?

Consider the following MWE: \documentclass[varwidth,tightpage,border=1bp]{standalone} \usepackage{tikz} \pagecolor{yellow!15} % ignored with preview, but not w/ varwidth \begin{document} ...
3
votes
1answer
1k views

Backward compatibility of Beamer problem - Keyval error

I'm stuck with a problem for compiling a "not so old" beamer document I've made last year, and it seems that there is a big problem of backward compatibility between my new version of beamer (3.33) ...
6
votes
2answers
237 views

How can I force lstlisting to expand an argument?

I'm trying to use the listings package with a variable language (it's actually for a package). However, I can't seem to pass a macro as the value half of a key-value pair. Here's a simple example: ...
1
vote
2answers
1k views

Package keyval Error: sorting undefined

Even at the risk of being this question closed as too localized or a duplicate of this, I feel that it is relevant for people like me, using XeLatex and Biber for the first time... I am using Adrien ...
5
votes
3answers
404 views

\newcommand for tabular entries using keyval

I am trying to define a command for tabular entries using keyval. \documentclass{article} \usepackage{keyval} \makeatletter \define@key{tabularEntryKeys}{a}[\dots]{#1 & } ...
6
votes
1answer
141 views

Use choice key with choices setting booleans

When defining choice keys with l3keys2e there are two possible ways and I use the one with sub-keys in a new package. When defining watch each value should do interface3.pdf says that I can use .code ...
9
votes
1answer
430 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} ...
3
votes
1answer
229 views

Error while using 'author' option in 'todonotes' package

I am trying to use the author option in the \todo command provided by todonotes package. This is clearly mentioned in its manual. Following is the code snippet and the error it produces: Snippet: ...
2
votes
1answer
129 views

How can I change the syntax of showexpl's graphic key?

I'm trying to rewrite the option graphic from showexpl package, I have reviewed the source code showexpl.sty but, fail to find the modification, the package use keyval (or xkeyval) and listings for ...
4
votes
0answers
3k 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 ...
17
votes
2answers
270 views

Can I turn a collection of optional parameters into a macro?

I currently have several environments from mdframed that have a large number of options that are shared between them. The situation looks like \newmdtheoremenv[options0,options1]{env1}{Environment 1} ...
4
votes
1answer
189 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 ...
4
votes
0answers
69 views

Remove key from style

Is it possible to create a key handler with the pgfkeys package that removes a key from a style? Here's a minimal working example: \documentclass[preview,margin=10pt,convert]{standalone} ...
3
votes
1answer
142 views

How to define a function with optional key-value arguments [duplicate]

I have setup a function called quickfigure which has the purpose of inserting a centered image with a one-line command: \newcommand{\quickfigure}[2] { \begin{figure}[H] \centering ...