I have a tikz standalone, where I make a tikz picture that is using tikzstyles I define in this file.
\tikzstyle{block} = [rectangle, thick, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=-70, trapezium stretches=true, thick, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black]
\tikzstyle{arrow} = [thick,->,>=stealth]
Now when I include the picture to my main text file I need to redefine the tikzstyles at the beginning, if I don't do this, errors occur.
Is there a way around it, because I have a lot of figures and there are a lot of tikzstyle definitions.
Thank you in advance!
\tikzstyleis deprecated, for more or less this reason. You should use\tikzsetinstead. This is discussed in detail under this thread. You can define the styles either globally or locally, and from your question it is not yet clear to me which variant will be the one you are after. If the definitions are always the same, you want global, otherwise local. – Jul 11 '19 at 13:13