I'd like to create a style with parameters for use with the TikZ calendar
library.
Here's a working example similar to what I want:
\documentclass[10pt]{article}
\usepackage{tikz}
\usetikzlibrary{calendar}
\begin{document}
\tikzstyle{ColorDay}=[if={(equals=2-7) [every day/.append style=#1]}]
\begin{tikzpicture}
\calendar (cal) [dates=2013-02-1 to 2013-02-28,week list,
ColorDay={red}];
\end{tikzpicture}
\end{document}
I have two problems.
First, I am forced to use the deprecated \tikzstyle
command here, instead of \tikzset
. I can't get \tikzset
to work at all with calendar
if's. For instance,
\tikzset{ColorDay/.style=if={(equals=2-7) [every day/.append style=#1]}}
doesn't work. In fact, it doesn't work even if I remove the parameter.
\tikzset{ColorDay/.style=if={(equals=2-7) [every day/.append style=red]}}
Second, I don't know how to create a style with multiple parameters. For instance,
\tikzstyle{ColorDay}=[if={(equals=#1) [every day/.append style=#2]}]
doesn't work.