Forum Moderators: open

Message Too Old, No Replies

need to display "minus" signs on math web site

how can I display character entity consistently across browsers?

         

stapel

3:04 pm on Feb 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a math web site which necessarily uses "minus" signs on many of the pages. Last time I checked, the "alt-0150" method of displaying the en-dash was the best way to display the longer-than-a-hyphen character I was looking for. (Note that I'm not saying that this was the technically correct or "right" way; I'm only referring to getting a good display in as many browsers as possible.) I'm wondering now if browsers have developed enough that I should switch to a "<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">" tag in the header of my pages, and use "&#8211;" for the "minus" signs.

I've looked at this entity chart [fjordaan.uklinux.net] and this one [santagata.us] too. It looks like &#8211; is supported by most everything that my users are actually using now. So should I switch over?

Any advice and/or links appreciated. Thank you.

Eliz.

lammert

4:08 pm on Feb 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Did you try &ndash;? It is working on all browsers I tested it on and independent of the current character set of the page.

stapel

4:29 pm on Feb 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It has been my understanding (which may then have been and/or may now be incorrect) that the "&#number;" formatting was more often viewable than the "&entityname;" formatting. Has this changed?

Eliz.

bill

5:54 am on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



According to most lists I've seen the &minus; equivalent is &#8722; which shows up a bit longer than the &ndash; or &#8211;.

I've been using &#8722; for the minus sign on my sites in mathematical equations. That works with NN4.x on up in my tests (even though some of those charts don't agree).

the "&#number;" formatting was more often viewable than the "&entityname;" formatting. Has this changed?

It depends on which browsers you're trying to support. In my tests some of the numerical entities have more consistent support in older versions of Netscape. Just about everything over version 5.x of modern browsers will support the name entity.

stapel

1:14 pm on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just about everything over version 5.x of modern browsers will support the name entity.

That's useful information. Thank you!

Eliz.