Is there a way to insert a diagram generated by Tikz/PGF directly from within a LaTex file? Currently, I am writing it in its own file, compiling it with pdflatex and then including the generated output file as an image.
Tell me more
×
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.
|
|
||||
| show 1 more comment |
|
Yes, this is possible. If you have a file
This should work just fine. |
||||
|
In the preamble add
This enables to control the figure dimensions in your text. |
|||||
|
standalonepackage. An example is in this question on crop entire document around figure – Peter Grill Feb 8 '12 at 16:22standalonepackage appears to be a more complex version of theinputcommand does it not? – puk Feb 8 '12 at 20:25standalonepackage can be used to produce complete compilable documents with thetikzpictures, and then you can use\inputto imports those directly into the parent document without having to remove/comment the preamble required to compile thetikzpictureby itself. – Peter Grill Feb 8 '12 at 20:48