Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to pass the arguments

->,line width=1.2pt

to command

\draw [] ...

However, this does not work

\newcommand\newstyle{->,line width=1.2pt}
\draw[\newstyle]

Is there any way to do that?

share|improve this question
add comment

1 Answer

up vote 10 down vote accepted

Tikz options are not handled that way; if you pass a macro to \draw, it will think you meant to call a single key with the name ->,line width=1.2pt. Instead, use a real style:

\tikzset{newstyle/.style = {->,line width=1.2pt}}
\draw[newstyle] ...
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.