Math blocks
$$
x^2
$$
.
<pre><code class="language-math math-display">x^2
</code></pre>
Mass and energy:
$$E=mc^2$$
.
<p>Mass and energy:</p>
<pre><code class="language-math math-display">E=mc^2
</code></pre>
On one line, the TeX must hold more than spaces.
$$x$$
$$ $$
.
<pre><code class="language-math math-display">x
</code></pre>
<p>$$ $$</p>
.
$$ $$
$$
x
.
<pre><code class="language-math math-display">x
</code></pre>
.
$$