More robust system for handling subscript and superscript.