Software:LaTeXML

From HandWiki
Revision as of 15:49, 9 February 2024 by MainAI6 (talk | contribs) (change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Software for converting LaTeX to XML and other formats
A LaTeX to XML/HTML/MathML Converter
Original author(s)Bruce R Miller
Initial release10 May 2004 (20 years ago) (2004-05-10)
Stable release
0.8.7 / 17 December 2022 (2 years ago) (2022-12-17)
Written inPerl
Operating systemUnix-like, macOS, Windows
TypeDocument converter
LicensePublic domain
Websitedlmf.nist.gov/LaTeXML/

LaTeXML is a free public domain software package which converts LaTeX documents to XML, HTML, EPUB, JATS and TEI.[1][2][3]

Workflow

LaTeXML's primary output format is an XML representation of (La)TeX's document model. A postprocessor can convert these XML documents into other structured formats. Common use cases create HTML with mathematical formulas as images or XHTML, HTML5, and EPUB with formulas as MathML. Compared to other LaTeX-to-XML processors, LaTeXML aims to conserve the semantic structures of the LaTeX markup. This makes it a good basis for semantic services like Math search.

Conversion times range from 30 milliseconds for a single formula (in the LaTeXML daemon) to minutes for book-size documents.

History

LaTeXML was started in the context of the Digital Library of Mathematical Functions at NIST, where LaTeX documents needed to be prepared for publication on the Web. The system has been under active development for over a decade, and has attracted a small, but dedicated community of developers and users centered on Bruce Miller, the original project author.

The current released version is LaTeXML 0.8.7. It was released in December 2022, and development remains active on the public repository.

Notable usage

LaTeXML was used to convert 90% (60% without errors) of 530,000 documents from the arXiv to XML.[4] As a result of this ongoing effort for enhancing coverage, LaTeXML supports a large range of LaTeX packages. The ACL 2014 conference used LaTeXML to convert submitted papers to XML.[5] This followed existing work which has been trying to convert the ACL Anthology papers to high-quality semantic markup for further analysis.[6] Since February, 2013, LaTeXML has been used as to render the web pages on the peer produced mathematics website, PlanetMath. Since July, 2015, it was adopted by Authorea for their advanced LaTeX support.[7] In 2018, the second data release[8] of the European Space Agency's Gaia project was realized via LaTeXML.

In February of 2022, arXiv announced an experimental service based on LaTeXML, offering 1.78 million documents as HTML5.[9] A LaTeXML developer claimed successful conversion of 74% of arXiv, with 97% of articles "at least partially viewable". As of the start of 2024, that experiment has been promoted to arXiv's main article pages.[10][11]

Implementation

The core of LaTeXML is a Perl reimplementation of TeX's parsing and digestion algorithm coupled with a customizable XML emitter. To conserve the semantic structures in the LaTeX markup, LaTeXML needs XML bindings for all LaTeX packages with high-level macro definitions. The LaTeXML distribution currently provides XML bindings for over 200 commonly used LaTeX packages such as AMSTeX, Babel[12] and PGF/TikZ (which only has experimental support).

The LaTeXML conversion consists of two stages:

  • the first one parses LaTeX and converts that into a LaTeX-near XML document type, and
  • the second (post-processing) transforms the XML into one of the standardized structured output formats.

LaTeXML 0.8 added daemon functionality which enabled multiple conversions and easy embedding into web services.

LaTeXML 0.8.7 was the first version emitting the "MathML Core" markup language for mathematical syntax, new in MathML 4.

See also

References

  1. "Gecko-based EPUB Readers and LaTeXML". http://www.maths-informatique-jeux.com/blog/frederic/?post/2013/11/07/Gecko-based-EPUB-Readers-and-LaTeXML. 
  2. "Tools for Converting LaTeX to XML". http://jblevins.org/log/xml-tools. 
  3. "Free Techno Blog: LaTeXML". http://ftb.rgaiacs.com/2014/01/24/latexml.html. 
  4. Stamerjohanns, Heinrich; Kohlhase, Michael; Ginev, Deyan; David, Catalin; Miller, Bruce (2010). "Transforming large collections of scientific publications to XML". 3. Birkhäuser. 299–307. http://kwarc.info/kohlhase/papers/mcs10.pdf. 
  5. "ACL 2014 Publication - Papers in XML format". https://sites.google.com/site/acl2014publication/#TOC-Papers-in-XML-format. 
  6. Schäfer, Ulrich; Read, Jonathon; Oepen, Stephan (2012). "Towards an ACL anthology corpus with logical document structure: an overview of the ACL 2012 contributed task". ACL-2012 Special Workshop on Rediscovering 50 Years of Discoveries. pp. 88–97. http://aclweb.org/anthology/W/W12/W12-3210.pdf. 
  7. "Authorea Newsletter - July 2015: Full LaTeX, Templates, and Ebola on Authorea". Authorea. https://www.authorea.com/users/672/articles/65300-authorea-newsletter-july-2015-full-latex-templates-and-ebola-on-authorea/_show_article. 
  8. "Gaia Data Release 2Documentation release 1.1". http://gea.esac.esa.int/archive/documentation/GDR2/. 
  9. "arXiv articles as responsive web pages". arXiv. https://blog.arxiv.org/2022/02/21/arxiv-articles-as-responsive-web-pages/. 
  10. "Accessibility update: arXiv now offers papers in HTML format". arXiv. https://blog.arxiv.org/2023/12/21/accessibility-update-arxiv-now-offers-papers-in-html-format/. 
  11. "NIST Tool Will Make Math-Heavy Research Papers Easier to View Online". https://www.nist.gov/news-events/news/2024/01/nist-tool-will-make-math-heavy-research-papers-easier-view-online. 
  12. "LaTeXML: Localization with Babel". http://dlmf.nist.gov/LaTeXML/manual/localization/localization.babel.html. 

External links