#### Do you have a question? Post it now! No Registration Necessary. Now with pictures!

**posted on**

April 8, 2007, 4:36 pm

I am trying to write up a page with Math formulas (statistical ones)

~

http://www.geocities.com/tekmonk2005/OnLineStats02.html

~

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

~

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?

~

Also I would prefer to use and authoring tool like scribus and save

files as PDF. Any tutorials that make sense out there. I have had

cases in which "Google" made me waste time. This is why I would rather

ask

~

lbrtchx

## Re: Editing Math Formulas

On Apr 8, 6:36 pm, lbrt...@hotmail.com wrote:

learningMathML(http://www.w3.org/TR/REC-MathML /) or is it better using a format

like PDF?

You should better use MathML than HTML to code mathematical formulae.

The W3C specification indicates that MathML is not supposed to be

coded directly. You can use a WYSIWYG editor such as Amaya.

Fred

## Re: Editing Math Formulas

Scripsit fred wang:

Why? How many browsers render MathML at all? If you present something in

MathML format on the web, how many people will be able and willing to view

it a) instantly without installing new software or b) at all?

If HTML (and CSS) isn't enough for your math purposes, then use some

software to generate math formulas as images (as needed - e.g. MathWorld

uses this approach extensively even for simple formulas where it's not

needed).

Well, it's surely not suitable for that, since it's a confusing mixture of

logical and physical markup.

--

Jukka K. Korpela ("Yucca")

http://www.cs.tut.fi/~jkorpela/

## Re: Editing Math Formulas

Yes, it is the major reproach we can do to MathML : it is not widely

used (personnaly only a third of people visiting my website uses

Firefox and so are able to view Mathml). Nevertheless is it really a

good reason not to use it ? W3C made MathML not only to solve the HTML

difficulties to display mathematical formulae but also for some

important issues such as accessibility, interaction with computer

algebra system, search engine for mathematical formulae (such as

MathWebSearch)... If nobody starts to use it then all this good plans

will never be applied.

I disagree with the approach you propose. As I said, MathML is the

right way to display mathematical formulae wheras it is not the

purpose of HTML+CSS. You seem to know a lot about CSS so you can

understand that it is as if somebody uses <table> instead of CSS for

the layout of his webpage. This does not correspond at all to the idea

of "semantic web".

Moreover, if MathML code is difficult to produce by hand, making

formulae with CSS doesn't appear easier. You admit that your method

could not be applied for more complex formulae and propose images, but

let me tell you that it is worse : bad printing quality, size on

server, time to load pictures, layout not adpated with surrounded

text, problems for visually impaired (Firevox already exists for

MathML), impossibility to zoom in/out...

The fact it could not be displayed by the browser the most used is

really a problem, but we can take great advantages from MathML, so

isn't it worth ?

Cordially,

Fred

## Re: Editing Math Formulas

Thanks for motivating me to fix my MathPlayer installation. A few

months ago it quit working after I updated to Internet Explorer 7.

(Not a big deal since normally I use Firefox.) I never got around to

repairing it till seeing your postings. It was time to get a fresh

download anyway; I hadn't been keeping up with the updates. It only

took a few minutes on dial up. Seems to be working fine.

One annoyance is that my IE 7 security settings are fairly strict, and

they block MathML content unless the site is on my "trusted" list. But

I get much the same deal from Firefox: it tells me some content is

blocked, and I have to explicitly give permission to let it through.

Even so, I like equations in MathML better than images.

Just for entertainment I have used Windows Notepad to manually create

the MathML for some horrendous equations. It can be done. The secret

is to first do all of the topmost level, then fill in the detail one

level down, etc. In anything complicated it's too easy to get lost if

you try to code the equation in one pass from left to right.

--

To reply by email remove INVALID

## Re: Editing Math Formulas

I also had this problem with IE7, but I didn't try to update

Mathplayer. I'm a bit surprised that MathML content are blocked with

your browsers... BTW, I forgot to say that IE7 seems to refuse

application/xhtml+xml content, so it could be a problem if MathML is

in a xml file. On my website, I send a text/html header to IE7 thanks

to a PHP script.

At the beginning, I generated some fragments of MathML with Amaya, I

completed manually, I made several copy/paste etc. I know this is

possible, but I don't think I is a good idea when you have to make

complex formulae. In the W3C MathML specification, it is said a

WYSIWYG editor should better be used. I agree with it and that's why I

contribute to the W3C's editor.

## Re: Editing Math Formulas

Scripsit lbrtchx@hotmail.com:

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.

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 <span> elements wrapped inside an

outer <span>, making the outer <span> an 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.)

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.

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/

## Re: Editing Math Formulas

lbrtchx@hotmail.com wrote:

I use PDF, but there is another reason I use PDF. I generate output that

is intended to be printed, rather than read on screen.

I can't comment on MathML. In the few occasions where I have needed math

formulas on screen, and HTML was not adequate, I have used images.

I spent a couple of weeks reading the PDF spec published by Adobe, and

just trying things out using Perl scripts to generate the output. It was

not easy, so it may not be the best approach for you. A good place to

ask about your options would be comp.text.pdf.

