[LON-CAPA-users] Algebra Expression Rendering in LON-CAPA
Damien Guillaume
damieng at msu.edu
Tue Jan 17 11:29:18 EST 2017
You have to use eval="true" for <m> if you have variables inside. And
make sure the display is using MathJax.
Try this:
<m eval="on" display="mathjax">$$ \frac{$numer}{$denom} \left[ \pi +
\sum_{n=1}^{\infty} \frac{$sum_numer}{$sum_denom_n_coeff n -
$sum_denom_const} \cdot \sin($w nt) \right] $$</m>
If you put the whole expression into a variable, you will also have to
escape the "\" with "\\".
Damien
> Hi Damien,
>
>
>
> Thanks for your reply. At least now I know that I was chasing the wind. I was able to get close by using Sigma in place of sum in the expression, but then only the "n" was subscripted, not the "=1" part, even though I used braces: _{n=1}...
>
>
>
> I had initially tried to render the equation in the xml portion of the problem, but when I did that I had a lot of trouble properly displaying some of the variables using the <m>$...$</m> command. It worked in some places but not others.
>
>
>
> This is as close as I have been able to get to a proper expression:
>
> [cid:image001.png at 01D26DF0.DF719FF0]
>
>
>
> In the xml portion I have been able to render it nicely:
>
> [cid:image002.png at 01D26DF6.82F21010]
>
> ...but only if I hard-code the constants in the two fractions and inside the sine. Is there a way to display variable values from the perl script in place of the constants? I have tried a few things, but all were unsuccessful.
>
>
>
> Thanks,
>
>
>
> Gene L. Harding, PE
>
> Associate Professor of ECET
>
> 574-520-4190
>
> Purdue University-South Bend
More information about the LON-CAPA-users
mailing list