Asking on behalf of Mike Weimerskirch, who was bothered by how far out the degree symbol sits past the answer button in the example shown. This would clarify to the students that there is no need to include the units in the input box itself.
I’m imagining something like <answer includeUnits="\text{m}>…`, and maybe this attribute takes Latex by default?
Would one ever want to put something besides units there? Maybe it could be something more general.
Or, alternatively we could just say you have to use the long form in this case.
<mathInput forAnswer="$ans" name="mi">
<label><m>\sin^{-1}(0) =</m></label>
</mathInput><m>{}^\circ</m>
<answer maxNumAttempts="1" name="ans">
<award><when>
$mi = arcsin(0)
</when></award>
</answer>
1 Like
Moving check work boxes after stated units is one of the primary reasons I use sectionWideCheckWork. You made it so that I can put those on an individual p tag, which means I can use them when there is in fact only one answer box in the “section.” I usually use the words and not the symbol for units so it looks a little weird, but
<p sectionWideCheckWork>
<answer><label><m>\sin^{-1}(0)=</m></label>0</answer><m>^{\circ}</m>
</p>
produces
1 Like
Hah! Very nice trick! I would not have thought of that, thank you.
1 Like
We discussed the question of including units or other information after an input box in our community feedback meeting today.
We wrestled with how to make this “additional label” information coordinate with the regular <label>, given that a labelPosition attribute can move the label between “start” and “end”. We were also uncertain how to make this second label information accessible for screen readers.
We ended up concluding that the “additional label” should be restricted to units, as then we at least have the semantics to deal with accessibility. (We didn’t have a solution for the case with labelPostion="end".)
The proposal is to create a <unitLabel> component that you can add as a child, just like <label>. One would author it the same way: add <m> where you want mathematics. Then MathJax should be able to take care of reading it.
1 Like