From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: TikZ to separate file (babel?) possible? Date: Fri, 22 Oct 2010 16:36:10 -0500 Message-ID: References: <87lj5px6m5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0056920350==" Return-path: Received: from [140.186.70.92] (port=33654 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P9PHc-0004RL-Tl for emacs-orgmode@gnu.org; Fri, 22 Oct 2010 17:36:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P9PHb-0005A4-Cy for emacs-orgmode@gnu.org; Fri, 22 Oct 2010 17:36:16 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:37557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P9PHb-00059o-29 for emacs-orgmode@gnu.org; Fri, 22 Oct 2010 17:36:15 -0400 Received: by bwz16 with SMTP id 16so1765379bwz.0 for ; Fri, 22 Oct 2010 14:36:14 -0700 (PDT) In-Reply-To: <87lj5px6m5.fsf@gmail.com> 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: Eric Schulte Cc: emacs-orgmode --===============0056920350== Content-Type: multipart/alternative; boundary=001636c5a40d57b16804933b6ec2 --001636c5a40d57b16804933b6ec2 Content-Type: text/plain; charset=ISO-8859-1 This is fantastic. Honestly, I had no idea that one could use LaTeX with babel! This is just perfect. I was googling around for "export tikz pgf jpg" and things like that with no luck. This will do perfectly. Thanks for the help. John On Fri, Oct 22, 2010 at 4:25 PM, Eric Schulte wrote: > 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 > --001636c5a40d57b16804933b6ec2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This is fantastic. Honestly, I had no idea that one could use LaTeX with ba= bel! This is just perfect. I was googling around for "export tikz pgf = jpg" and things like that with no luck. This will do perfectly.

Thanks for the help.

John
<= br>
On Fri, Oct 22, 2010 at 4:25 PM, Eric Schulte= <schulte.er= ic@gmail.com> wrote:
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
=A0\usetikzlibrary{shapes,arrows,shadows,decorations,decorations.text}
=A0\tikzstyle{line} =3D [draw, ultra thick, -latex']
=A0{\huge
=A0 =A0\begin{tikzpicture}[scale=3D0.5]
=A0 =A0 =A0\path
=A0 =A0 =A0[decorate,
=A0 =A0 =A0decoration=3D{text along path,
=A0 =A0 =A0 =A0text=3D{main(int argc, char *argv[]) int a; int b; if(a!=3D= b) a++1;}}]
=A0 =A0 =A0 =A0(0,2) cos (3,0.5);
=A0 =A0 =A0 =A0\path
=A0 =A0 =A0 =A0[decorate,
=A0 =A0 =A0 =A0decoration=3D{text along path,
=A0 =A0 =A0 =A0 =A0text=3D{argc, char *argv[]) int a; int b; if(a!=3Db) a+= +1;}}]
=A0 =A0 =A0 =A0(4.5,-0.5) sin (8,-2) cos (12,0) sin (16,2) cos (19,0.5); =A0 =A0 =A0\path
=A0 =A0 =A0[decorate,
=A0 =A0 =A0decoration=3D{text along path,
=A0 =A0 =A0 =A0text=3D{main(int argc, char *argv[]) int a; int b; if(a!=3D= b) a++1;}}]
=A0 =A0 =A0 =A0(0,-2) cos (4,0) sin (8,2) cos (11,0.5);
=A0 =A0 =A0\path
=A0 =A0 =A0[decorate,
=A0 =A0 =A0decoration=3D{text along path,
=A0 =A0 =A0 =A0text=3D{[]) int a; int b; if(a!=3Db) a++1;}}]
=A0 =A0 =A0(12.5,-0.5) sin (16,-2) cos (20,0) sin (24,2);
=A0 =A0 =A0\path
=A0 =A0 =A0[decorate,
=A0 =A0 =A0decoration=3D{text along path,
=A0 =A0 =A0 =A0text=3D{if(a!=3Db) a++1;}}]
=A0 =A0 =A0(20.5,-0.5) sin (24,-2);
=A0\end{tikzpicture}
=A0}
#+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 <jw.hendy@gmail.com= > 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 simp= ly put
> my TikZ code in between #+begin_latex and #+end_latex. This is fine wh= en the
> picture is in a document, but what if I want just a .png/jpg/eps/pdf o= utput?
> Is it possible to use babel or something else so that I can simply gen= erate
> 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 t= o 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 t= he
> 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. I= t
> 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

--001636c5a40d57b16804933b6ec2-- --===============0056920350== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0056920350==--