I'm having trouble displaying an equation using mathJax in JSXgraph version 0.99.7.
While simple equations like (r^2=(x-h)^2+(y-k)^2) render correctly, more complex forms like functions or fractions such as (1=\frac{(x-h)^2}{a^2}+\frac{(y-k)^2}{b^2}) do not display properly.
Check out this image
Below is the current code snippet I am using to draw an ellipse:
var graph = board.create('ellipse', [A, B, C], {
id: field,
fixed: true,
useMathJax: true,
withLabel: true,
name: '',
strokeColor: color,
strokeWidth: 2,
fillColor: shade,
fillOpacity: 0.3,
size: 2,
dash: dashed,
highlightStrokeColor: 'red',
highlightStrokeWidth: 3,
highlightFillColor: shade,
highlightFillOpacity: op
});
graph.on('down', function (e, i) {
showMaster(this.id);
graph.setName('1=\\frac{(x-h)^2}{a^2}+\\frac{(y-k)^2}{b^2}');
});
Do you have any suggestions to make the equation render correctly?