WeBWorK Main Forum

TeX symbol as label in graph

Re: TeX symbol as label in graph

by Tim Alderson -
Number of replies: 0
Please note that in my question, $a denotes a scalar (which varies with seed), it is not intended to initiate LaTeX "math mode".

I can display linear equations within the graph using

Context("Numeric");
$a = random(3,9,1);
$x="x";
$ftex = "$a$x+1";

And then within the graph, provide:

 $label4=  new Label(3.2 , 2 , $ftex,'black',('center','center'));
 $graph1 -> lb($label4);

(improvements welcome!)

But can not figure out how to get a formatted LaTeX expression to appear (specifically one involving symbols or letters such as \theta).

Thanks.