Yup, @kpsns nailed it. LaTeXML does the heavy lifting in converting TeX to XML. From there some post processing does the job of converting it to a nice responsive template (that's done by Engrafo / the ArXiv Vanity team).
We love OSS at AI2, and are looking to collaborate with the Engrafo / ArXiv Vanity team as we expand the functionality.
So I digged into the code (engrafo repository) and was quite surprised that -- contrary to the suggestive title -- the method inherits all the problems LaTeXML already has. This is the fact that (for instance compared to the TeXLive distribution), tons of widespread sty files miss a LaTeXML integration and thus the conversion fails for a wide range of papers. Converting a TeX document to XML with LaTeXML really requires a lot of debugging and ideally starting from a plain LaTeX paper/book and compiling with pdflatex and latexml at the same time, making sure nothing breaks.
It's not that different, at the moment. The only real difference is that we're pre-computing the HTML so it's faster (ArXiv Vanity runs at request time).
We've talked a lot with the ArXiv Vanity team. If all goes well and our users love the feature, we have an opportunity to support (and contribute to) to their efforts at improving Engrafo and LaTeXML and maintain the front-end facing portion of the system. That way they don't have to worry about hosting / providing a functioning front-end, which we're happy to foot the bill for (and maintain)!
I would recommend that rather than copying "arXiv-Vanity", your team should focus on improving and contributing to "Engrafo" since there are many errors in the HTML conversion. And, leave everything at "arXiv-Vanity" since there is no point of having 2 different places doing the same exact thing.
We plan to do both. We want to give back to Engrafo where it makes sense, but we also have a unique opportunity given our other semantic features along with the paper metadata from our corpus to build upon this experience. This release is an MVP reading experience, but in the future we plan to add a number of things like: user highlighting, direct linking to authors and citations, and collaborative commenting.
If all goes well, we hope to act as a front-facing host for the Engrafo engine. That'll enable the ArXiv Vanity team to focus their efforts on improving the conversion process (which is what they'd like to focus on) while we can handle the logistics of serving this up to users (as quickly as possible).
I'm really excited about the opportunity to collaborate and support the ArXiv Vanity / Engrafo team!
I'm an engineer on the Semantic Scholar team that worked on integrating this feature into the site.
Here's a blog post that talks a bit more about what we're doing: https://blog.semanticscholar.org/announcing-a-new-way-to-rea...
I'm around to answer questions / discuss the approach. We're super excited and would love to hear your feedback!