MathJax Example

Demonstrates using MathJax to display the formula for the volume of a sphere

by Andy Kuds

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-AMS_CHTML-full"></script>
<body>
  <h1>inline-block</h1>
  <div id="old">
    \( \sqrt[7]{\log_2\left(x\right)} \)
  </div>
  <h1>inline-flex</h1>
  <div id="new">
    \( \sqrt[7]{\log_2\left(x\right)} \)
  </div>
</body>

CSS

body {
  font-size: 200%;
}

#new .mjx-math * {
  display: inline-flex;
  align-items: baseline;
}