From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: [PATCH] new babel latex feature :imagemagick Date: Mon, 28 Feb 2011 09:28:24 +0000 Message-ID: <874o7old8n.fsf@ucl.ac.uk> References: <4D668477.8080005@med.uni-goettingen.de> <8739ndmfoa.fsf@ucl.ac.uk> <877hcnhazj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=37774 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pu0eB-00007e-RV for emacs-orgmode@gnu.org; Mon, 28 Feb 2011 05:48:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pu0eA-0007rQ-H6 for emacs-orgmode@gnu.org; Mon, 28 Feb 2011 05:48:11 -0500 Received: from vscani-e.ucl.ac.uk ([144.82.108.33]:58287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pu0eA-0007q3-BM for emacs-orgmode@gnu.org; Mon, 28 Feb 2011 05:48:10 -0500 In-Reply-To: <877hcnhazj.fsf@gmail.com> (Eric Schulte's message of "Fri, 25 Feb 2011 17:16:15 -0700") 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: Andreas Leha , emacs-orgmode@gnu.org "Eric Schulte" writes: >> #+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 > It is indeed. Thanks for reminding me of this. My headers are seldom this long so I had forgotten they could be split. -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.4 (release_7.4.529.gb23d.dirty)