Inline Answer with LaTeX

Hey Everyone,

I am having difficulty with putting an <answer> within some LaTeX. I have been able to do it individually, but when I use <md> and multiple rows, the code does not work.

I want my students to choose g(x) and g’(x). Here is the original code:

Organizing what we have found for both <m>f,g</m> and their respective derivatives, we can now apply the Chain Rule, 
    <md>
        <mrow><m>\dfrac{dy}{dx}&=f'\big(g(x)\big)\cdot g'(x)</m></mrow> (PUT CODE HERE)
        <mrow><m>&=f'\left(3x+2\right)\cdot 3</m></mrow>
        <mrow><m>&=4(3x+2)^3\cdot 3</m></mrow>
        <mrow><m>&=\boxed{12\left(3x+2\right)^3}</m></mrow>
    </md>

Here is what I came up with, but it does not work in the above code. Any helpl is appreciated

<p>
         <answer inline><label> <m>\dfrac{dy}{dx}=f'\big(</m></label>
           <choice credit="1"><m>g(x)</m></choice>
          <choice><m>g'(x)</m></choice>
         </answer><m>\big)\cdot</m><answer inline>
             <choice credit="1"><m>g(x)</m></choice>
          <choice credit="1"><m>g'(x)</m></choice>
         </answer>
        </p>

The <md> and family of tags are rendered by MathJax. It does not know how to render objects like answer blanks or drop-downs. It is possible that there is a way to modify/extend MathJax to allow it to render such objets, but I’m not familiar with it.

Years ago, I talked with the developer of MathJax about the possibility of creating a way to render our <mathInput> (or <answer>x</answer>) inside MathJax, and he was skeptical it would work because of its dynamic width. The inline <choiceInput> (such as your <answer>) at least doesn’t change width, so maybe a way could be found to add that?

I don’t know a workaround for getting a blank in an aligned multi-line mathematical expression like that. But, if you gave up alignment, you could use <m>s and put the <answer> outside the <m>s. Presumably it wouldn’t look pretty.

That’s ok. Thank you for answering!