From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Integration with jsMath for HTML export of latex equations (feature request) Date: Wed, 21 Oct 2009 09:09:11 +0200 Message-ID: <76A679EB-C202-4497-A80D-DA21A7C7C945@gmail.com> References: <4ad8a125.0ac0100a.2766.ffff9555@mx.google.com> <0BBB5A37-C754-49B8-8741-B58D0713D3F6@gmail.com> <4addc1a3.141bf30a.126a.0202@mx.google.com> <209B33EA-DA36-46B1-BAAC-33687F4DF537@gmail.com> <4ade9971.1708c00a.49ea.02fc@mx.google.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0VJv-0002ez-Cp for emacs-orgmode@gnu.org; Wed, 21 Oct 2009 03:09:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0VJr-0002cq-OY for emacs-orgmode@gnu.org; Wed, 21 Oct 2009 03:09:19 -0400 Received: from [199.232.76.173] (port=40604 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0VJr-0002cn-L9 for emacs-orgmode@gnu.org; Wed, 21 Oct 2009 03:09:15 -0400 Received: from mail-ew0-f206.google.com ([209.85.219.206]:62681) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0VJr-0003xk-4U for emacs-orgmode@gnu.org; Wed, 21 Oct 2009 03:09:15 -0400 Received: by ewy2 with SMTP id 2so7075921ewy.31 for ; Wed, 21 Oct 2009 00:09:14 -0700 (PDT) In-Reply-To: <4ade9971.1708c00a.49ea.02fc@mx.google.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Darlan Cavalcante Moreira Cc: org-mode Mailing list Hi Darlan, I put up the file on http://orgmode.org/worg/org-tutorials/org-jsmath.php Thanks! - Carsten On Oct 21, 2009, at 7:16 AM, Darlan Cavalcante Moreira wrote: > > I was alreade doing that but it was replace by $α$ in the html > file. However, the option #+OPTIONS: LaTeX:nil solves the problem. > > At last, I wrote an org file with instructions on how to use jsMath > with Org. > Thanks again Carsten, > > Darlan > > > > > At Tue, 20 Oct 2009 17:17:46 +0200, > Carsten Dominik wrote: >> >> >> On Oct 20, 2009, at 3:56 PM, Darlan Cavalcante Moreira wrote: >> >>> >>> Hi Carsten, >>> >>> The option "#+OPTIONS ^:nil" did the trick with underlines and hats, >>> but Greek >>> letter are still replaced. Since they are ignored by jsMath I get >>> the correct >>> equations and the only minor annoyance is that the font of the Greek >>> letters is >>> not as nice as if it were replace by jsMath (jsMath fonts are >>> equivalent to >>> latex fonts). If it is something easy to do, an option to also turn- >>> off the >>> replacements of Greek letters by org-mode would be nice, but don't >>> bother if it >>> is to much work. >> >> You can just use LaTeX conventions and write $\alpha$ instead of the >> lazy \alpha. That should do the trick. >> >> - Carsten >> >> >> >>> >>> I'll write the instructions of how to use jsMath with org-mode here >>> soon. >>> Thanks Carsten, >>> >>> Darlan >>> >>> >>> >>> >>> >>> At Tue, 20 Oct 2009 10:53:22 +0200, >>> Carsten Dominik wrote: >>>> >>>> Hi Darlan, >>>> >>>> On Oct 16, 2009, at 6:36 PM, Darlan Cavalcante Moreira wrote: >>>> >>>>> >>>>> 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. >>>> >>>> Would >>>> >>>> #+OPTIONS ^:nil >>>> >>>> already do what you want? >>>> >>>> If you get this working, can I ask you to write up some >>>> instructions >>>> on how to use this with Org and post them here? >>>> >>>> Thanks. >>>> >>>> - Carsten >>>> >>>>> >>>>> 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: >>>>> 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 >>>>> >>>>> >>>>> _______________________________________________ >>>>> Emacs-orgmode mailing list >>>>> Remember: use `Reply All' to send replies to the list. >>>>> Emacs-orgmode@gnu.org >>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >>>> >>>> - Carsten >>>> >>>> >>>> >> >> - Carsten >> >> >> - Carsten