Skip to main content

Questions tagged [pgfopts]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
2 answers
94 views

Difference betwen .is family and .cd in pgfkeys in the context of package writing?

I am using pgfopts to create my own packages and handle options. .family and .cd can be used to group the package options together, but I am not sure to understand the pros and cons of each approach, ...
Vincent's user avatar
  • 5,327
1 vote
1 answer
44 views

Mixing package options and family options?

The question I am asking here is a follow-up to the question Macros to change pgfkeys package options on the fly and define custom sets of options. I was used to specify package options using the ...
Vincent's user avatar
  • 5,327
1 vote
1 answer
33 views

Initial style definition before and after ProcessPgfPackageOptions?

The following great post, provides the following answer to a question about managing package options: https://tex.stackexchange.com/a/707285/17200 \begin{filecontents*}[overwrite]{mypackage.sty} % ...
Vincent's user avatar
  • 5,327
1 vote
2 answers
74 views

Macros to change pgfkeys package options on the fly and define custom sets of options

Consider the following code for a package : % Preamble \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{mypackage}[2024/01/01 MyPackage] \makeatletter % Dependencies \RequirePackage{pgfopts} \...
Vincent's user avatar
  • 5,327
2 votes
2 answers
156 views

can l3keys process multiple 'submodule'?

I would like to know if I can use l3keys to process multiple submodules as pgfoption can do ? Here is a MWE to illustrate my question: a package file mypkg.sty (containing in comment the error I get ...
R. N's user avatar
  • 1,138
0 votes
1 answer
52 views

Unable to pass options to \LoadClass{book} when using pgfopts for my own class

I'm writing a class for a course guide, and basing it on the standard book class. Following the answer by egreg to Passing (just) other options, when using pgfopts, I started working on my own class. ...
GTK's user avatar
  • 1,510
0 votes
1 answer
44 views

Trouble writing new package for a numbered 'tcolorbox' style with option for 'number within'

I am writing a new package to define a numbered box style (using tcolorbox) that I use in multiple documents. I want to take the numbering convention of the box as a package option. By default, I want ...
Zxcvasdf's user avatar
  • 1,745
4 votes
1 answer
89 views

Why \ProcessPgfOptions from "pgfopts" parses not only the options of my package?

This is my foo.sty package: \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{foo} \usepackage{pgfopts} \pgfkeys{ /foo/.cd, anonymous/.store in=\fooanon, } \ProcessPgfOptions{/foo} \endinput This is the ...
yegor256's user avatar
  • 12.2k
4 votes
2 answers
76 views

How to robustly test if a macro has not been set yet via pgfkeys?

I am trying to define a newcommand \ifempty that takes three parameters: A macro that has been tied to a pgfkey via /.store in OR /.estore in What to do in case this macro has not been set yet (is ...
Vincent's user avatar
  • 5,327
1 vote
1 answer
66 views

Pgfkeys associated with macros lead to unexpected results

Consider the following class: % CLASS % Preamble \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesClass{myclass}[2022/10/11] \LoadClass[varwidth]{standalone} \makeatletter % Pgfoptions \RequirePackage{...
Vincent's user avatar
  • 5,327
0 votes
0 answers
27 views

Test if a package option defined through pgf is empty

I would like to branch on package/class options defined through the pgfopts package. Here is an example : % CLASS % Preamble \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesClass{myclass}[2022/10/01] \...
Vincent's user avatar
  • 5,327
1 vote
2 answers
79 views

Mixing traditional class options and pgfoptions?

I am trying to mix pgfopts with more classical options to make a custom class. The idea is that classical options would be here to provide predefined behavior, while pgfopts options would be here to ...
Vincent's user avatar
  • 5,327
0 votes
1 answer
46 views

Should loading a package with no options behave the same as calling a macro with no options using pgfopts and pgfkeys?

This is a followup to my previous question Why does pgfkeys .initial not work in these cases?. In that question I created a macro with a key-value interface using pgfkeys and it works perfectly. Now, ...
LaTeXereXeTaL's user avatar
1 vote
1 answer
63 views

Why does this pgfopts example using ".is choice" not work?

I'm trying to get this trivial proof of concept demo of pgfopts to work and I keep getting inconsistent results. I have another version working in which the keys are handled with an .is if handler and ...
LaTeXereXeTaL's user avatar
3 votes
1 answer
158 views

Passing formatting options in pgfkeys using pgfopts

I am trying to design packages and handle package options using pgfkeys through the pgfopts package. However when an option include a formatting command, the whole thing fail and I don't get the ...
Vincent's user avatar
  • 5,327
1 vote
1 answer
117 views

pgfopts .unknown does not handle key-value pairs?

I would like my custom class to forward unknown keys to the base class, or in this case, a package. The following works (to make the example smaller, this forwards only one key; expanding it to a ...
Betta George's user avatar
3 votes
3 answers
206 views

How to execute default option when using pgfopts?

I would like to define options for a package using pgfopts. So far it works quite well, but I can't figure out how to execute default options. This is described here: How do you define a default ...
carlosvalderrama's user avatar
2 votes
1 answer
397 views

Conditionally add options to tcolorbox highlight math style

I have defined the following package: % Configuration \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{eqbox}[2018/01/01 Boxed Equations] \RequirePackage{xcolor} \RequirePackage{pgfopts} \...
Vincent's user avatar
  • 5,327
3 votes
1 answer
211 views

Using pgfopts to set up a tcolorbox style

Consider a package file eqbox.sty: % Preamble \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{eqbox}[2018/01/01 Boxed Equations] % Packages \RequirePackage{xcolor} \RequirePackage{pgfopts} \...
Vincent's user avatar
  • 5,327
3 votes
1 answer
214 views

How to use equal sign inside class option with pgfopts [duplicate]

I've created a custom class with key-value options using pgfopts. So far this is working fine. Now I would like to create a key which can take a random string including equal sign and comma. The ...
faltfe's user avatar
  • 519
2 votes
2 answers
1k views

Beamer theme pass options to inner/outer theme with pgfkeys

I want to design my own beamer theme and I have split the theme into inner and outer theme. The outer theme can take some options. So basically, I want to be able to write \usetheme[some options]{...
Laurent's user avatar
  • 57
2 votes
1 answer
190 views

Help needed for setting key-val options for my package

I want to use key-svalue options for my package and I tried a solution with pgfopts. It must be possible 1) to load the package with e.g. \usepackage[colors=1]{mypack} 2) to change the color ...
Jack's user avatar
  • 1,137
1 vote
1 answer
75 views

Define a required option with pgfopts

I would like to define a required package option with pgfopts. So far I've done the following: \begin{filecontents}{\jobname.sty} \ProvidesPackage{\jobname}[2018-01-24 v1.0 Test package] \...
faltfe's user avatar
  • 519
2 votes
1 answer
66 views

pgfopts: no expansion expected

The following example \begin{filecontents}{myclass.cls} \RequirePackage{pgfopts} \pgfkeys{ /XXX/.cd, foo/.store in=\foo } \ProcessPgfOptions{/XXX} \LoadClass{article} \end{filecontents} % \...
rolfn's user avatar
  • 949