On Fri, Jun 27, 2014 at 7:23 AM, Joseph Vidal-Rosset <joseph.vidal.ros...@gmail.com> wrote: > > 2014-06-27 12:58 GMT+02:00 Joseph Vidal-Rosset > <joseph.vidal.ros...@gmail.com>: > >> 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: <SCRIPT SRC="../jsMath/easy/load.js"></SCRIPT> \[ \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: <SCRIPT SRC="/home/jwhendy/Downloads/jsMath-3.6e/easy/load.js"></SCRIPT> 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.