Hi Ken, <ken.willi...@thomsonreuters.com> 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 into > an exported HTML or PDF (via LaTeX) document. > > I'm wondering about "best practices" (though I hate that term) for managing > 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 export. > > Is there some wcy people have for dealing with this situation? Some options > 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 -- Sébastien Vauban