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

Custom answer box placement with MathJax

  • February 16, 2021
  • 3 replies
  • 52 views

Forum|alt.badge.img

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!

3 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • February 20, 2021

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.


Forum|alt.badge.img
  • Author
  • February 26, 2021

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.


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • February 26, 2021

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