From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: [PATCH] new babel latex feature :imagemagick Date: Thu, 24 Feb 2011 18:49:09 +0000 Message-ID: <8739ndmfoa.fsf@ucl.ac.uk> References: <4D668477.8080005@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=56988 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsiNh-0007IN-GO for emacs-orgmode@gnu.org; Thu, 24 Feb 2011 16:05:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsiNg-00030j-5h for emacs-orgmode@gnu.org; Thu, 24 Feb 2011 16:05:49 -0500 Received: from vscane-a2.ucl.ac.uk ([144.82.108.42]:36407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsiNg-00030F-0V for emacs-orgmode@gnu.org; Thu, 24 Feb 2011 16:05:48 -0500 In-Reply-To: <4D668477.8080005@med.uni-goettingen.de> (Andreas Leha's message of "Thu, 24 Feb 2011 17:16:55 +0100") 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: Andreas Leha Cc: emacs-orgmode@gnu.org Andreas Leha writes: > Hi all, > > Just a small patch that might make life easier for > LaTeX (and esp. tikz) users. It enables the output of graphics in a > lot of formats using imagemagick. See below for an example. [...] This seems to work rather well. I tried the following: #+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 and I get native tikz in the latex output and a png in the html output. very nice! I haven't done exhaustive testing so I don't know if the patch breaks anything, mind you. Thanks, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.4 (release_7.4.529.gb23d.dirty)