Custom answer box placement with MathJax | XM Community
Skip to main content

Hello,

We are using MathJax to create math questions. We want to create questions where answer boxes appear under a square root sign, or within a vector-matrix.
So it could look something like:
sqrt example.png
We can create a square root without the overline by adding text before the answer boxes, for example with "

√".

But is there a way to to create an overline over the box, or perhaps to embed the answer box within a picture?
Thanks!

You could look at adding styles to the following two elements:

mjx-surd
and
mjx-box
.
mjx-surd
refers to the sqrt sign, increase its size.
mjx-box
refers to the equation inside it, increase its padding.
Something like:
 
You'll need to change the values based on the look you desire. The
mjx-sqrt 
refers to everything inside the square root. I've added the colors for you to see which element is being effect by which code block.


Thanks again! How would we move the actual text-entry box to underneath or within a square root sign as the divisor of a fraction? If I am reading your code correctly, it just allows us to edit the size and style of the square root sign, and not move the answer boxes.


mjx-surd
refers to the sqrt sign, increase its size.
mjx-box
refers to the equation inside it, increase its padding.


Leave a Reply