Questions tagged [pgfopts]
The pgfopts tag has no usage guidance.
19
questions
0
votes
1
answer
35
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. ...
0
votes
1
answer
35
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 ...
4
votes
1
answer
78
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 ...
4
votes
2
answers
68
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 ...
1
vote
1
answer
60
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{...
0
votes
0
answers
24
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]
\...
1
vote
2
answers
67
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 ...
0
votes
1
answer
45
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, ...
1
vote
1
answer
57
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 ...
3
votes
1
answer
144
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 ...
0
votes
1
answer
107
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 ...
3
votes
3
answers
186
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 ...
2
votes
1
answer
368
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}
\...
3
votes
1
answer
208
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}
\...
3
votes
1
answer
198
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 ...
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]{...
2
votes
1
answer
168
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 ...
1
vote
1
answer
74
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]
\...
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}
%
\...