From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: tikz for multiple targets Date: Thu, 11 Jul 2013 20:56:08 +0200 Message-ID: <87li5ddiyf.fsf@med.uni-goettingen.de> References: <87k3kztlam.fsf@ucl.ac.uk> <87wqoyagmh.fsf@gmx.us> <87obaa65uu.fsf@ucl.ac.uk> <87ehb62lhe.fsf@med.uni-goettingen.de> <878v1d7his.fsf@gmail.com> <878v1ds73o.fsf@med.uni-goettingen.de> <87ehb55bcn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxM2U-0006Cn-UL for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 14:56:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxM2T-0000g8-TJ for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 14:56:26 -0400 Received: from plane.gmane.org ([80.91.229.3]:33655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxM2T-0000g2-M5 for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 14:56:25 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UxM2R-000532-Oj for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 20:56:23 +0200 Received: from 84.121.221.93.dyn.user.ono.com ([84.121.221.93]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jul 2013 20:56:23 +0200 Received: from andreas.leha by 84.121.221.93.dyn.user.ono.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jul 2013 20:56:23 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Eric, Eric Schulte writes: >> >> This is very nice and works well for me. I would very much like to see >> that in orgmode. Thanks a lot! >> > > Great, I've just committed this patch. Thanks for your original example > which this simply extends. > >> >> How do I extend your example to output latex for latex, svg for html and >> png in all other cases? >> > > The attached does this. The catch is that the :imagemagick header > argument is required for png (and other) image types to be used. > thanks for the quick answer. I am aware, that imagemagick is needed. Let me rephrase my question using your example: > #+LATEX_HEADER: \usepackage{tikz} > > First execute the second code block, to define the convenience macro > and to set the required new variables in ob-latex.el. Then export to > HTML and to pdf to see the tree exported as an SVG image and as > embedded tikz respectively. > > * Tikz test > Here's a tree, exported to both html and pdf. > > #+header: :file (by-backend (html "tree.svg") (pdf 'nil) (t "tree.png")) > #+header: :imagemagick I seem not to be able to apply (by-backend ) at the 'top-level, like so: #+header: (by-backend (html 'nil) (pdf 'nil) (t ":imagemagick")) Why is that? Regards, Andreas