emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Darlan Cavalcante Moreira <darcamo@gmail.com>
To: org-mode Mailing list <emacs-orgmode@gnu.org>
Subject: Integration with jsMath for HTML export of latex equations (feature request)
Date: Fri, 16 Oct 2009 13:36:47 -0300	[thread overview]
Message-ID: <4ad8a125.0ac0100a.2766.ffff9555@mx.google.com> (raw)


Hello org-users,

I know that it is possible to export equations as images if you set the variable
org-export-with-LaTeX-fragments to t, but I prefer to use jsMath
(http://www.math.union.edu/~dpvc/jsMath/) for equation in HTML. The problem is
that when org-export-with-LaTeX-fragments is set to nil org-mode interprets
underlines, hats and Greek letters and replace them in the generated HTML.

I agree that this is nice in most cases, but I need them to be left untouched,
since they will be later interpreted by jsMath when I'm viewing the page in a
browser that supports java-script. Therefore, my "feature request" is disabling
this smart behavior of org-mode when latex fragments are not converted to
images.

I also need to add a line in the HTML header to load the jsMath script, but this is
easily accomplished with the line
#+STYLE: <SCRIPT SRC="../jsMath/easy/load.js"></SCRIPT>
in the org-file header.

Here are some advantages and disadvantages about using jsMath instead of images.
Advantages:
 - It's really pretty when you have all the fonts installed and you can zoom
   without any loss of quality.
 - No need to generate images when exporting
   + When you see the generated HTML page the jsMath script is run each time you
     reload the page. Because modern browsers are increasing more and more the
     efficiency of the java-script engine this is not a problem even if there are
     a lot of equations in the generated page.
   + On the other hand, creating images when exporting can take considerable
     time when there are man equations.

Disadvantages
 - More difficult to setup
   + you have to install jsMath for authors, since you are creating pages with it.
   + you have to install jsMath for users, that is, install the fonts that will
     be used. If this is not done, jsMath will use images for the equations. You
     won't need to generate images when exporting, since jsMath already has all
     images (it just put the pieces together)
 - It is more inconvenient to send the generated HTML page to a friend, since
   your friend will need to install the fonts used by jsMath.


Darlan

             reply	other threads:[~2009-10-16 16:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-16 16:36 Darlan Cavalcante Moreira [this message]
2009-10-20  8:53 ` Integration with jsMath for HTML export of latex equations (feature request) Carsten Dominik
2009-10-20 13:56   ` Darlan Cavalcante Moreira
2009-10-20 15:17     ` Carsten Dominik
2009-10-21  5:16       ` Darlan Cavalcante Moreira
2009-10-21  7:09         ` Carsten Dominik

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=4ad8a125.0ac0100a.2766.ffff9555@mx.google.com \
    --to=darcamo@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).