3 ms·
Fascinating. I think it would be much easier to read if it were formatted in 2-pane format, with the English and math on one pane, and the code on the side, al
by lupire 2y ago
Fascinating.
I think it would be much easier to read if it were formatted in 2-pane format, with the English and math on one pane, and the code on the side, aligned to match.
Working from the source code of the program/book and the Literate Code renderer program, it wouldn't be so hard to write a variant transformation to lay out in side-by-side fashion.
Possibly could need some extra markup code, though much could be inferred simply from "comment-followed-by-code implies comment-aside-code" rule.
As it is, the inline code is a distraction from the text and math, and vice versa.
- WillAdams 2y agoThere shouldn't be reason one couldn't use LaTeX to create such a typeset representation. Integrating the inline code is the responsibility of the writer.
- BlueTemplar 2y agoThe problem with (La)TeX is that it's designed for fixed layout documents. Great for print and slides, bad for most digital documents.
- WillAdams 2y agoOne can always just measure the current \textwidth (or other dimension) and make adjustments to typesetting based on that.
- BlueTemplar 2y agoThis sounds hacky, so probably will be slow and/or buggy.
- WillAdams 2y agoIt's no slower than any other calculation, and works reliably in my experience.