It seems that pgfkeys is attempting to do math on one of my arguments, and failing because it's not actually math. How do I prevent this, and ensure that the argument is passed correctly?
Compiling using lualatex. The log records a single Missing number, treated as zero.
and then
Package PGF Math Error: You've asked me to divide `1' by `', but I cannot divide any number by `' (in '(0) + (1/, 1/A, 1/-1 B, 1/-2 C,)').
I have tried several variations on putting {} around things, and in place of empty text, and so forth. It might be related to the sum=auto
, but just typing the text in does work, so something is still changing in pgfkeys.
MWE below:
\documentclass[twoside,headings,a4paper]{article}
\usepackage{xparse}
\usepackage{pgfkeys}
\usepackage{pgf-pie}
\begin{document}
\pgfkeys{
/TestExample/.is family, TestExample,
% Here are the options that a user can pass
default/.style = {
TestPie = {},
},
TestPie/.store in = \TestPie,
}
\newcommand{\TestExample}[2][]{
\clearpage
\pgfkeys{TestExample, default, #1}%
\begin{tikzpicture}
\pie[color=white, hide number, text=inside, sum=auto, rotate=90, change direction]{
1/,
1/A,
1/-1 B,
1/-2 C
}
\end{tikzpicture}
\begin{tikzpicture}
\pie[color=white, hide number, text=inside, sum=auto, rotate=90, change direction]{
\TestPie
}
\end{tikzpicture}
#2
}
\TestExample[TestPie={
1/,
1/A,
1/-1 B,
1/-2 C
}]{
Blah Blah Blah
}
\end{document}
\TestPie
.pie
command. And of course, the question is how to make\TestPie
work, or to work around whatever limitation is breaking it.