From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [PATCH] new babel latex feature :imagemagick Date: Fri, 25 Feb 2011 17:16:15 -0700 Message-ID: <877hcnhazj.fsf@gmail.com> References: <4D668477.8080005@med.uni-goettingen.de> <8739ndmfoa.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=60018 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pt8Q3-0008E1-Lh for emacs-orgmode@gnu.org; Fri, 25 Feb 2011 19:54:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pt8Q2-0006Cj-7J for emacs-orgmode@gnu.org; Fri, 25 Feb 2011 19:53:59 -0500 Received: from mail-vw0-f41.google.com ([209.85.212.41]:34134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pt8Q2-0006Ca-3u for emacs-orgmode@gnu.org; Fri, 25 Feb 2011 19:53:58 -0500 Received: by vws13 with SMTP id 13so2411149vws.0 for ; Fri, 25 Feb 2011 16:53:57 -0800 (PST) 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 S Fraga Cc: Andreas Leha , emacs-orgmode@gnu.org > #+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