Log in

View Full Version : mathematical notation in HTML



gib65
08-31-2011, 03:56 PM
Please have a look at this wikipedia article: http://en.wikipedia.org/wiki/Navier-stokes. Scroll down until you see those cryptic mathematical equations.

I would like to know if there is some kind of HTML tag that allows one to create mathematical notations such as this. Wikipedia has them setup as .png files, but it would be really convenient to be able to type them out in HTML. Can this be done?

jscheuer1
08-31-2011, 04:35 PM
You may use entities. See:

http://thegorillaguide.com/Ref_Special%20characters.html#section4

It's not a complete list. Hunting around the web should allow you to find more. Those that don't have entities can often be made with a numeric entity.

For instance the equivalent to symbol (≡) may be shown with:

≡

or:



And, with the right character encoding, many - though probably not all may be used directly in your HTML code.

But there could be browser differences, especially legacy browsers, and for browsers setup for languages other than English. Font availability might even be an issue. That's probably why Wikipedia elected to use images.

gib65
08-31-2011, 09:46 PM
Thanks jscheuer1

traq
08-31-2011, 11:56 PM
HTML5 also includes MathML (http://www.w3.org/Math/). browser support is not great yet, however. Fx requires certain fonts, and IE <9 requires a plug-in. (I don't know about other browsers.) If you have a very narrow target audience, this might not be too much of a problem, but obviously it would be if your site was meant for the general public.

traq
09-29-2011, 02:27 PM
I think that's been covered by the above replies. If you're asking about mathML specifically, here's a tutorial (http://www.dessci.com/en/reference/mathmlinxml/Introduction_to_Using_MathML_files/v3_document.htm) turned up by a quick Google search (http://lmgtfy.com/?q=mathml+tutorial).