1

I'm trying to dig into the source for Donald Knuth's Metafont compiler. However, I am getting bogged down in his toolchain. What is the best way to extract readable, navigable, source code from one of Knuth's .web files? I am toying with doing a reimplementation in another language, and I want to look some at the geometric algorithms, etc... so I have some idea what I am getting into.

The .web -> .tex -> .dvi route left me with a huge document without an index, that is terribly slow to render, at least in evince.

The .web -> .p file resulted in source code that was stripped of all comments, and deliberately packed without any consideration for readability.

Should I start messing around with pascal pretty printers? Use a pascal-> C converter like modern latex does and then pretty print and explore that?

Andrew Wagner
  • 22,677
  • 21
  • 86
  • 100

1 Answers1

1

The idea of WEB is that the program source code is readable in the .web source itself, or in the documentation (produced using weave *.web-> pdftex *.tex).

The program code (generated by tangle *.web) is intended just for the computer, not for humans.

musarithmia
  • 216
  • 3
  • 9