
Sile, a typesetting system inspired by TeX and InDesign - colinprince
http://www.sile-typesetter.org/what-is/index.html
======
ternaryoperator
I've worked in typesetting software a long time. And I've seen several OSS
projects reach roughly the point this one has before dying. I can recall only
one or two that made it significantly past this point. The challenge is not
the coding but the domain problems. It's easy to get a core set of features
with very basic operations going. But pushing on into the required
capabilities for more than markdown-level formatting is very, very difficult.
The issues are mirages, b/c they appear easy to explain, but they're extremely
difficult to implement.

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.

------
zvrba
I have looked at the PDF manual linked to from the homepage. If that PDF is
produced bye Sile itself, I'm not impressed because the rendered text looks
crowded. Perhaps the choice of the font is at fault, perhaps the engine lacks
TeX's font kerning, perhaps.. Whatever the reason, the output is IMO ugly.

~~~
hbbio
The rendering of another open source project in the "TeX-made-after-Y2K"
category, Patoline, is much more appealing:

[http://patoline.org/patobook.pdf](http://patoline.org/patobook.pdf)

~~~
peatmoss
One of the more interesting features to me was the "document zippers" that
lets you programmatically navigate the doc as you might a tree structure in
many functional languages.

In addition, the output is certainly more convincing at this time.

------
vog
Does SILE offer any advantages when compared to LuaTeX?
([http://www.luatex.org/](http://www.luatex.org/))

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?

~~~
kcorbitt
To me, it looks like this is a tool mainly for people who aren't already
comfortable and at home in the *TeX environment. As one of those people, I'm
very interested in what the syntax of this project ends up looking like. My
few experiences with TeX were fairly frustrating, with multiple ways to do
things (is it \bf or \textbf?) and a relatively large amount of
boilerplate/magic incantations required to get a document up and running at
all.

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.

~~~
simoncozens
This isn't designed for people who don't know TeX, although of course they're
welcome to use it. It was designed to solve particular typesetting problems
(which came up primarily in the context of typesetting Bibles, parallel texts,
and especially in non-Latin alphabets) which were difficult to achieve in TeX.

------
StefanKarpinski
I'm a little surprised that both SILE and Patoline [1] both seem to stick with
the TeX formatting tradition of \begin{foo} ... \end{foo}. Is this really the
best way to express layout? Or is this so that users will feel comfortable
with new systems? I would have thought that taking a cue from some of the
markup systems like Markdown, ReStructuredText, ASCIIDoc, etc. might have been
a consideration. Just curious about this design choice.

[1] [http://patoline.org/](http://patoline.org/)

~~~
theoh
One markup language is much the same as another. The real issue here is the
fact that typography is not inherently easy to specify in a serial language.
It's an intuitive, visual activity, for which direct manipulation and WYSIWYG
are ideal. Any non-trivial layout contains both typographic hierarchy and
spatial hierarchy, grid systems and the like. Knuth blazed an important trail
but you couldn't typeset a magazine in TeX. It's all very well to scratch
one's own itch, of course. It is just that the specfication of layouts is a
more complex, intuitive and holistic problem than TeX-like languages
acknowledge. You need to be able to work with intrinsically visual and spatial
things like clip paths, not to mention checking optically for rivers etc. It
seems to be common for a certain kind of programmer to be detail-oriented when
it comes to coding but tone deaf to the richness of typography as craft. Grrr.

------
alok-g
>> The job of a word processor is to produce a document that looks exactly
like what you type on the screen. SILE takes what you type and considers it
instructions for producing a document that looks as good as possible.

>> 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.)

~~~
oatmeal_coffee
You can type directly into layouts in InDesign and see your line and page
breaks in realtime. I think where the problem lies in InDesign is that it is,
at its core, a typesetting and layout application and not a word processing
application. There is a lot of work to do to get to the point of being able to
write in your layout, and pages don't get added dynamically when adding new
content as easily as they do in a typesetting application.

~~~
munificent
> pages don't get added dynamically when adding new content as easily as they
> do in a typesetting application.

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.

------
abritishguy
Looks interesting, the number 1 feature for me is compile time though - I want
instant previews which I can't get with latex.

~~~
andreasvc
Have you tried Gummi? It's an editor with auto-updating PDF preview. It
doesn't improve on compile time because it just runs pdflatex behind the
scenes, but I find it usable when designing figures using tikz.

~~~
abritishguy
I use texpad which has auto-updating PDF preview, it does partial builds so
often even with a large complex document it only takes about a second to
update (although this is too long in my opinion). Occasionally it can't do
partial builds (some libraries screw it up) and then I'm stuck waiting 10
seconds or more for the preview to update.

------
oatmeal_coffee
So, essentially, this is a rewrite for TeX. But the reality is that creating
complex layouts really, truly requires GUI layout tools. No matter how good
the output is for this application, it's entering into an firmly-established
market with a few, large, expensive players, and not a lot of action.

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.

------
davebees
Some sample inputs–outputs would be great.

~~~
juriansluiman
From the PDF manual file[0] it is at glance almost similar to Latex.

    
    
      \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...](https://raw.githubusercontent.com/simoncozens/sile/master/documentation/sile.pdf)
[1] [https://github.com/simoncozens/sile](https://github.com/simoncozens/sile)

PS. Because the author writes SILE, not sile or Sile; is SILE an acronym?

~~~
simoncozens
Two clarifications: Image handling is rudimentary at present but I'm switching
to different PDF engine (see
[http://tex.stackexchange.com/questions/166261/would-it-
make-...](http://tex.stackexchange.com/questions/166261/would-it-make-sense-
to-write-a-tex-algorithms-implementation-in-cairo-pango-so/200810#200810) and
[http://www.sile-typesetter.org/2014/09/24/Whats-happening-
in...](http://www.sile-typesetter.org/2014/09/24/Whats-happening-in-SILE-
development.html)) which will vastly improve image support.

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.

~~~
gjm11
> Yes, SILE is an acronym but to be perfectly honest I can't remember what
> for.

Would I be wrong to bet at substantial odds that the SIL portion of it, at
least, was for [http://www.sil.org/](http://www.sil.org/) ?

------
mcguire
" _...text is flowed into \em{frames} on the page..._ "

Is that the example?

~~~
wodenokoto
Kinda. The transformation from SILE code to HTML was apparently not completely
flawless.

------
crystal88_
I would like to see some comparison of DocBook and SILE too. Any reasons for
using SILE instead of DocBook? The simpler syntax on its own is good, but not
enough to switch.

~~~
bloat
How is Pollen ([http://pollenpub.com/](http://pollenpub.com/)) coming along?

Have there been any more books written using it, apart from Butterick’s
Practical Typography
([http://practicaltypography.com/](http://practicaltypography.com/))?

~~~
chipotle_coyote
Pollen is still in development -- I've been playing with it, and reported a
trivial (and now fixed) bug that probably hadn't come up because I was the
first person to typeset dialogue with it. Many of my current quibbles with it
could be addressed with a "cookbook" of recipes, or even a library that can
play the role of LaTeX to its TeX, although that's probably longer term.

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.

------
perlgeek
Does it support typesetting mathematical formulas like tex/latex does? That's
a very important feature for any kind of scientific publishing.

~~~
simoncozens
It doesn't, yet; TeX is very good at that, so if that's a need you have, stick
with TeX. I'm not trying to corner the whole typesetting market!

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!

~~~
jimhefferon
Very nice system, Simon. Can I ask if you have given math any thought?
Obviously TeX does great with math but there are still some things that many
people think could bear improvement, with thirty years of hindsight
(including, as I understand it, additional math categories and omitting the
restriction on just a few fonts).

------
HerrMonnezza
There seem to be a couple of conversion glitches in the HTML page: leftover
"\em" and "\supereject" in the text.

~~~
hnyc
At first I thought that it was left there on purpose, but it seems like it may
be accidental.

------
robmccoll
I'll stick to ShareLatex.com Makes all of the pain of writing and compiling
Tex go away and adds trivial simultaneous editing.

------
MrDosu
News@11: Haphazard rewrite of popular standard piece of software in random
scripting language X revolutionizes the field, says naive programmer.

~~~
matthewmacleod
How about "Idle HN commentator wastes time mocking other people's work instead
of offering any constructive input at all."

Seriously. There are no claims about 'revolutionising' anything, just some
comparisons with existing software.

~~~
MrDosu
The only comparison is the block level layout and then it goes into claims
about being better then TeX and InDesign without offering any feature besides
"scripted in a different language". The OP does not even begin to understand
the complexities involved in the named software to make their featureset
happen. Look at the SILE codebase, its amateur hour... Things like this are
fun little hobbyist practice.

~~~
Trufa
> Fun little hobbyists

[http://search.cpan.org/~simon/](http://search.cpan.org/~simon/)

[http://shop.oreilly.com/product/9780596004569.do](http://shop.oreilly.com/product/9780596004569.do)

[http://www.amazon.com/Beginning-Perl-Programmer-Simon-
Cozens...](http://www.amazon.com/Beginning-Perl-Programmer-Simon-
Cozens/dp/1861003145)

------
robinhoodexe
Looks very interesting, I might give this a try.

