Hi Eric,
Eric Schulte <[email protected]> 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