see the coding snippet
<div id="MathOutput" class="output">What will be the output of $${x^2}$$</div>
This displays the string "What will be the output of" on a single line and the expression on the second line
How can I make the expression display beside the line in continuation?
Use $x^2$
or \(x^2\)
rather than $$x^2$$
. The single dollars are for in-line math equations, and double dollars are for equations displayed on a separate line.
Single dollars are not enabled by default in MathJax, so if you want to use those, you need to include them in the inlineMath
array in your tex2jax
block in your MathJax configuration. See the tex2jax documentation for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With