I tried to get a function to show up in it's TeX form as follows:
$a = random(1,9,1);
$b = non_zero_random(-9,9,1);
$f = Formula("$a + $b x");
$x = random(1,9,1);
BEGIN_TEXT
Evaluate the algebraic expression for the given value(s):
\( {$f->TeX} \), for \( x = $x \)
$BR
Answer: \{ ans_rule(20) \}
END_TEXT
This is what shows up: (2+(-5)*x)
If I change the context to texStrings before BEGIN_TEXT, then back to normalStrings after END_TEXT and remove the "->TeX", then the formula shows up nicely. I thought we could do this without changing the context?
Thanks--rac