createSubSuperScripts(text, shift) {
    let elem = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');
    elem.setAttributeNS(null, 'baseline-shift', shift);
    elem.appendChild(document.createTextNode(text));
    elem.setAttributeNS(null, 'class', 'sub');
    return elem;
  }
Create a tspan element for sub or super scripts that styles the text
appropriately as one of those text types.

@param {String} text the actual text
@param {String} shift the type of text, either 'sub', or 'super'