[Tex/LaTex] How to define tikz style in the preamble to use in all tikz pictures

tikz-styles

How can I define a

stylename/.style={...}

in the preamble so that all tikzpicture environments could reference it instead of defining this style inside of each tikzpicture?

Best Answer

Just put:

\usepackage{tikz}
\tikzset{%
    stylename/.style={...},
    anotherstlye/.style={...},% and so on
}

in your preamble, and you'll be able to use stylename and anothetstyle in all the tikzpictures of your document.

Related Question