initial port from the arXMLiv branch of LaTeXML