## Re: Editing Math Formulas

I see korpela knows exactly where it hurst ;-), but I also clearly

see Fred's point and since as they say "the client is always right", I

will have to author two files one as mathml and the other as pdf

~

just trying things out using Perl scripts to generate the output.

~

You might know about this OS project, but you should check out

http://podofo.sourceforge.net/ they even have a "PDF browser"

~

http://prdownloads.sourceforge.net/podofo/podofobrowser-0.4.tar.gz?download

~

lbrtchx

## Re: Editing Math Formulas

Scripsit lbrtchx@hotmail.com:

And what would you then offer to the World Wide Web?

Firefox is still a minority browser and will probably remain that way.

Besides, its MathML support does not impress me. When viewing e.g. the

MathML examples at

http://www.zvon.org/HowTo/Output /

(most of which are fairly simple, often nothing more than a sequence of

characters that could be written simply in HTML), I find some good

renderings, many tolerable renderings, and some real failures.

If you really have professional-quality math papers to be distributed as

printed, though in electronic format, then use some flavor of TeX

___or___use

some software that produces PDF for you. It wouldn't really be authoring for

the WWW - just using HTTP as the transport protocol.

If you wish to author for the WWW, you have to adapt to the current and

near-future limitations. There's a lot less you can do than in, say, AMSTeX

in the hands of a competent user, but considerably more than in plain text.

--

Jukka K. Korpela ("Yucca")

http://www.cs.tut.fi/~jkorpela/

## Re: Editing Math Formulas

I don't know a lot about LaTeX, but I think it is a good choice if you

simply want to produce printable documents. The only reproach I find

is that it is not really accessible for beginners, as you have to

learn its syntax. Nevertheless, it is widespread enough, so you will

not have many problems to find help and tools to produce pdf files.

Now korpela asks "And what would you then offer to the World Wide Web?

". As I said, World Wide Web philosophy is a bit different than

printable documents (that finally is equivalent to the CSS method

proposed) and the choice of MathML is more appropriate. To make web

pages readable by Firefox, you should save it as xml file. Here is an

example :

http://www.maths-informatique-jeux.com/maths/mathml

___test/infinite___set_theory.xml

. To create web pages, the W3C's web browser/editor can be found

here : http://www.w3.org/Amaya/ .

Fred

## Re: Editing Math Formulas

I think I will end up going for a three prompt strategy

~

1._ using LaTeX to author Math documents and produce pdf printer-

friendly docs.

I really don't think that the web was design as the next "TV set" or

"book" to me the web is just a "click and go" medium. Besides most

tech people I know like to print out their own papers and jot down

their own notes on them

~

Even the firefox people recommend to use LaTeX

// __ http://www.mozilla.org/projects/mathml/

"The lingua franca for formula-intensive documents is TeX/LaTeX and

the use of MathML is not yet widespread."

~

2._ use these off and online LaTeX > MathML translation packages

//

______http://pear.math.pitt.edu/mathzilla /

~

3._ Advising people to install Firefox (which is my site's designed

for and preferred browser)

~

lbrtchx

## Re: Editing Math Formulas

On Apr 8, 8:36 pm, lbrt...@hotmail.com wrote:

I say it is a per case question. The deal is that MathML is for "math

amateurs". Any real scientific exchange goes in TeX / LaTeX format, in

this format scientifics are posting, preparing their works for

publishing and it will never change for MathML (and for what sky

blue?)

There is a number of tools to convert (La)TeX to MathML, but because

of principal structure differences this process is "one-wayed". So you

can convert TeX to MathML, but there is no reliable way to say save

TeX as MathML, edit it, save changes as TeX etc.

This way the options are:

1) You want to make a few formula-intensive pages for display without

planning any further shared editing. The pages are intended for a

particular auditory where you know that the troubles to install - if

missing - required software are lesser important than an ability to

have well structured math data in supported format.

MathML may be your friend then. For non-Gecko browsers there is free

MathPlayer plugin

http://www.dessci.com/en/products/mathplayer/download.htm

On IE 7 it also leads to security dialog, but see what is said above

about priorities.

2) You want to make a few formula-intensive pages for display AND

planning some further shared editing (scientific feedback,

corrections, additions etc). The pages are intended for a particular

auditory where you know that the troubles to install - if missing -

required software are lesser important than an ability to have well

structured math data in supported format.

In this case use the standard TeX format right away. This plugin

http://groups.google.com/group/sci.math/browse_frm/thread/39f1c0f2b3709a8a/9ebeac943b52f63c

got a good feedback so far, but there are more of course.

3) You want to make a few formula-intensive pages for display without

planning any further shared editing. The pages are intended for the

most wide Web auditory.

Use images or Flash on your HTML page or make the whole page in PDF.

#### Site Timeline

- » Contract employment website ~ www.jobshoppinfools.com
- — Next thread in » HTML Authoring Forum

- » HTML headings article
- — Previous thread in » HTML Authoring Forum

- » HTML 5 validation software?
- — Newest thread in » HTML Authoring Forum

- » need help creating a 404 file
- — The site's Newest Thread. Posted in » HTML Markup Language