Carsten Dominik writes: > On 15.5.2013, at 22:21, John Hendy wrote: > >> On Wed, May 15, 2013 at 12:38 PM, Vincent Beffara wrote: >>> Dear list, >>> >>> I would like to have the same org file export to both PDF (through >>> LaTeX) and HTML. The problem I have is images: for printing, PDF images >>> would be best but for display in a browser, it is much better to have a >>> PNG file rather than a link to the PDF. So what I need is for the >>> exporter to choose the image differently according to the backend. >> >> I know this is more of a request for coding help, but just wanted to >> add my vote that this would be great. I don't use html *that* much, >> but having the option would be awesome, and the replacement of all >> *.pdf links with *.png (and typically re-running R code to generate >> .png version, or running imagemagick on the dir to create them) is >> typically too much of a barrier so I just stick with PDF/Beamer. >> >> I'd love something like this. > This was very recently discussed with respect to latex code, and conditional pdf or svg export. Could the following solution be adapted to your R code blocks? http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html#sec-4-3 e.g. something like the following,