Greek letters, italics?

329 views
Skip to first unread message

Albert Schueller

unread,
Mar 14, 2012, 5:57:15 PM3/14/12
to jsxg...@googlegroups.com
Is it possible to put Greek letters and/or italicize fonts?

Murray

unread,
Mar 15, 2012, 12:08:18 AM3/15/12
to jsxg...@googlegroups.com
Hi Albert.

Yes it is possible. JSXGraph text is actually HTML, so just use HTML symbols like π or Ω.

Italics is achieved using <i> tags.

You can see an example on this page:

http://www.intmath.com/plane-analytic-geometry/1d-perpendicular-lines.php

Regards.

michael

unread,
Mar 15, 2012, 1:41:34 AM3/15/12
to jsxg...@googlegroups.com
Hi Albert,

it is exactly as Murray says, i'd only like to add that the text's display property has to be 'html' (which is the default). If it is set to 'internal' there's no way to use HTML entities or tags.


Regards,

Michael

Albert Schueller

unread,
Mar 15, 2012, 2:35:02 PM3/15/12
to jsxg...@googlegroups.com
Very nice.  One last question.  I tried enabling mathjax along with jsxgraph and then tried a simple '$\Delta x$' as a segment label and it didn't work.  I guess this means that the mathjax processor doesn't reach all the way into jsxgraph text.  Believe me when I say, this is not a complaint.  I am absolutely overwhelmed with how capable JsxGraph is.  I just want to make sure that there isn't some way that I'm missing to integrate mathjax and jsxgraph.

Your suggestion about using html tags and greek letters is a sufficient solution.

michael

unread,
Mar 15, 2012, 2:37:36 PM3/15/12
to jsxg...@googlegroups.com
MathJax should work, too. Here is an example:

Albert Schueller

unread,
Mar 15, 2012, 4:17:47 PM3/15/12
to jsxg...@googlegroups.com
Thanks.  That works!  Here's my first Jsxgraph:

Murray

unread,
Mar 15, 2012, 9:01:33 PM3/15/12
to jsxg...@googlegroups.com
Hi Albert

Nice graph. In this case, I would suggest using HTML entities, since in your current setup, when the user is dragging the point, the MathJax reverts to plain text.

But good to see it working!

Regards

Paolo Carnovalini

unread,
Mar 16, 2012, 4:49:58 AM3/16/12
to JSXGraph
Great job Albert!

kpef...@hotmail.com

unread,
Apr 9, 2012, 1:44:55 AM4/9/12
to JSXGraph
Hello there Albert,

I was having the same problem. In fact I couldn't get any "LaTeX" \
functions to work. But then I noticed in another thread that you have
to proceed any latex function with an extra \. So if you want to
produce and omega then use...

function(){return ' \\( \\omega \\)' ;}
or
function(){return '\\[ F= \\frac{5x}{\\theta}\\]' ;}

which solved my problem.

Regards,

Kevin
Reply all
Reply to author
Forward
0 new messages