Sile, a typesetting system inspired by TeX and InDesign
sile-typesetter.org
sile-typesetter.org
For example, footnotes. We all understand how footnotes should be placed--right there at the bottom of the page. However, placement become very difficult if you have a long footnote that appears in the before-last-line of the page. Now, if you include the footnote, there's not enough room for the last few lines of regular text, and the footnoted word is bumped to the next page. Figuring out how to get out of this one problem algorithmically involves heavy-duty backtracking work, projections of layout, recalculations, etc. Its difficulty is compounded if other factors enter in. For example, if the text and footnote appear just before a full page image, etc.
Another classic difficulty is widow and orphan control. Knuth's algorithm on this topic alone requires almost 100 pages to explain [Digital Typography, 1999].
And so on. Suffice it to say that Donald Knuth spent 10 years writing TeX, much of which he did full-time, supported by various grants.
Typesetting is a really, really hard problem domain and while the author here expects to add features like equations soon, to those of us in the field, it feels like he doesn't really grok the difficulty of the problem domain.
The odds are small that he can climb the cliff in front of him unless he's willing to work on this full time for a very long time.
Nonetheless, I wish him good luck.
In addition, the output is certainly more convincing at this time.
In the first paragraph, the orphaned word is "of". If there's no way to squeeze those three characters ("of.") into the preceding lines then one should probably be a little more generous with the character spacing in the second line so that the "of." doesn't look so lonely.
It is possible that as it happens there is no clean way to format that paragraph, or that Sile simply prioritizes other factors over orphan lines, but for a paragraph that opens with "SILE is a typesetting system. Its job is to produce beautiful printed documents.", leaving three characters orphaned on the final line is unfortunate. If nothing else I'd reword the paragraph to address this problem.
One of the things I like about LaTeX is that you don't have to know about this stuff, and since it's not entirely trivial to change the page margins it's really hard for a novice to make such a mistake.
- There are two sections demarked with horizontal lines, but the upper one is further to right right.
- The horizontal lines spill over into the right margin on the first one.
- There is an unreasonable amount of space above and below the second one.
- The paragraph "To begin with" looks stranded; it's indented because the rule is no doubt all apart from the first paragraph must be indented but it looks strange in this case.
LuaTeX seems to have all the same benefits, but in contrast to SILE, it also benefits from the CTAN archive.
So what's the selling point of SILE over LuaTeX?
For instance, grid typesetting is a known difficult problem in TeX and its derivatives, but it's very easy in SILE because you just change the way vboxes are added to the vertical list; it's about 30 lines of code.
The frames support is pretty compelling for me as well, and will be even more so as soon as balanced frames are finished.
Contrast that with Markdown, where the setup is literally "type what you want in a box and we'll format it for you in a reasonable way". There are more advanced features that require a special syntax (embedded code snippets for example), but they are included in such a way that you don't have to worry about them until you need to use them, and when you do they behave like you would expect.
I know of course that TeX is incomparably more powerful than Markdown, but I don't believe that that means that the onboarding experience needs to be incomparably more complex. Easy things easy and all that.
I did get a bit more interested after I read who is writing this, as Simon Cozens is pretty well-known in Perl circles.
>> SILE doesn’t show you where the lines will break, because it doesn’t know yet.
Genuinely asking: Why cannot the above be done in real-time as the user types? (I understand that would blur the line between a typesetting system and a word processor, but if output of the typesetting system could be produced in real-time, then that boundary should not need to exist.)
The reason why Google Docs / Word / etc. can show the line breaks in real time is that it uses a faster (but less "optimal") algorithm.
InDesign will actually do this. I think it's called "Dynamic Flow" or something? It can automatically append new pages to fit the content.
In general, it's not very eager to do this because when you consider spreads (distinct left-hand and right-hand pages), inserting a new page will affect the layout of all subsequent pages. You could insert a new spread, but that may not be what the user wants.
In other words, if the user is laying out pages, actual pages matter. They aren't just an implementation detail derived from the length of the text.
This is what InDesign does.
But why would you want to do that? The display of text that is good for editing is not necessarily the same as the display of text that is good on the page.
Each use case—typesetting and word-processing—have enough standardized tools to fill an entire application's interface. I think making the compromises needed to do be able to do both adequately would be too much to make either task worthwhile. Maybe that wouldn't necessarily be true for digital, like ePub, but I think that would quickly become true for print.
I don't feel a typesetting interface/context is amenable to writing long-form documents. When I take into consideration multi-column layouts, running headers and footers, art wrapping, page flow across multiple pages, there are what appears to be a lot of potential distractors from the writing process. Word processing documents, when I hide as much of the interface as I can, allow for the tight focus needed for long-form writing. Someone else in this thread suggested having writing and editing happen in another window, but that's still creating an abstraction from the layout, and not really having edits happen "in real time" if only because then editing is not happening actually within the layout.
Finally, I think there would be a significant barrier to training for many authors trying to work in layouts. There are applications, like QuarkXpress, that enable word-processing-like tools in the layout. But I couldn't imagine asking an author to learn enough about the above to ask them to write a long-form paper, much less an entire book, in that environment. Fonts are handled differently, styles are handled differently, etc.
Publishing automation tools are nothing new, but one has to give up a certain amount (usually a lot) of control to create a document on the cheap. Even for those workflows that are intensely reliant on templates, designers are still working in InDesign for the initial design, which is then handed off to a person, or more frequently a system, to translate into something to be automated.
Even as a long-time TeX user, I'm not sure what the appeal would be here, but I could have been in publishing too long to see this for what it really is.
\begin[papersize=a4]{document}
\chapter{Hi there}
Hello world
\include[src=chapter2]
\end{document}
Unfortunately, the power of Latex for maths display and vectorized graphs are completely absent. It also states image handling is still rudimentarily available (only PNG files, for example). I also am not really impressed by the type setting from the PDF, but this might be due to its focus on the engine and not the aesthetics of the typesetting (which will hopefully addressed soon to convince Tex users!).Personally I don't "program" in Tex, I only write. The benefits with regard to (La)Tex therefore seems minor to me. However, if you program in Tex (like, designing templates perhaps?) I can understand you don't want to fool around with an ancient system like Tex and SILE can be an excellent alternative. The source is on Github [1], so everyone can contribute!
[0] https://raw.githubusercontent.com/simoncozens/sile/master/do... [1] https://github.com/simoncozens/sile
PS. Because the author writes SILE, not sile or Sile; is SILE an acronym?
Yes, SILE is an acronym but to be perfectly honest I can't remember what for. I promise it was good. "Simon's Improved Layout Engine" is a backronym.
But if TeX does what you want, please use TeX. I don't see much point in "convincing" people who are happily using a piece of software which fits their needs to switch to something else which may not. Do whatever works. TeX has CTAN which is the product of many years of work, and it'll be a long time before SILE can even "compete" on level terms with that. But I'm not interested in competing; I'm interested in being the best in a particular niche. If that happens to be useful for others, then great.
Would I be wrong to bet at substantial odds that the SIL portion of it, at least, was for http://www.sil.org/ ?
(Of course, in the case of (La)TeX it is made worse by the ridiculously unhelpful messages in case of syntax errors.)
The syntax is very similar to LaTeX, but it's more modern in that it has native support for fonts and images, and uses Lua as its scripting language.
[1] https://raw.githubusercontent.com/simoncozens/sile/master/do...
Deleted comment
Is that the example?
Have there been any more books written using it, apart from Butterick’s Practical Typography (http://practicaltypography.com/)?
Having said that, though, Pollen's tackling a different problem space; SILE is aiming for print and not web, as near as I can tell.
However, it shouldn't be difficult (especially now that MathJax is in Javascript, a language not a million miles away from Lua) to add support for maths typesetting. Patches welcome!
Seriously. There are no claims about 'revolutionising' anything, just some comparisons with existing software.
This package is not even a rewrite, but the implementation of a tiny, tiny subset of TeX. In addition, I've always understood (and followed this rule in my OSS work) that you don't point out weaknesses in other OSS projects as justification for your own. Apart from it being bad form, it doesn't help promote the project.