Go to the GitHub repository for download.

The xPlain project is motivated by a desire to incorporate the FAIR guiding principles for scientific data management and stewardship: Findability, Accessibility, Interoperability and Reuse. Whilst these guidelines have typically been applied to numerical data, the physical sciences in general (and theoretical physics in particular) can also rely heavily on symbolic data. There is a trend in theoretical physics to provide so-called supplemental materials alongside analytic publications, often comprising one or more Mathematica notebooks which are supposed to corroborate the claims of the author(s). For a variety of reasons, Mathematica has a near-monopoly on computer algebra in the theoretical physics community. The popular notebook front-end is intended to combine programmatic input of the Wolfram Language with interactive execution and visual output. As with most IDEs, the notebook performs few of its duties well:

  1. Programmatically, it will always be outperformed by superior tools such as vim or vi
  2. Visually, it offers very limited options for paper-style derivations
Computer algebra is one of the very few applications where we really do need a GUI as well as a CLI. The classic case for this is made by tensor calculus, where the proliferation of indices clearly exceeds the capabilities of monospace layouts. The notebook front-end is actually quite good at formatting indices. The question then comes as how to simultaneously achieve the following:
  1. Retain the use of the notebook front-end for its mathematical formatting abilities
  2. Present your calculations with a paper-style layout, like a professional physicist
  3. Work entirely in plaintext using vim or vi, like a professional developer
These are the objectives of the xPlain project. xPlain is an (unofficial) part of the xAct bundle. It is designed for the formatting of unambiguous, lasting derivations in the Wolfram language. It is suitable only for those who use the Wolfram Language programmatically. xPlain is a work in progress. The current version was trialled in some supplemental materials and attracted positive comments from the anonymous referee: "It is remarkable the effort made by the authors with the Supplemental Material to show the connection between the Mathematica code employed for the computations and the statements in the paper. I congratulate the authors for the thorough explanations."

Example use of xPlain in the command line (CLI, left) and notebook front-end (GUI, right).