emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com>
Cc: "Liste-emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: How to use jsMath with org-mode
Date: Fri, 27 Jun 2014 10:10:02 -0500	[thread overview]
Message-ID: <CA+M2ft_utkCkMHxR-4h126cG0O3gFL5rV7JpSwvXm_0y-iAnsA@mail.gmail.com> (raw)
In-Reply-To: <CAD-VTcFXarE83+zFdYjevYVC0z7DE=JzZX2LsyzEZ5idK5b09w@mail.gmail.com>

On Fri, Jun 27, 2014 at 7:23 AM, Joseph Vidal-Rosset
<joseph.vidal.rosset@gmail.com> wrote:
>
> 2014-06-27 12:58 GMT+02:00 Joseph Vidal-Rosset
> <joseph.vidal.rosset@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.

      reply	other threads:[~2014-06-27 15:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27 10:58 How to use jsMath with org-mode Joseph Vidal-Rosset
2014-06-27 12:23 ` Joseph Vidal-Rosset
2014-06-27 15:10   ` John Hendy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+M2ft_utkCkMHxR-4h126cG0O3gFL5rV7JpSwvXm_0y-iAnsA@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=joseph.vidal.rosset@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).