JuliaTeX / TikzPictures.jl

Creating PGF/TikZ pictures and saving them in various formats
Other
89 stars 28 forks source link

tikzset #50

Closed Lecrapouille closed 4 years ago

Lecrapouille commented 4 years ago

Hi! Is this possible to add an extra parameter to TikzPicture in the aim to add code for \tikzset{? For example to change the style for arrows:

\tikzset{myarrow/.style={->,draw=black,line width=1pt}}

LaTeX code to be placed before \begin{tikzpicture}[.

Lecrapouille commented 4 years ago

PS: If you wish I can create a PR!

mykelk commented 4 years ago

I think you can do this through the preamble. See this for example. Do you have a more user friendly way in mind?

Lecrapouille commented 4 years ago

Thanks for your fast answer but preamble seems to placed before \begin{document} Is this really alright? Seem to be a little touchy to place tikz code before the document.

mykelk commented 4 years ago

Yep, I often put it before the start of the document and it works just fine.

Lecrapouille commented 4 years ago

Ok thanks I tried and effectively that it worked fine :) Just a last point. I'm writting a jupyther page but TikzPictures.jl create temporary directories temp_dir = _mktempdir("./"). Now I have so many folder inside my git project. I can add a .gitignore file but is it possible to create them in other folder for example /tmp ?

mykelk commented 4 years ago

If you look at the code here, it should be deleting the temp directories. If you can fix or narrow down the issue feel free to file another issue or PR. I'll close this one for now.