3 ms·
This is a nice post; a few comments: * TeX's boxes-and-glue-and-penalties model is remarkably simple and flexible, as the author says. I've long been planning
by svat 2y ago
This is a nice post; a few comments:
* TeX's boxes-and-glue-and-penalties model is remarkably simple and flexible, as the author says. I've long been planning to write a post about this; the Knuth–Plass paper has some beautiful examples of how much you can cleverly achieve with such simple primitives. Really a model of elegance.
* This simplicity allows some ingenious solutions. With TeX (especially LuaTeX) one can do things that require knowledge of where on what page a paragraph is on: see for example this "demo" of mine: https://tex.stackexchange.com/a/403353 https://tex.stackexchange.com/a/403353 — of course one is fighting the system to some extent, but it is possible.
* Of the three “Challenges” it discusses, the first two “Varying container width” and “Side-floating elements” are both examples of things that are possible in TeX with caveats (parshape and wrapfig), but currently not possible in Typst — would be nice to see those limitations removed in Typst in a clean way.
* In the TeX world, note that there is Martin Ruckert's ongoing HINT project, which moves some of the TeX layout to the client (custom viewer), and thus supports arbitrarily varying widths (really cool to read a hint "book" on a phone): https://hint.userweb.mwn.de/#:~:text=TEX-,HINT,-%2C%20following%20a%20tradition https://hint.userweb.mwn.de/#:~:text=TEX-,HINT,-%2C%20follow... (demo videos here: https://hint.userweb.mwn.de/hint/video/ https://hint.userweb.mwn.de/hint/video/ and articles in TUGboat: https://tug.org/TUGboat/Contents/listauthor.html#Ruckert,Martin https://tug.org/TUGboat/Contents/listauthor.html#Ruckert,Mar... )
On the whole, happy to see this post and that more attention is getting paid to text layout.
- ykonstant 2y agoI struggled a bit with `wrapfig` but ultimately got very decent results for one of my expository writings: https://drive.google.com/file/d/1h1Lro8owakjE-3Kuo1mKJL_XpZReI8Vf/view?usp=drive_link https://drive.google.com/file/d/1h1Lro8owakjE-3Kuo1mKJL_XpZR... The margin calculations can definitely be improved, but in order to swap typesetting systems I need to be able to do at least this much (including the TikZ/PGF rendering for the images).