## What subset of TeX is recognized document.SUBSCRIPTION_OPTIONS = { "thing": "thread", "subscribed": false, "url": "subscribe", "icon": { "css": "fa fa-envelope-o" } };

jdem
2007-06-03
2013-04-29
• jdem - 2007-06-03

Hello,

I'm a newbie with jsMath since I've just installed the PmWiki Cookbook/Recipe. JsMath is very useful and its rendering of math formulas is excellent.

But I've encountered some unknown TeX math keywords (I'm using the Wikipedia TeX formula page as a quick reference). What is the subset of TeX which is recognized by jsMath.

Many thanks.

• Davide P. Cervone - 2007-06-03

JsMath implements nearly the complete set of Plain TeX macros in math mode, with the exception of not handling the complete box
semantics or stretchable glue.  JsMath does not implement the macros used for formatting text-mode material (is assumes you will use HTML for that).  JsMath implements a handful of LaTeX environments, but by no means all.  There is an extension that defines the symbols in the AMS math fonts.

You can use the \def or \newcommand commands to define simple macros that are not currently available.  You can even put those into a separate file so that it is easier to load them into multiple pages.  It is even possible to bind TeX macros to JavaScript routines in order to implement more complex commands, though this is not well documented.  You can use some of the extensions (such as the one for mimeTeX) as examples.

On my list of things to do is to make a comprehensive list of the macros and environments available in jsMath, but that has not been done yet.

If you can tell me which macros you want to use that aren't available, I may be able to suggest how to proceed.

Davide

• Davide P. Cervone - 2007-06-03

PS, if you provide the URL for the reference page that you are using, I can say which macros are and are not available in jsMath.

Davide

• jdem - 2007-06-04

I'm using the french page:

http://fr.wikipedia.org/wiki/Aide:Formules_TeX

my first problem appears with: \begin{align} where align is not supported. I'm trying to find an english equivalent page but presently I'm not successful.

Jean

• Davide P. Cervone - 2007-06-04

OK, thanks for the link.  This page mixes Plain TeX with LaTeX and AmSTeX commands, but I can tell you the main differences:

jsMath doesn't have the following:

* \tfrac or \dfrac, only \frac, but you can get \tfrac{A}{B} as \frac{\textstyle A}{\textstyle B} and \dfrac{A}{B} as \frac{\displaystyle A}{\displaystyle B}.

* \iint, \iiint or \iiiint, but you can use \int\!\!\!\int, \int\!\!\!\int\!\!\!\int, etc for these

* \operatorname{A} can be handled as \mathop{\rm A}

* \varnothing, \smallsetminus, \ggg or \lll, but these can be made available by using the AMSsymbols extension.  Most of the other missing symbol names are also in the AMSsymbol extension (see http://www.math.union.edu/locate/jsMath/symbols/AMSsymbols.html for a complete list).

* \Diamond and \Box, which can be obtained from \diamond and \square (the latter in AMSsymbols).

* The second set of arrows are in the AMSsymbols extension

* the \xleftarrow and \xrightarrow macros are in the moreArrows extension

* \mho, \complement, \Finv, \Game and most of the symbols from \vartriangle through \varsupsetneqq are in the AMSsymbols extension

* \sideset is not available, with no obvious replacement

* \binom{A}{B}, \dbinom{A}{B} and \tbinom{A}{B} can be obtained as {A \choose B}, {\displaystyle {A \choose B}} and {\textstyle {A \choose B}}

* \begin{align}...\end{align} can often be replaced by \eqalign{...}, or \begin{eqnarray}...\end{eqnarray}, but in the latter, you need to put an & after the equal signs as well as before it.

* \stackrel{A}{B} can be obtained as \buildrel A \over {B}

* Blackboard bold can be obtained using the AMSsymbols extension

* Fractur can be obtained via the eufm10 extra font font

The rest of that page should be available within jsMath.  You can also look at the jsMath symbol tables at http://www.math.union.edu/locate/jsMath/symbols/, but these include only the symbols, and not all the layout macros.  More work needs to be done on documentation, as you can tell.

Hope that clarifies things.

Davide

• jdem - 2007-06-04

The english equivalent page is:

http://en.wikipedia.org/wiki/Help:Formula

Jean

• Davide P. Cervone - 2007-06-04

PS, it looks like SourceForge's forum software is inserting extra spaces after the \ and { symbols, so be careful if you cut and paste from here.

Also, the comma after the link to http://www.math.union.edu/locate/jsMath/symbols should not be included in the address.  Sorry about that.

• jdem - 2007-06-04

Many thanks, all that will be very useful !

• Davide P. Cervone - 2007-06-13

Well, several others have asked for more of the AMS macros as well as you, so I spent a few days coding up most of the rest of the amsmath AMS-LaTeX package for jsMath.  This is included jsMath v3.4c, now available for download, so you may want to get that and see if it eliminates your error messages about undefined macros.

Davide