From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Options for HTML & PDF export Date: Thu, 19 May 2011 11:45:49 +0200 Message-ID: <80ei3vrpki.fsf@somewhere.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Ken, wrote: > I use the Babel features of org-mode to do a sort of literate-programming > thing. I have lots of R code that generates graphics which get included i= nto > an exported HTML or PDF (via LaTeX) document. > > I'm wondering about "best practices" (though I hate that term) for managi= ng > the export to both HTML & PDF. Just by curiosity, what don't use like that term? > For the HTML I generate the graphics files as PNG, but for PDF the PNG > format doesn't embed very well, so I need to generate PDF or EPS or > somesuch. But then I have to change the ":file filename.png" to ":file > filename.pdf", which is quite cumbersome to do every time I want to expor= t. > > Is there some wcy people have for dealing with this situation? Some optio= ns > setting maybe? I've no time to customize it to your particular needs, but here's something you can update to map it to your needs: #+begin_src org #+BABEL: :results (if (and (boundp 'backend) (eq backend 'latex)) "latex" "= file") #+end_src Please post your solution for the sake of further sharing... Best regards, Seb --=20 S=C3=A9bastien Vauban