How can I draw a rectangle in MathJax?
width = 5, length = 10 (units = mm)
thanks!
You can use \Rule{10mm}{5mm}{0mm}
to get a black rectangle with the given size. Use \color{red}{\Rule{10mm}{5mm}{0mm}}
to get a red rectangle.
<script src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS_CHTML"></script>
<p>
Black rectangle: \(\Rule{10mm}{5mm}{0mm}\)
</p>
<p>
Red rectangle: \(\color{red}{\Rule{10mm}{5mm}{0mm}}\)
</p>