From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Berthier Subject: Re: mathjax vs. imagemagick Date: Mon, 04 Aug 2014 13:32:14 +0200 Message-ID: <87mwbkjxs1.fsf@inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEGV3-0008DZ-MJ for emacs-orgmode@gnu.org; Mon, 04 Aug 2014 07:32:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEGV2-000261-TL for emacs-orgmode@gnu.org; Mon, 04 Aug 2014 07:32:21 -0400 Received: from mail-we0-x22d.google.com ([2a00:1450:400c:c03::22d]:38599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEGV2-00025x-Lr for emacs-orgmode@gnu.org; Mon, 04 Aug 2014 07:32:20 -0400 Received: by mail-we0-f173.google.com with SMTP id q58so7557943wes.4 for ; Mon, 04 Aug 2014 04:32:17 -0700 (PDT) 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Joseph Vidal-Rosset Cc: "Liste-emacs-orgmode@gnu.org" You wrote: > Hello, > > In order to convert a tikzpicture into html webpage, one needs=20 > #+OPTIONS: tex:imagemagick=20 > and it means that the other equations are no more converted via > Mathjax.=20 > > 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?=20 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 =20=20 ,* One Diamond =20=20 ,#+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 =20=20 ,#+attr_latex: :float nil :width "" ,#+results: diamond =20=20 ,* LaTeX =20=20 Inline math follows \(\left\{ x \right\}\)=E2=80=A6 =20=20 ,* COMMENT setup =20=20 ,#+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 =20=20 # Local variables: # eval: (org-sbe "setup") # End: =20=20 #+end_src Regards, --=20 Nicolas Berthier FSF Member #7975