My Tex files get very confusing since I have multiple long TikZ code in them. How do you organize your files when it comes to TikZ?
Like with any TeX code you can put your TikZ picture environment into own
The exact way I organize my TikZ pictures is as follows:
|show 5 more comments|
I 'll try to describe the approach I used for my master thesis. Since I had a lot of tikz figures, compilation time was significant. In order to reduce it I decided to compile them to standalone pdfs and use
In order to do that I followed the following scheme:
So I created a folder for each chapter containing a tex file and a subfolder containing the tikz files. In my
Now, in order to create the tikz figures and convert them to pdfs I used the following approach.
Keeping the tikz files preamble as a separate file may seem as inconvenient but it allows greater flexibility. If you decide to make severe changes in your preamble (e.g. change font or font size - that actually happened to me, one day before the presentation!) then all you have to do is to adjust
PS. I would be interested in reading other people's work-flows.
Naturally I can't compete with Martins answer :) but I have a different approach which does not include the use of 'yet another' additional package (you know what I mean).
First of all -- here is the result:
Screeshots of the Folder Structure
Here is my simplified folder structure
The content of every folder is
The main file looks like this:
Figure Input Code
The Figure Input Code looks like this:
The label of the figure always has the filename of the Figure Input Code file. In this case the file is named
The TikZ Code looks like this:
The TikZ Styles look like this:
The filenames for the styles reflect the name of the style, as you can see.
Download the Example
If you want you can download the whole example as a zip file:
I see the following advantages
Of course Martins solution is better. But in my experience new LaTeX users are happy if they do not need to understand an additional package.