[LON-CAPA-users] math formatting
James Sullivan
lon-capa-users@mail.lon-capa.org
Thu, 03 May 2007 17:47:22 -0400
I'm having some trouble with formatting of math equations, specifically fractions. The following is a code snippet that demonstrates the issue.
[code snippet follows]
<!-- pt type="loncapa/perl">
$a = &random(1,5,1);
</scr -->
<m>\[1/3\]</m>
<m>\[1/$a\]</m>
The fraction 1/3 is displayed as I would expect. On the other hand the fraction with the variable denominator bombs out in latex with an error message like:
-------------------------------
WARNING:
**** Error: Fatal Abnormal eqdepth 2 on display equation exit, line 0
occured while attempting to convert this TeX:
\[1/$a\]
-------------------------------
I assume I need to somehow escape the $a to pass the value of the perl variable. Can anyone provide some guidance on this.
Thanks a bunch,
Jay