How to write mathematics on Medium

The same post as seen on two different devices. The text in the image doesn’t scale with the main text.
var svg = document.getElementById('svg')
var svgNS = svg.namespaceURI
function addAttributes(elt, attr) {
for (var key in attr) {
elt.setAttribute(key, attr[key])
}
return elt
}

function add(eltName, attr) {
var elt = document.createElementNS(svgNS, eltName)
svg.appendChild(elt)
if (attr) addAttributes(elt, attr)
return elt
}
var myStyle = {stroke: '#666', fill: 'transparent'}
var circle = add('circle', myStyle)
addAttributes(circle, {cx: 50, cy: 50, r: 10})

--

--

Founder of Unbox Research. Machine learning engineer. Previously at Primer, Medium, Google.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store