all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: John Hendy <jw.hendy@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: TikZ to separate file (babel?) possible?
Date: Fri, 22 Oct 2010 15:25:22 -0600	[thread overview]
Message-ID: <87lj5px6m5.fsf@gmail.com> (raw)
In-Reply-To: <AANLkTikDXGma21rfevq18ni0fjJwt2S5oQsG56kvYf_2@mail.gmail.com> (John Hendy's message of "Fri, 22 Oct 2010 15:13:54 -0500")

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 <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 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

  parent reply	other threads:[~2010-10-22 21:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 20:13 TikZ to separate file (babel?) possible? John Hendy
2010-10-22 20:35 ` Erik Iverson
2010-10-22 21:25 ` Eric Schulte [this message]
2010-10-22 21:36   ` John Hendy
2010-10-22 23:11     ` Eric S Fraga
2010-10-23 17:58       ` John Hendy
2010-10-25 18:21         ` John Hendy
2010-10-25 18:53           ` Eric Schulte
2010-10-25 18:58             ` John Hendy
2010-10-26  8:17               ` Eric S Fraga
2010-10-26 14:34                 ` John Hendy
2010-10-26 21:34                   ` John Hendy
2010-10-26 23:01                     ` Eric Schulte
2010-10-28 21:43                       ` John Hendy
2010-10-28 21:52                         ` John Hendy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lj5px6m5.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jw.hendy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.