emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: Andreas Leha <andreas.leha@med.uni-goettingen.de>, emacs-orgmode@gnu.org
Subject: Re: [PATCH] new babel latex feature :imagemagick
Date: Fri, 25 Feb 2011 17:16:15 -0700	[thread overview]
Message-ID: <877hcnhazj.fsf@gmail.com> (raw)
In-Reply-To: <8739ndmfoa.fsf@ucl.ac.uk>

> #+begin_src org
>
> * tikz with image magick
>   The following is a simple figure generated using tikz:
>
>   #+begin_src latex :exports results :results (if (and (boundp 'backend) (eq backend 'latex)) "latex" "file") :file test.png :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 :fit yes :noweb yes :headers '("\\usepackage{tikz}")
> \begin{tikzpicture}
>   \node[red!50!black] (a) {A};
>   \node (b) [right of=a] {B};
>   \draw[->] (a) -- (b);
> \end{tikzpicture}
>   #+end_src
>
> #+end_src

Very nice, are you aware of the option to split header arguments among
multiple lines?

the above could be written as...

#+headers:  :file test.png :fit yes
#+headers: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400
#+headers: :results (if (and (boundp 'backend) (eq backend 'latex)) "latex" "file")
#+begin_src latex :exports results :noweb yes :headers '("\\usepackage{tikz}")
  \begin{tikzpicture}
    \node[red!50!black] (a) {A};
    \node (b) [right of=a] {B};
    \draw[->] (a) -- (b);
  \end{tikzpicture}
#+end_src

which is (possibly) easier to write/read

Best -- Eric

  reply	other threads:[~2011-02-26  0:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24 16:16 Andreas Leha
2011-02-24 18:49 ` Eric S Fraga
2011-02-26  0:16   ` Eric Schulte [this message]
2011-02-28  9:28     ` Eric S Fraga
2011-02-26  0:13 ` Eric Schulte
2011-02-26  0:13 ` Eric Schulte
2011-02-26 10:41   ` Andreas Leha
2011-02-26 16:06     ` Eric Schulte
2011-02-26 16:41     ` Eric Schulte
2011-06-28 20:52     ` Sebastien Vauban
2011-06-29  0:42       ` Eric Schulte
2011-11-22 10:37         ` Andreas Leha
2011-11-22 13:58           ` Eric Schulte

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=877hcnhazj.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=andreas.leha@med.uni-goettingen.de \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).