Convert PDF to LaTeX

The typesetting system \(\TeX\) was developed in 1977 by the legendary Donald E. Knuth, and the software package \(\LaTeX\) is still part of the standard repertoire for creating scientific papers today. The following two tools can be used to convert already generated PDFs as well as handwritten notes into TeX fully automatically. The results are quite promising.

The first tool, Mathpix , is currently enjoying a real hype on social media. It specializes in converting individual formulas. A part of the current screen can be highlighted and converted with a key combination. The program provides several possible solutions with an assessment of the accuracy. I tested this using a formula from the Ethereum Yellow Paper:

$$n(\mathfrak{I}, i) \equiv \left\{\begin{array}{ll}{( )} & {\text { if } \quad \mathfrak{I}=\varnothing} \\ {c(\mathfrak{J}, i)} & {\text { if } \quad|c(\mathfrak{I}, i)|<32} \\ {\operatorname{KEC}(c(\mathfrak{I}, i))} & {\text { otherwise }}\end{array}\right.$$

The second tool InftyReader exists for almost 15 years now. This somewhat old-fashioned program can convert entire documents (in the free trial version you can try out a page). It can also be controlled automatically from the command line and can handle numerous input file formats and can also spit out MathML. The example above scores slightly worse here:

$$n(\mathrm{I},\ i)\equiv \left\{ \begin{array}{ll} () & \mathrm{i}\mathrm{f}\ \mathrm{I}=\emptyset\\ c(\mathrm{I},\ i) & \mathrm{i}\mathrm{f}\ \Vert c(\mathrm{I},\ i\ <32\\ \mathrm{K}\mathrm{E}\mathrm{C}(c(\mathrm{I},\ i)) & \mathrm{o}\mathrm{t}\mathrm{h}\mathrm{e}\mathrm{r}\mathrm{w}\mathrm{i}\mathrm{s}\mathrm{e} \end{array} \right.$$

The tools make typing easier for quickly converting formulas and documents. In the vast majority of cases, however, you cannot avoid manual correction. We close with a quote from Donald E. Knuth: “My general working style is to write everything first with pencil and paper, sitting beside a big wastebasket. Then I use Emacs to enter the text into my machine. "