From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: Mathjax and stmaryrd Date: Sun, 26 Dec 2010 22:55:07 +0100 Message-ID: <4D17B9BB.6060207@christianmoe.com> References: <20101226175211.GB9405@geppetto> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=43644 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWyWb-0000U6-OB for emacs-orgmode@gnu.org; Sun, 26 Dec 2010 16:53:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PWyWa-0002uP-OI for emacs-orgmode@gnu.org; Sun, 26 Dec 2010 16:53:09 -0500 Received: from mars.hitrost.net ([91.185.211.18]:38827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PWyWa-0002rs-Ia for emacs-orgmode@gnu.org; Sun, 26 Dec 2010 16:53:08 -0500 Received: from lk.92.63.17.213.dc.cable.static.lj-kabel.net ([92.63.17.213] helo=Celebrian.local) by mars.hitrost.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PWyW2-0001gy-Vu for emacs-orgmode@gnu.org; Sun, 26 Dec 2010 22:52:35 +0100 In-Reply-To: <20101226175211.GB9405@geppetto> 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: emacs-orgmode Mailing List On 12/26/10 6:52 PM, Stefano Sabatini wrote: > Hi, > > I'm editing an org file, and I need to use stmaryrd package for > the embedded mathematics. > > So I'm setting this: > #+LATEX_HEADER: \usepackage{stmaryrd} > #+LATEX_HEADER: \usepackage{amsmath} > > which works just fine for the PDF/LaTeX rendering, but it's not > working with Mathjax/HTML rendering. > According to the MathJax documentation, the AMSmath package is supported by an extension, but you may have to configure your MathJax installation to enable it. http://www.mathjax.org/resources/docs/?tex.html I don't think there's any way for Org-mode to tell MathJax to do this. If I understand the documentation, though, without configuration you can still make MathJax enable AMSmath by using a math *environment* defined by AMSmath, like \begin{smallmatrix} or \begin{subarray}. Haven't tried it. > So I have two questions: > * is it possible to make the Mathjax engine recognize and render > stmaryrd symbols? (And in general: is it possible to enable a > latex package?) FWIW, I believe the general answer is no. MathJax is not a LaTeX installation. MathJax is implemented in JavaScript to render a subset of LaTeX commands (math commands, not general typesetting) with HTML and CSS. This subset does not include \input or \usepackage to load LaTeX packages (.sty files). It does include \newcommand, so if a macro you need can be defined with the macros already supported, that might work. Otherwise a MathJax extension would need to be written, and enabled in the MathJax configuration. If special fonts are needed that are not provided with MathJax (that might be the case for stmaryrd), you'd need to provide those too. I'd get in touch with the MathJax developers if you need support for a specific package. Yours, Christian