Scripsit
lb*****@hotmail.com:
I am trying to write up a page with Math formulas (statistical ones)
I'd suggest checking
http://www.cs.tut.fi/~jkorpela/math/ which might give
you both a general idea and some specific hints. The general idea is that
you can't do much with mathematical expressions beyond simple linear or
linearized expressions.
http://www.geocities.com/tekmonk2005/OnLineStats02.html
You're trying to present a general sum (with a summation symbol and with
index expressions below and above it) as well as a two-dimension division,
though a very simple one (1 over N). This gets rather complicated. Although
it can be arranged, to some extent and with some reservations, things get
awkward if you need lots of similar or more complicated expressions.
Using a different strategy, created a demo page for a way to present your
expression:
http://www.cs.tut.fi/~jkorpela/math/mean.html
It gives a reasonably good appearance on IE 7 but falls apart on other
browsers, since they don't support display: inline-block. (The technique
creates two-dimensional constructs from <spanelements wrapped inside an
outer <span>, making the outer <spanan inline block and the inner <span>s
blocks with small widths.) With considerable care and extra markup, you
could probably make it degrade gracefully into something readable and
correct, though flat, on other browsers.
In this case, I'd suggest something simple and linear, like
<p>μ<sub>N</sub= (∑x<sub>i</sub>)/N,
with i = 1, …, N</p>
This works reasonably, does not depend on CSS, and produces a readable
presentation. Anyone who can understand the nice two-dimensional equation
can probably understand this flattened presentation as well.
(Note: For simplicity, I haven't added any markup for making variables
appear in italics here.)
The thing is that I am not able to make it look OK using HTML. I
would like to somehow mark up parenthesis using the character entities
for vertical bars and solid front and back slashes, but
~
<td align="left">|</td>
~
doesn't appear to be working
Using a character reference like | is not relevant here. You could just
as well, or better, use the character | itself. But the problem is that you
are trying to construct a parenthesis-like symbol from \, |, and /. That
would not result in a good rendering even under the best circumstances. You
could use the parenthesis character itself in a large font.
On the other hand, when you have just 1 over N as a multiplier, you could
just omit the parentheses and perhaps put a multiplication sign (×)
after it.
Using a monospace font doesn't make a good impression. It may superficially
solve some problems, but it really won't take you far.
Does it make sense to waste your time learning MathML (http://
www.w3.org/TR/REC-MathML/) or is it better using a format like PDF?
No. Not for purposes like this. What you use depends on what you aim at and
how complicated your material is.
Notes on characters (my favorite topic):
You've used µ, which denotes the micro sign. It is historically based
on the Greek letter small mu but logically distinct from it, and may look
different, too.
You have used —— which is a bit tricky way, and other approaches
produce a long line more reliably. If you need the construct in other
contexts, note that em dashes are not joining in all fonts, i.e. there may
be a small gap between two consecutive dashes (at least unless you set their
font suitably).
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/