[LON-CAPA-users] Interaction between jsMath or LaTeX and randomized multiple choice answers??

Mills, Douglas G dmills at illinois.edu
Thu Oct 19 17:08:17 EDT 2017


Thanks Stuart. I was of course barking up the wrong tree looking at what the ones that don't appear have in common when what I needed as you point out was to look at what the ones that do appear had in common.

And thanks for the reminder of what is currently supported.  

Thanks also to Peter and Yuk!

 
Doug

 

Douglas Mills

Director of Instructional Technology

Department of Chemistry

University of Illinois


 

On 10/19/17, 3:44 PM, "lon-capa-users-bounces at mail.lon-capa.org on behalf of Stuart Raeburn" <lon-capa-users-bounces at mail.lon-capa.org on behalf of raeburn at msu.edu> wrote:

    Doug,
    
    Whether the display attribute is set to jsMath or MathJax makes no  
    difference in LON-CAPA 2.11.2 because use of jsMath is discontinued.
    
    Starting with 2.11.2, MathJax is used instead in cases where jsMath  
    use is indicated in a resource, in a user's preferences, or in course  
    preferences.
    
    Anyway, the pattern here is that if the the first foil from the  
    foilgroup is not included among the four randomly chosen from the six  
    foils in the foilgroup, then the math expression is not displayed.
    
    The reason is that the script tag which loads MathJax.js is prepended  
    to the "math/tex" script tag which wraps the math expression in foil 1.
    
    If that foil is absent then the tag which includes MathJax.js is not  
    present in the page, and none of the expressions are displayed.
    
    If the display attribute is removed from the m tags in these foils,  
    and the Math renderer is set to "MathJax" in a user's preferences,  
    then the expressions are always displayed because the script tag which  
    includes MathJax.js is present immediately after the document's body  
    tag.
    
    
    Stuart Raeburn
    LON-CAPA Academic Consortium
    
    > Hi All,
    >
    > I've substituted MathJax for jsMath and tested and am actually  
    > getting the same results.  IF I set the max number of options to
    show
    > to 6 then all 6 show every randomization.  If I leave it as given  
    > below though with the max number of options to show set to 4, then  
    > for a number of combinations, the LaTeX does not display at all. I  
    > keep looking to see if I can discern a pattern and I cannot;
    however,
    > it does seem to be consistent. The following selections and orders
    in
    > my testing when they are chosen as 4 out of 6, will not display the LaTeX:
    >
    > 6324
    > 5624
    > 2546
    > 3564
    > 5362
    > 5263
    >
    > The following orderings, some of which contain similar combinations  
    > do display the LaTeX
    >
    > 4621
    > 4612
    > 1465
    > 1264
    > 5261
    >
    > This is all with the display set to MathJax rather than jsMath.
    >
    > Is there an error in the LaTeX code?  Is there some nasty
    interaction
    > between LaTeX and the choosing and ordering of a random number of  
    > prompts for an optionresponse?
    >
    >
    > Doug
    >
    > Douglas Mills
    > Director of Instructional Technology
    > Department of Chemistry
    > University of Illinois
    >
    >
    >
    >
    > On 10/19/17, 8:57 AM, "Mills, Douglas G" <dmills at illinois.edu>
    wrote:
    >
    >      Thanks Peter. Yes, these are older problems and to be honest, I  
    > wasn't remembering which system, jsMath or MathJax was the newer  
    > option.  I had seen the note about fonts but since the problems  
    > appear at least half the time had figured it couldn't be missing  
    > fonts.  I will explore these additional options. Thank you for your  
    > help!
    >
    >
    >      Doug
    >
    >      Douglas Mills
    >      Director of Instructional Technology
    >      Department of Chemistry
    >      University of Illinois
    >
    >
    >
    >
    >      On 10/18/17, 8:41 PM, "lon-capa-users-bounces at mail.lon-capa.org  
    > on behalf of Peter Dencker"
    <lon-capa-users-bounces at mail.lon-capa.org
    > on behalf of dencker at math.uni-luebeck.de> wrote:
    >
    >
    >          As noted in the manual, setting the attribute display to
    jsmath is
    >          generally discouraged as it requires users to have installed
    jsmath
    >          fonts on their computer.
    >          (https://loncapa.msu.edu/adm/help/Authoring_Output_Tags.hlp)
    >
    >          The last release of jsMath was more than 4 years ago. It was
    
    > succeeded
    >          by MathJax. Forcing the use of this math rendering engine
    with <m
    >          display="MathJax"> seems to work in your example.
    >
    >          The math rendering can be selected by the user or the course
    >          coordinator. Using your example without the display
    attribute
    > in <m> ..
    >          </m> and forcing the jsMath math rendering as course  
    > coordinator seems
    >          to work. But using your example with display attribute
    "MathJax" and
    >          forcing the jsMath math rendering as course coordinator does
    not. I
    >          would like to recommend to omit the display attribute in <m>
    .. </m>.
    >
    >          - Peter
    >
    >          Am 18.10.2017 um 20:00 schrieb Mills, Douglas G:
    >          > HI All,
    >          >
    >          > Below is code for a problem that is acting quite
    strangely.
    >   If you put this into your authoring space and hit new randomization
    
    > a few times, you'll see that in some instances the LaTeX doesn't  
    > display at all for any of the answers. I added the "1:" etc. at the  
    > front of each one to try to get a handle on what was happening. I'm  
    > seeing that in some combinations of four, such as 6532, 3265, 6432,  
    > 4365 and 3625 (and some others), the LaTeX does not show.  Noticing  
    > that several of the combinations involved 2,3,5 and 6, I removed  
    > options 1 and 4 and left the rest of the code as is.  Under those  
    > conditions, even the combinations that do not appear when there are
    6
    > options to choose from (6532 for example) DOES appear when there are
    
    > only 4 options to be chosen from.  This leads me to suspect that  
    > there is some type of interaction going on between the LaTeX and the
    
    > choosing of 4 out of 6 options in the problem below.
    >          >
    >          > Maybe I'm missing something obvious?  All help
    appreciated!
    >          >
    >          > Doug
    >          >
    >          > <problem>
    >          > Which of the following are variations of the ideal gas
    law?
    >          > <optionresponse id="14" randomize="yes" max="4">
    >          >     <foilgroup checkboxoptions="nochoice"  
    > options="('True','False')" checkboxvalue="True">
    >          >
    >          >         <foil value="True" name="Foil1">
    >          >             <startouttext />1: <m display="jsMath">$V =  
    > \frac{nRT}{P}$</m><br/><endouttext />
    >          >         </foil>
    >          >         <foil name="Foil2" value="True">
    >          >             <startouttext />2: <m display="jsMath">$P =  
    > \frac{nRT}{V}$</m><br/><endouttext />
    >          >         </foil>
    >          >          <foil value="True" name="Foil3">
    >          >             <startouttext />3: <m display="jsMath">$n =  
    > \frac{PV}{RT}$</m><br/><endouttext />
    >          >         </foil>
    >          >        <foil value="True" name="Foil4">
    >          >             <startouttext />4: <m display="jsMath">$T =  
    > \frac{PV}{nR}$</m><br/><endouttext />
    >          >         </foil>
    >          >         <foil value="True" name="Foil5">
    >          >             <startouttext />5: <m display="jsMath">$R =  
    > \frac{PV}{nT}$</m><br/><endouttext />
    >          >         </foil>
    >          >         <foil name="Foil6" value="True">
    >          >             <startouttext />6: <m display="jsMath">$PV =  
    > nRT$</m><br/><endouttext />
    >          >         </foil>
    >          >
    >          >     </foilgroup>
    >          > </optionresponse>
    >          >
    >          > </problem>
    >          >
    >          >
    >          >
    >          >
    >          > _______________________________________________
    >          > LON-CAPA-users mailing list
    >          > LON-CAPA-users at mail.lon-capa.org
    >          >
    https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.lon-2Dcapa.org_mailman_listinfo_lon-2Dcapa-2Dusers&d=DwIGaQ&c=nE__W8dFE-shTxStwXtp0A&r=VsGo3jOm8tGLd6f-KlhT-g&m=_jm3SGEQgjp1UVOGqkoPNsUHNHqGcJyOGed23fbyXTI&s=1lEzzjFdixycl_Ham__G5PcM_oa2Ckt6WTYC2vzeT9Q&e=
    >          >
    >
    >
    >          --
    >          Dr. Peter Dencker
    >              wissenschaftl. Mitarbeiter
    >
    >          UNIVERSITÄT ZU LÜBECK
    >              INSTITUT FÜR MATHEMATIK
    >
    >              Ratzeburger Allee 160
    >              23562 Lübeck
    >
    >              dencker at math.uni-luebeck.de
    >
    >              www.math.uni-luebeck.de
    >          _______________________________________________
    >          LON-CAPA-users mailing list
    >          LON-CAPA-users at mail.lon-capa.org
    >          
    >
    https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.lon-2Dcapa.org_mailman_listinfo_lon-2Dcapa-2Dusers&d=DwIGaQ&c=nE__W8dFE-shTxStwXtp0A&r=VsGo3jOm8tGLd6f-KlhT-g&m=_jm3SGEQgjp1UVOGqkoPNsUHNHqGcJyOGed23fbyXTI&s=1lEzzjFdixycl_Ham__G5PcM_oa2Ckt6WTYC2vzeT9Q&e=
    >
    >
    >
    >
    > _______________________________________________
    > LON-CAPA-users mailing list
    > LON-CAPA-users at mail.lon-capa.org
    >
    https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.lon-2Dcapa.org_mailman_listinfo_lon-2Dcapa-2Dusers&d=DwIGaQ&c=nE__W8dFE-shTxStwXtp0A&r=VsGo3jOm8tGLd6f-KlhT-g&m=_jm3SGEQgjp1UVOGqkoPNsUHNHqGcJyOGed23fbyXTI&s=1lEzzjFdixycl_Ham__G5PcM_oa2Ckt6WTYC2vzeT9Q&e=
    >
    
    _______________________________________________
    LON-CAPA-users mailing list
    LON-CAPA-users at mail.lon-capa.org
    http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
    



More information about the LON-CAPA-users mailing list