a very small js library to include GRAPH COMMAND (lines,points, circle etc) and MATHsimbols

G

Giovanni Nicco

I developed a little javascript library for implement instruction like
LINE (x0,y0,x1,y1) or drawImage(x,y) and, to make it short, the graph
commands of JAVA. It is based on the <span> tag.

Also, based on the 'symbol' font and some trick with tables, i
developed a library to make maths on a web page (dinamically so to
have exercises always news for my students) for example the
instruction ww(frac(intrnd(1/10),intrnd(1/10)) prints a casual
fraction on the page and ww(exists,x,inset,A) prints the two
mathematical symbols and 'x' and 'A'.

This libraries have the very usefull property to work off-line (client
side), so students can change the code and make esperiments at their
home (and eventually re-put them on their own sites). It is also a way
to make students work with programmation (they love graphics)

You can see them at
www.giovanninicco.com/gnzip

or take them up at
www.giovanninicco.com/gnlib.zip.

If you are interested to use them or to develop some other
libraries,or just give a comment (good or bad) i would be very
pleased: (e-mail address removed)

Giovanni Nicco
 
L

Lasse Reichstein Nielsen

Also, based on the 'symbol' font ....
for example the instruction ww(frac(intrnd(1/10),intrnd(1/10))
prints a casual fraction on the page and ww(exists,x,inset,A) prints
the two mathematical symbols and 'x' and 'A'.

For this, you should not rely on the symbol font. From the example
page, I get:
---
ww(exists_,"x",inset,"A",_bar_,"x",leq,"1"); produces:
$ xÎA ½ x£1
---
I guess the character with the same number as the "$" sign comes out as
an "exists"-symbol in the symbol font, but that is not how fonts are
supposed to work.

My browser (Opera in this case) sees a "$" and thinks:
"a byte with the value 36 ... the page encoding is assumed to be
windows-1252 (that's a guess, the file contains not encoding
information and the server didn't send any), so that byte represents
Unicode code point 36 - the dollar sign. Does the currently selected
font, Symbol, have a glyph for code point 36? No. Bummer, then let's use
the default font."

It doesn't, as IE does, decide to arbitrarily show the 36th glyph
in the font file, a glyph that has the assiciated Unicode code
point 8707, not 36.

The code point for the "exists" symbol is 8707 (hexadecimal
0x2203). You can use it in a Javascript string as, e.g., "\u2203"
or in HTML as

or
&exist;

Ditto for the other Symbol glyphs, including greek letters.

Otherwise it looks fine in IE :)
/L
 
G

Giovanni Nicco

[...]
For this, you should not rely on the symbol font
You can use it in a Javascript string as, e.g., "\u2203"...

[...]

thanks, i will rebuild my library in that sense.
Bye
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top