[LON-CAPA-users] Math Display Problem

Harding, Gene L glhardin at purdue.edu
Sun Mar 29 22:25:03 EDT 2020


Hi,

I am having trouble getting equations to render properly. I have done this before, and have even tried directly copying code I have used before, but cannot get it to display properly.

This is one of the equation definitions:
  $PwrIntegral = "p(x) = \frac{1}{T} \int_0^T v(x) i(x) dx";

This is the radiobuttonresponse code using it:
    <radiobuttonresponse max="10" randomize="yes">
        <foilgroup>
            <foil location="random" value="true" name="foil1">
                <startouttext />
                    <m eval="on" display="mathjax">$ $PwrIntegral $</m>
                <endouttext />
            </foil>
            <foil location="random" value="false" name="foil2">
                <startouttext /><m eval="on" display="mathjax">$ $RMSIntegral $</m><endouttext />
            </foil>
            <foil location="random" value="false" name="foil3">
                <startouttext /><m eval="on" display="mathjax">$ $AvgIntegral $</m><endouttext />
            </foil>
            <foil location="random" value="false" name="foil4">
                <startouttext />bla<endouttext />
            </foil>
            <foil location="random" value="false" name="foil5">
                <startouttext />This is foil Five, and it is currently set to "false."<endouttext />
            </foil>
        </foilgroup>
    </radiobuttonresponse>

I can't send a snip of the display to the listserv, but it looks something like this:
p(x) = rac1Tint0Tv(x)i(x)dx

It responds to the _subscript and ^superscript, but completely ignores the \frac and \int commands. I know I must be doing something dumb, but don't know what, and don't understand why a different expression I pulled from a correctly working problem does not work in this one.

If anyone can see what I'm doing wrong, please help. The exam is scheduled for first thing Tuesday morning...

Best regards,

Gene L. Harding, PE
Associate Professor of ECET
Purdue University
574-520-4190
https://polytechnic.purdue.edu/south-bend/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20200330/1c5ab8e3/attachment-0001.html>


More information about the LON-CAPA-users mailing list