From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: How to use jsMath with org-mode Date: Fri, 27 Jun 2014 10:10:02 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0Xmu-0001Dl-RL for emacs-orgmode@gnu.org; Fri, 27 Jun 2014 11:10:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0Xmt-0000vD-F5 for emacs-orgmode@gnu.org; Fri, 27 Jun 2014 11:10:04 -0400 Received: from mail-oa0-x229.google.com ([2607:f8b0:4003:c02::229]:37870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0Xmt-0000sA-81 for emacs-orgmode@gnu.org; Fri, 27 Jun 2014 11:10:03 -0400 Received: by mail-oa0-f41.google.com with SMTP id l6so5864344oag.0 for ; Fri, 27 Jun 2014 08:10:02 -0700 (PDT) In-Reply-To: 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" On Fri, Jun 27, 2014 at 7:23 AM, Joseph Vidal-Rosset wrote: > > 2014-06-27 12:58 GMT+02:00 Joseph Vidal-Rosset > : > >> http://orgmode.org/worg/org-tutorials/org-jsmath.html >> >> Hello the list, >> >> I have followed this tutorial, but unfortunately, I do not understand why >> the command \ref meets always the error message : "Undefined control >> sequence" . I do not succed to get on html page references to numbered >> equations. >> >> Does someone can help me? I'm confused! Having never used this, I gave it a try since it's not too involved. I'm completely at a loss. - Downloaded jsMath-3.6e and the image fonts - Unzipped both, creating a jsMath-3.6e dir (main js) and a jsMath dir (fonts) - Moved jsMath/fonts to jsMath-3.6e/fonts - Tried the sample from Worg you posted (http://orgmode.org/worg/org-tutorials/org-jsmath.html) - Edited jsMath-3.6e/easy/load.js to contain this revised loadFiles line: #+begin_src load.js loadFiles: ["extensions/AMSmath.js","extensions/AMSsymbols.js", "extensions/autobold.js", "extensions/eqn-number.js"], #+end_src Used this file to test: #+begin_src Org #+STYLE: \[ \label{a_label} x=2*y \] Bla bla bla from equation \(\ref{a_label}\) #+end_src Exported to html, and get the undefined sequence error. I *also* don't get a numbered equation, which jsMath says I should get: - http://www.math.union.edu/~dpvc/jsmath/authors/eqn-number.html Looking at the raw html, I saw no mention of jsMath anywhere, only MathJax. Then I wondered if #+STYLE is even the correct syntax for Org 8.0 anymore, partly due to this recent post and the fact that I've migrated to my response for css: - http://lists.gnu.org/archive/html/emacs-orgmode/2014-06/msg00095.html So, I replaced #+style with #+html_head, and at least I get this line now: The equation renders, but I get no equation number, which tells me something's probably not right with the \label{} command; perhaps this is the reason or the \ref{} error (no matching label, and thus no ability to reference it)? **Edit**: if I delete the auto-inserted MathJax script stuff from my .html file, the equation does not render, either. I think it only renders because Orgmode includes some MathJax functionality; it's not really working with jsMath, hence it's not accessing the functionality to label and refer to equations. Oddly, I *don't* get rendered math with the test/index.html file as described here: - http://www.math.union.edu/~dpvc/jsmath/authors/installation.html I get raw TeX and a red warning that jsMath is not functioning properly. Sorry I can't be of more help. Mainly wanted to write and confirm that this isn't working correctly for me, either. John > > > Sorry for this terrible fault of English... > > Here is a (temporary ?) solution: > > #+OPTIONS: tex:t > #+HTML_MATHJAX: align:"center" mathml:t > path:"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMM" > > works perfectly well. > > I hope it will help. > > Best > > Jo.