# Mathematical coding

How do I do equations?

Depends on what you want to do. Quote this post for an explanation.

1 + 1 = 2
x + y = z
[symbol]a[/symbol] = x
x[sup]2[/sup] = 1
x[sub]3[/sub] = 2
x[sup][symbol]a[/symbol][/sup] = 2

I’m comfortable with superscript and subscript - it’s more advanced stuff like displaying a / b properly.

You can’t here. HTML doesn’t even allow good mathematical formatting, and the code in use here disallows a lot of what HTML does give you.

On the web, the only general way to show math in a webpage is to make an image of the equation you’re discussing and show that, or break into MathML and really impress the five geeks who read the page.

You could resort to LaTeX notation, which is ugly but is expressable entirely with ASCII. It’s pretty well-understood (and easily-learned) among the crowd geeky enough to be doing more than superscripts/subscripts, but it doesn’t actually solve the problem of getting them to look right. It is, however, unambiguous.

Hmm… I could have sworn I’d seen some equations displayed somewhere on the SDMB. Clearly I’m mixing it up with elsewhere.

There’s the <symbol> font tag which wil give you some special symbols:[symbol]

I saw a post using logical operators a while back. It was probably just creative use of the <Font> tag:
A B C D E F G H I J K L …

Squink, how’d you do that? Symbol font doesn’t work on Mozilla, and yet, I’m seeing a line of symbols in your first two example lines, including the integral sign, partial derivitive, square root, and several different Greek letters.

Your final line, though, I’m just seeing as a bunch of pictures, mostly of various buildings.

I used the <symbol> tag from vBulletin, not a <font=> tag.
Maybe vB exports the font itself when you use the <symbol> tag?
I can’t think why they’d distinguish the two tags if they’re not doing something differently.

Most of the visible symobls in Squink’s post (on the first two lines of symbols) appear as unicode (i.e. #&<nnnn>; ) when I “view source” on the page. As the vast majority of modern browsers support Unicode, we can almost all see those symbols that are thus rendered.
Some of the symbold there are not in Unicode – those I (and I gather Chronos too) see as boxes.

I too see the last line of Squink’s post as some pictures, mostly of buildings – those happen to be the rendering of the Upper Case A, B, C… of the “Webdings” font (yeah, I saw that in “view source”, too. Nifty little tool, that! :))

Dani

Noone Special, you must be using IE, because that’s what I see in IE.

Using Firefox, I see the first 2 lines the same as Chronos, and they display pretty much the same with view source. However, they’re entirely different from IE! Also, the last line is just the capital letters A-L.