2 ms·
Great post! I just dug up this informative comment by @svat from 3 years ago on the Pascal to C conversion, for anyone who's interested: https://news.ycombina
by chubot 5y ago
Great post! I just dug up this informative comment by @svat from 3 years ago on the Pascal to C conversion, for anyone who's interested:
https://news.ycombinator.com/item?id=16526151 https://news.ycombinator.com/item?id=16526151
Today, major TeX distributions have their own Pascal(WEB)-to-C converters, written specifically for the TeX (and METAFONT) program. For example, TeX Live uses web2c[5], MiKTeX uses its own “C4P”[6], and even the more obscure distributions like KerTeX[7] have their own WEB/Pascal-to-C translators. One interesting project is web2w[8,9], which translates the TeX program from WEB (the Pascal-based literate programming system) to CWEB (the C-based literate programming system).
The only exception I'm aware of (that does not translate WEB or Pascal to C) is the TeX-GPC distribution [10,11,12], which makes only the changes needed to get the TeX program running with a modern Pascal compiler (GPC, GNU Pascal).
...
I may write a blog post on this since it's relevant to how https://www.oilshell.org/ https://www.oilshell.org/ is written in a set of Python-based DSLs and translated to C++.
- thangalin 5y agoThe instructions for compiling TeX from scratch are a little daunting, and sometimes unclear (e.g., having to define printer settings). Here are my Linux instructions for those who want to get core TeX up and running: https://tex.stackexchange.com/a/576314/2148 https://tex.stackexchange.com/a/576314/2148 Although TeX has many years of development effort behind it, the core functionality of converting macros to math glyphs is reasonably straightforward and can be accomplished in a few months---especially given that high-quality math fonts are freely available. Here's a Java-based TeX implementation that provides the ability to format simple TeX equations: https://github.com/DaveJarvis/JMathTeX https://github.com/DaveJarvis/JMathTeX The code supports neither vectors/matrices nor bracket sizing (PR welcome!): https://github.com/DaveJarvis/JMathTeX/issues https://github.com/DaveJarvis/JMathTeX/issues