Published
Edited
Jun 4, 2019
1 star
Insert cell
md`# MathJax 3`
Insert cell
output = math('\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt')
Insert cell
math = {
const { MathJax } = await require('https://bundle.run/mathjax3@3.0.0-beta.4/mathjax3/mathjax.js')
const { HTMLHandler } = await require('https://bundle.run/mathjax3@3.0.0-beta.4/mathjax3/handlers/html/HTMLHandler.js')
const { browserAdaptor } = await require('https://bundle.run/mathjax3@3.0.0-beta.4/mathjax3/adaptors/browserAdaptor.js')
const { TeX } = await require('https://bundle.run/mathjax3@3.0.0-beta.4/mathjax3/input/tex.js')
const { SVG } = await require('https://bundle.run/mathjax3@3.0.0-beta.4/mathjax3/output/svg.js')

const adaptor = browserAdaptor()
const handler = new HTMLHandler(adaptor)
MathJax.handlers.register(handler)
const html = MathJax.document('<html></html>', {
InputJax: new TeX(),
OutputJax: new SVG()
})
return tex => html.convert(tex, { display: true }).typesetRoot
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more