News for hackers. Stuff that matters.
Re:The SILE Typesetter: Simon's Improved Layout Engine by choeger on Saturday February 22, 2020 @05:52PM (#22393879)
Does it have a context-free syntax? Because this is basically the only problem with TeX: You cannot parse it.
Re:The SILE Typesetter: Simon's Improved Layout Engine by ttul on Saturday February 22, 2020 @07:26PM (#22394283)
IIRC there are DSLs that are context free and which compile down to TeX. I just can’t recall at the moment any.. it’s been years. The layout engine inside TeX is second to none. Why throw out the baby with the bath water?
Re:The SILE Typesetter: Simon's Improved Layout Engine by choeger on Sunday February 23, 2020 @08:18AM (#22396707)
I never encountered a context-free typesetting language that was as powerful as TeX. I assume it would be quite a lot of rather boring work. The main interesting design question would be how to express content and its relationships in some logical way that is distinctive from the algorithmic layouting.
Re:The SILE Typesetter: Simon's Improved Layout Engine by zweep on Saturday February 22, 2020 @06:05PM (#22393937)
What does context-free syntax mean? And what does “you cannot parse it” mean? Meaning you can’t stream it, you need the whole file first?
Re:The SILE Typesetter: Simon's Improved Layout Engine by CJefferson on Saturday February 22, 2020 @06:36PM (#22394086)
Tex is like a programming language, you have to "run" the program to generate output, and that execution is tightly tied to producing output on paper pages. This means it is extremely difficult to produce good looking HTML, or accessible output.
Re:The SILE Typesetter: Simon's Improved Layout Engine by The_Amp_Walrus on Saturday February 22, 2020 @06:48PM (#22394126)
Context free means that the language/program can be described using a "context free grammar": https://en.wikipedia.org/wiki/Context-free_grammar.

Context free grammars are more expressive than regular expressions, but less expressive than full-blown programming languages.

If you've got a spare 100 or so hours and you're interested in learning more, there's a good lecture series on YouTube about this stuff: https://www.youtube.com/watch?v=TOsMcgIK95k&list=PLbtzT1TYeo...