<task>
Generalize your answer in Question 3 by completing the following statement:
</task>
<md>
<mrow> \text{The Power of a Power Property:}</mrow>
<mrow>
<answer inline shuffleOrder>
<label><m>(a^m)^n = </m></label>
<choice><m>a^{m+n}</m></choice>
<choice><m>a^{m-n}</m></choice>
<choice credit="1"><m>a^{mn}</m></choice>
<!-- <choice><m>a^i\cdot b^i</m></choice>
<choice><m>\dfrac{a^i}{b^i}</m></choice> -->
</answer>
</mrow>
</md>
Having issues where my text will center-display, but I can’t get my answer to display (show up). I am wondering what is wrong with my code.
Check out the second example here - <md>{:dn} – Nextra
Everything inside a math tag like <md> is rendered by MathJax, and we don’t know how to place a math input or a text input inside what MathJax is doing.
It doesn’t seem that PreTeXt, which is what DoenetML is based on, has a way to center align test. Or at least, there doesn’t appear to be tag that you can author to center a section of text.
The only way I see to cheat is to use a <tabular halign="center">.
The other (more common?) way to cheat within PreTeXt is to use a sidebyside with only one thing in it. However, the widths attribute in a sidebyside is always a little mysterious to me. I usually do some trial-and-error, and then sometimes I have to look up documentation anyway. Something about unused percentages being equally divided into the margins, maybe? *shrug*
Anyway, this at least kind of works to center an answer box.
<sideBySide widths="30%">
<p>
<answer><label><m>3+2=</m></label>5</answer>
</p>
</sideBySide>
Thank you! That worked nicely!