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

learn more… | top users | synonyms

4
votes
1answer
37 views

Ignore undefined key in argument (it's defined in the macro before it's used)

How can I make this macro initially ignore the undefined key fn-special-text in the second argument? It is defined within the macro (because the name is generated from the text of the first argument; ...
1
vote
2answers
87 views

Automatically generate new commands and keyval definitions

I would like to automatically define new commands and keyval definitions anytime that a command beginning with the prefix \fn is used within a string. Part I below is the stub that needs to be ...
2
votes
2answers
57 views

Pass a list to a keycommand or keyenvironment

I want to define command or environment using the keycommand package and pass a list to one key. In my case this would be a list of images. To be more explicit: How can I make the following ...
6
votes
2answers
116 views

How can I define a key-value command like \hypersetup?

I am quite familiar with switch (\if...\else...\fi) now and read many questions on key-value topic, but I cannot find an example to create the options listing command like \hypersetup, to make \...
4
votes
1answer
100 views

Best Key-Value System For LaTeX

I want to make new macros that support key=value style. But, there are many such packages for doing this. What is the best choice, given these priorities: Highly developed, complete, or actively ...
3
votes
1answer
53 views

Filling matrix rows with a user defined key-value macro

I'm trying to create tables with many columns and many empty fields. I'd like to reference the fields later as TikZ nodes to add more TikZ stuff around them, so \matrix{} looked like a good idea. I ...
0
votes
0answers
39 views

“Package Options” for a beginner

I have a custom package based on titlesecpackage: \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{blackenedtitles}[2015/04/03 Custom Titles Package] \RequirePackage{titlesec} \DeclareOption{...
2
votes
1answer
91 views

Get key value of command

i'm beginner in Tex and i have tex file \documentclass{article} \addtolength{\jot}{1em} \begin{document} \begin{verbatim} \end{verbatim} \begin{chestnutStem} In the following figure, if the ...
0
votes
0answers
59 views

New command to append endings on labels via \gls

The \gls-like commands of the glossaries package allow to append a text after the referenced label. In addition, the package includes the command \glsaddstoragekey to add additional informations to ...
2
votes
0answers
62 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
78 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
44 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 it....
5
votes
0answers
34 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
166 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
76 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
33 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
106 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
86 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 ...
6
votes
2answers
61 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
94 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
154 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
0answers
35 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
65 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 ...
3
votes
1answer
134 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
101 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
39 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} ...
3
votes
1answer
510 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 style,...
2
votes
1answer
23 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
90 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
93 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
267 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
118 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
40 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: \DeclareStringOption[defaultval]{...
3
votes
3answers
109 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
117 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} \TextField[width=...
3
votes
0answers
171 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
641 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 http:/...
2
votes
2answers
261 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
140 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 \define@...
5
votes
1answer
94 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
62 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
81 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
122 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 ...
8
votes
1answer
428 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} \begin{...
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
264 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
444 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 & } \define@key{...
6
votes
1answer
146 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
571 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} \...