From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: TikZ to separate file (babel?) possible? Date: Fri, 22 Oct 2010 15:25:22 -0600 Message-ID: <87lj5px6m5.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=45057 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P9P7C-0001sk-Fs for emacs-orgmode@gnu.org; Fri, 22 Oct 2010 17:25:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P9P7A-0003cg-U2 for emacs-orgmode@gnu.org; Fri, 22 Oct 2010 17:25:30 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:44805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P9P7A-0003cb-P4 for emacs-orgmode@gnu.org; Fri, 22 Oct 2010 17:25:28 -0400 Received: by gyg13 with SMTP id 13so1228571gyg.0 for ; Fri, 22 Oct 2010 14:25:28 -0700 (PDT) In-Reply-To: (John Hendy's message of "Fri, 22 Oct 2010 15:13:54 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: emacs-orgmode Hi John, I use blocks like the following to create standalone pdfs. #+begin_src latex :file stuff/epr-logo.pdf :border 1.75em :packages '(("" "tikz")) :exports none \usetikzlibrary{shapes,arrows,shadows,decorations,decorations.text} \tikzstyle{line} = [draw, ultra thick, -latex'] {\huge \begin{tikzpicture}[scale=0.5] \path [decorate, decoration={text along path, text={main(int argc, char *argv[]) int a; int b; if(a!=b) a++1;}}] (0,2) cos (3,0.5); \path [decorate, decoration={text along path, text={argc, char *argv[]) int a; int b; if(a!=b) a++1;}}] (4.5,-0.5) sin (8,-2) cos (12,0) sin (16,2) cos (19,0.5); \path [decorate, decoration={text along path, text={main(int argc, char *argv[]) int a; int b; if(a!=b) a++1;}}] (0,-2) cos (4,0) sin (8,2) cos (11,0.5); \path [decorate, decoration={text along path, text={[]) int a; int b; if(a!=b) a++1;}}] (12.5,-0.5) sin (16,-2) cos (20,0) sin (24,2); \path [decorate, decoration={text along path, text={if(a!=b) a++1;}}] (20.5,-0.5) sin (24,-2); \end{tikzpicture} } #+end_src I then normally use the convert command if I want to change the resulting pdf into a png or other image type more suitable for web publishing. Best -- Eric John Hendy writes: > Hi, > > > I've recently gotten into TikZ and love it. It is simply fantastic for > creating neat diagrams and other thingies. > > One question... I created an org file with a flow chart in it and simply put > my TikZ code in between #+begin_latex and #+end_latex. This is fine when the > picture is in a document, but what if I want just a .png/jpg/eps/pdf output? > Is it possible to use babel or something else so that I can simply generate > a picture vs. needing it to be "in" the PDF output? > > I can ask the PGF list as well, but this one is far more active and I know > some use TikZ here. I ask because sometimes in my notes I'd like to have the > code present but also be able to reuse my work elsewhere, like when I have > to present using powerpoint. It'd be nice to just grab the picture (like > what I do with gnuplot output) rather than generating a pdf just for the > TikZ pic, screenshot or gimp it down to size, and then be able to use it. > > Does that make sense? It seems like babel would be perfect for this. It > already allows all the typical handles -- file output, what to export, etc. > > Or does this already exist and I'm ignorant? > > > Thoughts? > John > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode