I define a command with one optional key parameter. This command makes some calculations and them draws a tikzpicture
. How can made my command to accept all the keys that a \draw
command accept and pass them?
\newlength{\gl@blgskip} \pgfkeys{/lineskip/.cd, .default=\baselineskip, .store in = \gl@blgskip@macro } \newcommand{\baselinegrid}[1][] { \pgfkeys{lineskip,#1} % set length to optional parameter lineskip \setlength{\gl@blgskip}{\gl@blgskip@macro} %%% Do some calculations ... \begin{tikzpicture} \draw (0,0) -- (0,5cm); \end{tikzpicture}
Now I can call my commands as \baselinegrid[lineskip=3cm]
. I want to do thing like \baselinegrid[lineskiip=3cm, color=red]
and pass the option color
to the \draw
command.