Many thanks for this help Nicolas. I do not succeed  to adapt your example to my file. I am afraid that it is too complicated for me.

I meet always difficulties with html export, and now it is a failure of bibtex2html...

Thanks again

Best regards

Jo.


2014-08-04 13:32 GMT+02:00 Nicolas Berthier <nberthier@gmail.com>:
You wrote:

> Hello,
>
> In order to convert a tikzpicture into html webpage, one needs
> #+OPTIONS: tex:imagemagick
> and it means that the other equations are no more converted via
> Mathjax.
>
> Is there a mean to combine the use of imagemagick only for
> tikzpicture, and keeping the use of Mathjax to read the other
> equations in the html file?

Hi,

You don't need to set the tex:imagemagick option globally. With the
example bellow, the HTML export should use Mathjax to render math
fragments:

#+begin_src org
  ,#+TITLE: Test
  ,#+AUTHOR: Blah
  ,#+LATEX_CLASS: article
  ,#+LATEX_CLASS_OPTIONS: [american]
  #
  # Setup tikz package for both LaTeX and HTML export:
  ,#+LATEX_HEADER: \usepackage{tikz}
  ,#+PROPERTY: header-args:latex+ :packages '(("" "tikz"))
  #
  ,#+PROPERTY: header-args:latex+ :imagemagick (by-backend (latex nil) (t "yes"))
  ,#+PROPERTY: header-args:latex+ :exports results :fit yes

  ,* One Diamond

  ,#+name: diamond
  ,#+header: :iminoptions -density 600 -resample 100x100
  ,#+header: :file (by-backend (latex "diamond.tikz") (t "diamond.png"))
  ,#+begin_src latex :results raw file
    \begin{tikzpicture}
      \draw (1,0) -- (0,1) -- (-1,0) -- (0,-1) -- cycle;
    \end{tikzpicture}
  ,#+end_src

  ,#+attr_latex: :float nil :width ""
  ,#+results: diamond

  ,* LaTeX

  Inline math follows \(\left\{ x \right\}\)…

  ,* COMMENT setup

  ,#+name: setup
  ,#+begin_src emacs-lisp :results silent :exports none
    (defmacro by-backend (&rest body)
      `(case (if (boundp 'backend) (org-export-backend-name backend) nil) ,@body))
  ,#+end_src

  # Local variables:
  # eval: (org-sbe "setup")
  # End:

#+end_src

Regards,

--
Nicolas Berthier                                        FSF Member #7975