# Using TikZ in papers

I've started using TikZ for a paper I'm writing and am worrying that a journal might not accept the paper with inline TikZ. I had to update my PGF installation for all the examples to work and I'm not even sure that my collaborator will have an updated version...

So here are the questions.

-Do people know if journals (math and physics) accept inline TikZ?

-Is there a nice way to create a pdf figure from a tikzpicture ? Perhaps I could have a latex file for each figure and only one \begin{tikpicture} \end{tikzpicture} pair and somehow compile the result to get a pdf or eps containing just the figure (and not a whole page with a figure in it...)

Cheers,

Yossi.

-
The easiest approach would be for you to create separate PDF files for each image, and include those. If you want to know how to do that, you should either read the excellent TikZ manual and/or ask in a more appropriate forum, like TikZ's mailing lists---which are filled with people who are extremely helpful and extremely knowledgeable about TikZ. I don't think this is the kind of questions MO wants... – Mariano Suárez-Alvarez Dec 27 '09 at 14:25
There is a channel #latex on irc.freenode.net where you might be able to find some help as well. – Harry Gindi Apr 8 '10 at 8:07

There is a method for doing this in the back of the TIkZ manual; you can put special commmands around a TikZ picture do have it make a separate PDF which you then include as usual graphics. I'll admit, though, that I've had poor luck using it. I'd rather just give an earful to any journal who doesn't like TikZ.

-
Thanks. a little late perhaps, but I just wanted to follow up. I found the method for extracting the pdf. I must say that it is a little cumbersome. I ended up having to use it because my co-author claimed that his TikZ installation was missing the "intersections" package which I used in my figure, and after 3 hours of trying to reinstall PGF (or TikZ or both) he gave up and asked that I produce a stand-alone figure :-( YMMV.... – Yossi Farjoun Feb 4 '10 at 13:01
It's called "externalizing graphics"... it is pretty important to be able to do this because, for example, arxiv does not seem to have Tikz (at least, when I last uploaded), most journals don't and most (of my) coauthors don't.. The first time through is tedious but once you've worked it out - and recorded what you did - it is not too bad.. – Gordon Royle Apr 15 '10 at 12:28
Actually, the arXiv does have Tikz. Look at my most recent papers. – Ben Webster Apr 15 '10 at 14:39
Yeah, I've used some pretty obscure Tikz libraries recently, and the arxiv copes fine. – Scott Morrison Apr 15 '10 at 18:39
I had problems with the arxiv not having an up-to-date version of pgf-plots. The arxiv people said "pgf/tikz simply develops at too fast of a pace for us to keep up." It was suggested that I use the work-around I mention further down this page. – Simon Willerton Apr 20 '10 at 16:01

It is not exactly answering either of your two questions, but here is another work-around. I had problems putting papers on the arxiv which used pgf/tikz because the version of pgf/tikz they used at the arxiv was not as up to date as my version. The admin at the arxiv told me to do the following. LaTeX your file with the option -recorder. This will create a .fls file containing a list of all of the FiLeS used by LaTeX when typesetting your document. Choose all of the files in the list containing "pgf" or "tikz" and move them into the directory containing your document. You can then send that directory to your collaborator/the arxiv/the journal without worrying about how up to date their set up is.

[Unfortunately, I then had the problem that the tikz graphics I produced required an enormous amount of working memory which was greater than the allocation on the arxiv server, so I resorted to using 'grab' on my mac to take a high resolution snap-shot of the graphic, which I then incorporated into the LaTeX file :-(. However, I have used this including-all-the-files technique for subsequent uploads to the arxiv.]

-
Interesting. Does this assume that the other side has any non-standard package? – Yossi Farjoun Apr 15 '10 at 23:10
I don't understand your question. Where might I be assuming that? – Simon Willerton Apr 20 '10 at 15:54

You can try "Shippage.sty", here.

-
Thanks for putting it out there. I will try shipout and see how it works. – Yossi Farjoun Apr 9 '10 at 8:04
I can't find Shippage.sty on that page. Is there an alternate download? What does it do? – gmatht Apr 28 at 9:45

I have found the "preview" package to be perfect for extracting TikZ figures (and once an awkward table) as PDFs.

http://www.ctan.org/tex-archive/macros/latex/contrib/preview/

This package is used by AUCTeX and KtikZ editors to give their (almost) real time LaTeX previews.

-