Introducing SILE: A New Typesetting System

77
Introducing SILE A New Typesetting System

Transcript of Introducing SILE: A New Typesetting System

Page 1: Introducing SILE: A New Typesetting System

Introducing SILEA New Typesetting System

Page 2: Introducing SILE: A New Typesetting System

Wide Margin

Page 3: Introducing SILE: A New Typesetting System
Page 4: Introducing SILE: A New Typesetting System
Page 5: Introducing SILE: A New Typesetting System

% cat > specfile.txtpages: 160title: Asian Christian Encountersauthor: Kang-San Tanisbn: 9780956594365blurb: …

% perl cover.pl specfile.txt

Page 6: Introducing SILE: A New Typesetting System
Page 7: Introducing SILE: A New Typesetting System

Academical

Academical

Page 8: Introducing SILE: A New Typesetting System
Page 9: Introducing SILE: A New Typesetting System

370 PART 38: BREAKING PARAGRAPHS INTO LINES X ETEX §855

procedure try break (pi : integer ; break type : small number );label exit , done , done1 , continue , deactivate , found ,not found ;var r: pointer ; { runs through the active list }

prev r : pointer ; { stays a step behind r }old l : halfword ; {maximum line number in current equivalence class of lines }no break yet : boolean ; {have we found a feasible break at cur p? }⟨Other local variables for try break 856 ⟩

begin ⟨Make sure that pi is in the proper range 857 ⟩;stat if tracing paragraphs > 0 then

begin begin diagnostic ; print nl ("@␣Inside␣try_break"); end; tatsno break yet ← true ; prev r ← active ; old l ← 0; do all six (copy to cur active );loop begin continue : r ← link (prev r ); ⟨ If node r is of type delta node , update cur active width , set

prev r and prev prev r , then goto continue 858 ⟩;⟨ If a line number class has ended, create new active nodes for the best feasible breaks in that class;

then return if r = last active , otherwise compute the new line width 861 ⟩;⟨Consider the demerits for a line from r to cur p ; deactivate node r if it should no longer be active;

then goto continue if a line from r to cur p is infeasible, otherwise record a new feasiblebreak 877 ⟩;

end;exit : stat ⟨Update the value of printed node for symbolic displays 884 ⟩ tatsend;

856. ⟨Other local variables for try break 856 ⟩ ≡prev prev r : pointer ; { a step behind prev r , if type (prev r ) = delta node }s: pointer ; { runs through nodes ahead of cur p }q: pointer ; {points to a new node being created }v: pointer ; {points to a glue specification or a node ahead of cur p }t: integer ; {node count, if cur p is a discretionary node }f : internal font number ; {used in character width calculation }l: halfword ; { line number of current active node }node r stays active : boolean ; { should node r remain in the active list? }line width : scaled ; { the current line will be justified to this width }fit class : very loose fit . . tight fit ; {possible fitness class of test line }b: halfword ; {badness of test line }d: integer ; {demerits of test line }artificial demerits : boolean ; {has d been forced to zero? }save link : pointer ; { temporarily holds value of link (cur p) }shortfall : scaled ; {used in badness calculations }See also section 1629.

This code is used in section 855.

857. ⟨Make sure that pi is in the proper range 857 ⟩ ≡if abs (pi ) ≥ inf penalty then

if pi > 0 then return { this breakpoint is inhibited by infinite penalty }else pi ← eject penalty { this breakpoint will be forced }

This code is used in section 855.

Page 10: Introducing SILE: A New Typesetting System

http://www.bramstein.com/projects/typeset/

Page 11: Introducing SILE: A New Typesetting System
Page 12: Introducing SILE: A New Typesetting System
Page 13: Introducing SILE: A New Typesetting System

W

9 780956 594365

Wide MarginISBN 978-0-9565943-6-5

Academical

Th t d pr v d rv f J p n h h r h l d r ,

pl d th l l n l f l d r h p p tt rn n J p n

f d pr r l n th l d r h p f v l nt r r n t n

nd h t r l r v f h h r h v nt , t d t r n

th f r nd f n t n f l d r nd l d r h p th n th

v nt . Th f nd n r th t l d r h p f n t n

nd n t r l , ft n t r n th d pl n , nd

n b h r t r z d pr r n t r f th nt n n f

r p h n.

ISBN 978-0-9565943-6-5

Academical

Th t d pr v d rv f J p n h h r h l d r ,

pl d th l l n l f l d r h p p tt rn n J p n

f d pr r l n th l d r h p f v l nt r r n t n

nd h t r l r v f h h r h v nt , t d t r n

th f r nd f n t n f l d r nd l d r h p th n th

v nt . Th f nd n r th t l d r h p f n t n

nd n t r l , ft n t r n th d pl n , nd

n b h r t r z d pr r n t r f th nt n n f

r p h n.

Academical

Page 14: Introducing SILE: A New Typesetting System
Page 15: Introducing SILE: A New Typesetting System

+ ??? =

Knuth-Liang Hyphenation

Algorithm ✔

Knuth-Plass Justification Algorithm

+

Input

PDF

Page 16: Introducing SILE: A New Typesetting System

INTERMISSION

Page 17: Introducing SILE: A New Typesetting System

PRE-INTERMISSION INTERMISSION

Page 18: Introducing SILE: A New Typesetting System

SILE Is Not T XE

Page 19: Introducing SILE: A New Typesetting System

INTERMISSION

Page 20: Introducing SILE: A New Typesetting System

Hyphenation & Justification

Input

Macro processor

METAFONT

TFM

Page Breaking

Fonts

DVI

DVI processor

Output

Virtual Fonts

Direct output(pstex,

pdftex)System font

library(xetex)

Embedded programming

language

(luatex)

Page 21: Introducing SILE: A New Typesetting System

END OF INTERMISSION

Page 22: Introducing SILE: A New Typesetting System
Page 23: Introducing SILE: A New Typesetting System
Page 24: Introducing SILE: A New Typesetting System

Hyphenation & Justification

Input

METAFONT

TFM

Page Breaking

Fonts

DVI

DVI processor

Output

Cairo

Pango

Embedded programming

language

(Javascript)Frame

abstraction

XML processor

Page 25: Introducing SILE: A New Typesetting System

<sile papersize="129mm x 198mm"><script src="packages/grid.js"/><define command="center"> <glue stretch="10000"/><process/><glue ↩ stretch="10000"/></define><define command="headline"> <skip height="1cm"/> <font family="Frutiger LT Std" weight="700"↩ size="20"><center><process/></center></font> <skip height="0.5cm"/></define>

<headline>A Scandal In Belgravia</headline>

Page 26: Introducing SILE: A New Typesetting System
Page 27: Introducing SILE: A New Typesetting System

Hard things about Bible typesetting

Page 28: Introducing SILE: A New Typesetting System

Contextual shaping

هههU+0647 ARABIC LETTER HEH

Standard Arabic Sindhi Urdu

Page 29: Introducing SILE: A New Typesetting System

Language-specific typesetting conventions

Page 30: Introducing SILE: A New Typesetting System

Really thin paper

Page 31: Introducing SILE: A New Typesetting System

Plus foot + side notes

Page 32: Introducing SILE: A New Typesetting System

Columns, balancing and page breaks

Chapter HeaderCross References

Page 33: Introducing SILE: A New Typesetting System

Diglots and Parallels

Chapter HeaderCross References

Chapter HeaderCross References

10 10

Page 34: Introducing SILE: A New Typesetting System

Diglots and Parallels

Chapter HeaderCross References

Chapter HeaderCross References

10 10

Page 35: Introducing SILE: A New Typesetting System

How does SILE help?

Page 36: Introducing SILE: A New Typesetting System

Hyphenation & Justification

Input

Page Breaking

FontsCairo

Output

libtexpdf

Embedded programming

language

(Lua)Frame

abstraction

XML Input handler

TeX-like Input

handler…

Fontconfig + Harfbuzz

Pango podofo

Page 37: Introducing SILE: A New Typesetting System

Frames

Page 38: Introducing SILE: A New Typesetting System

The SILE Show-off Document

SILE is a typesetting sys-tem. Its job is to pro-duce beautiful printed doc-

uments. It’s similar to TeX, butwith some ideas borrowed fromInDesign, and written with mod-ern technologies in mind.

Let’s demonstrate some ofthe things which are interestingabout SILE. On this page, we aredemonstrating SILE’s frame capa-bilities.

SILE’s frame system allowsyou to declare areas of the pagewhere your text should be set. Theframes are specified declarative-ly; this means that you say that,for instance, the first two columnson this page must have the samewidth, and sit either side of a gut-ter of a particular size.

For this page we have alsodeclared a sidebar frame of a par-ticular width (200pt), and a box atthe bottom of the page. The twocolumns will be flowed frames. Inother words, once this left columnis full, text will begin again on theright column. However, the side-bar frame and the bottom frameare not flowed frames; text willnot spill over into them, but we

will enter text into those sepa-rately.

I’m not really expecting youto use this kind of magazine-stylelayout in your documents, but thisis a demonstration of what youcan do with the ability to defineframes. Here is some more textfor the sake of padding out thecolumns.

lorem ipsum dolor sit ametconsetetur sadipscing elitr seddiam nonumy eirmod tempor in-vidunt ut labore et dolore ma-gna aliquyam erat sed diam volup-tua at vero eos et accusam et ju-sto duo dolores et ea rebum stetclita kasd gubergren no sea taki-mata sanctus est lorem ipsum do-lor sit amet lorem ipsum dolor sitamet consetetur sadipscing elitrsed diam nonumy eirmod temporinvidunt ut labore et dolore ma-gna aliquyam erat sed diam volup-tua at vero eos et accusam et ju-sto duo dolores et ea rebum stetclita kasd gubergren no sea taki-mata sanctus est lorem ipsum do-lor sit

Now I will typeset some texton the other frames of this page.

The Bottom Frame

Here we are in the bottom frame. This frame stretches across the full widthof the first two columns on the page, but it doesn’t stretch as far as thethird column. I’ve defined this frame to be precisely 90pt high, and so thetwo columns have adjusted their height to fit in with this one.

Some more text to pad out this frame.

Table of ContentsFrames 1

Multilingual capabilities 2

Typesetting on a grid 3

1

Page 39: Introducing SILE: A New Typesetting System

Cassowary constraint solver

x + width >= 100 width := 90 x ?

Page 40: Introducing SILE: A New Typesetting System

Cassowary and Frames

a: left=5%, right=48.5% b: left=51.5%, right=95%

A B

gutter

Page 41: Introducing SILE: A New Typesetting System

Cassowary and Frames

gutter: width=3%a: left=5%, right=left(gutter) b: left=right(gutter), right=95%

A B

gutter

Page 42: Introducing SILE: A New Typesetting System

Options for footnote frames

L R

F

L

R

F

LR

LF RF

Page 43: Introducing SILE: A New Typesetting System

Drop Caps are easy

Sileum ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in

reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Page 44: Introducing SILE: A New Typesetting System

Embedded Programming Language

Page 45: Introducing SILE: A New Typesetting System

\robust@def*\cptdofunclist{% \cptpushnumber\dofunclistdepth \begingroup \edef\sav@do{\cptmakecs{sav@do@\cptrm\dofunclistdepth}}% \expandafter\let\sav@do\do \expandafter\cptdelimitcs\sav@do\cpt@nil \toks@{\def\csv@do##1}% \toks1\expandafter{\expandafter\expandafter\sav@do \cptrm\ifbracedTF{##1}{0{##1}}{0 ##1}\cpt@nil}% \expandafter\expandafter\endgroup\expandafter \the\expandafter\toks@\expandafter{\the\toks1}% \csv@@parse}

Page 46: Introducing SILE: A New Typesetting System

\robust@def*\cptdofunclist{% \cptpushnumber\dofunclistdepth \begingroup \edef\sav@do{\cptmakecs{sav@do@\cptrm\dofunclistdepth}}% \expandafter\let\sav@do\do \expandafter\cptdelimitcs\sav@do\cpt@nil \toks@{\def\csv@do##1}% \toks1\expandafter{\expandafter\expandafter\sav@do \cptrm\ifbracedTF{##1}{0{##1}}{0 ##1}\cpt@nil}% \expandafter\expandafter\expandafter\endgroup\expandafter \the\expandafter\toks@\expandafter{\the\toks1}% \csv@@parse}

Page 47: Introducing SILE: A New Typesetting System

“Programming in TeX is an art practiced only by a few devoted disciples, mere mortals are forbidden to even attempt it.” - Till Tantau

Page 48: Introducing SILE: A New Typesetting System

\define[command=em]{↩\font[style=italic]{\process}↩

}

\em{I am italicised}

Page 49: Introducing SILE: A New Typesetting System

\define[command=tableofcontents:headerfont]{ \font[size=24pt,weight=800]{\process} }

\define[command=tableofcontents:notocmessage{ \tableofcontents:headerfont{ Rerun SILE to process table of contents! }}

\define[command=tableofcontents:header]{\par\noindent\tableofcontents:headerfont{Table of Contents}\medskip}

Page 50: Introducing SILE: A New Typesetting System

SILE.registerCommand("lorem", function(options, content) local words = tonumber(options.words) or 50 local s = lorem(words) % defined elsewhere SILE.settings.temporarily(function() SILE.settings.set("document.language","la") SILE.typesetter:typeset(s) SILE.call("par") end)end)

\script[src=packages/lorem.lua]\lorem[words=20]

Page 51: Introducing SILE: A New Typesetting System

Docbook

PDF

Page 52: Introducing SILE: A New Typesetting System

<sile papersize="129mm x 198mm"><define command="center"> <glue stretch="10000"/><process/><glue stretch="10000"/></define><define command="headline"> <skip height="1cm"/> <font family="Frutiger LT Std" weight="700" size="20"><center><process/></center></font> <skip height="0.5cm"/></define>

<headline>A Scandal In Belgravia</headline>

Page 53: Introducing SILE: A New Typesetting System

sile -I docbook foo.xml

SILE.registerCommand("link", function(options, content) SILE.process(content) if (options["xl:href"]) then SILE.typesetter:typeset(" (") SILE.call("code", {}, {options["xl:href"]}) SILE.typesetter:typeset(")") endend)

\begin[papersize=a4,class=docbook]{document}%…\define[command=abbrev]{ ↩ \font[variant=smallcaps]{\process}}%\define[command=title]{\em{\process}}%

Page 54: Introducing SILE: A New Typesetting System

Small, extensible core

SILE Core (~3000 lines of Lua)

Document classes

Language support

Packages

Page 55: Introducing SILE: A New Typesetting System

Hyphenation & Justification

Input

Page Breaking

Fonts

DVI

DVI processor

Output

libtexpdf

Fontconfig + Harfbuzz

Embedded programming

language

(Lua)Frame

abstraction

XML Input handler

TeX-like Input

handler…

Page 56: Introducing SILE: A New Typesetting System

Diglots and Parallels

Chapter HeaderCross References

Chapter HeaderCross References

10 10

Page 57: Introducing SILE: A New Typesetting System

1 This is the genealogy of Jesus the Mes-siah the son of David, the son of Abra-ham:2 Abraham was the father of Isaac, Isaacthe father of Jacob, Jacob the father ofJudah and his brothers,

3 Judah the father of Perez and Zerah,whose mother was Tamar, Perez the fa-ther of Hezron, Hezron the father of Ram,

4 Ram the father of Amminadab, Ammi-nadab the father of Nahshon, Nahshonthe father of Salmon,

5 Salmon the father of Boaz, whose motherwas Rahab, Boaz the father of Obed, whosemother was Ruth, Obed the father of Jesse,

and Jesse the father of King David.¶ David was the father of Solomon, whosemother had been Uriah’s wife,

Solomon the father of Rehoboam,Rehoboam the father of Abijah, Abijahthe father of Asa,

Asa the father of Jehoshaphat, Je-hoshaphat the father of Jehoram, Jeho-ram the father of Uzziah,

1 Βίβλος γενέσεως Ἰησοῦ χριστοῦ υἱ-οῦ Δαυὶδ υἱοῦ Ἀβραάμ.

2 Ἀβραὰμ ἐγέννησεν τὸν Ἰσαάκ, Ἰσα-ὰκ δὲ ἐγέννησεν τὸν Ἰακώβ, Ἰακὼβ δὲἐγέννησεν τὸν Ἰούδαν καὶ τοὺς ἀδελ-φοὺς αὐτοῦ,3 Ἰούδας δὲ ἐγέννησεν τὸν Φαρὲς καὶτὸν Ζάρα ἐκ τῆς Θαμάρ, Φαρὲς δὲ ἐ-γέννησεν τὸν Ἑσρώμ, Ἑσρὼμ δὲ ἐγέν-νησεν τὸν Ἀράμ,4 Ἀρὰμ δὲ ἐγέννησεν τὸν Ἀμιναδάβ,Ἀμιναδὰβ δὲ ἐγέννησεν τὸν Ναασσώ-ν, Ναασσὼν δὲ ἐγέννησεν τὸν Σαλ-μών,5 Σαλμὼν δὲ ἐγέννησεν τὸν ⸂Βόες ἐκτῆς Ῥαχάβ, Βόες⸃ δὲ ἐγέννησεν τὸν⸂Ἰωβὴδ ἐκ τῆς Ῥούθ, Ἰωβὴδ⸃ δὲ ἐγέν-νησεν τὸν Ἰεσσαί,

Ἰεσσαὶ δὲ ἐγέννησεν τὸν Δαυὶδτὸν βασιλέα. Δαυὶδ ⸀δὲ ἐγέννησεν τὸνΣολομῶνα ἐκ τῆς τοῦ Οὐρίου,

Σολομὼν δὲ ἐγέννησεν τὸν Ῥο-βοάμ, Ῥοβοὰμ δὲ ἐγέννησεν τὸν Ἀβι-ά, Ἀβιὰ δὲ ἐγέννησεν τὸν ⸂Ἀσάφ,

Ἀσὰφ⸃ δὲ ἐγέννησεν τὸν Ἰωσα-φάτ, Ἰωσαφὰτ δὲ ἐγέννησεν τὸν Ἰω-ράμ, Ἰωρὰμ δὲ ἐγέννησεν τὸν Ὀζίαν,

1

Page 58: Introducing SILE: A New Typesetting System

ΚΑΤΑ ΜΑΘΘΑΙΟΝ

Chapter 1

1 Βίβλος γενέσεως Ἰησοῦ χριστοῦ υἱοῦΔαυὶδ υἱοῦ Ἀβραάμ.

2 Ἀβραὰμ ἐγέννησεν τὸν Ἰσαάκ, Ἰσαὰκδὲ ἐγέννησεν τὸν Ἰακώβ, Ἰακὼβ δὲ ἐγέννη-σεν τὸν Ἰούδαν καὶ τοὺς ἀδελφοὺς αὐτοῦ, 3Ἰούδας δὲ ἐγέννησεν τὸν Φαρὲς καὶ τὸν Ζά-ρα ἐκ τῆς Θαμάρ, Φαρὲς δὲ ἐγέννησεν τὸνἙσρώμ, Ἑσρὼμ δὲ ἐγέννησεν τὸν Ἀράμ, 4

Ἀρὰμ δὲ ἐγέννησεν τὸν Ἀμιναδάβ, Ἀμινα-δὰβ δὲ ἐγέννησεν τὸν Ναασσών, Ναασσὼνδὲ ἐγέννησεν τὸν Σαλμών, 5 Σαλμὼν δὲ ἐ-γέννησεν τὸν ⸂Βόες ἐκ τῆς Ῥαχάβ, Βόες⸃ δὲἐγέννησεν τὸν ⸂Ἰωβὴδ ἐκ τῆς Ῥούθ, Ἰωβὴδ⸃δὲ ἐγέννησεν τὸν Ἰεσσαί, 6 Ἰεσσαὶ δὲ ἐγέν-νησεν τὸν Δαυὶδ τὸν βασιλέα.

Δαυὶδ ⸀δὲ ἐγέννησεν τὸν Σολομῶνα ἐκτῆς τοῦ Οὐρίου, 7 Σολομὼν δὲ ἐγέννησεντὸν Ῥοβοάμ,Ῥοβοὰμ δὲ ἐγέννησεν τὸν Ἀβιά,Ἀβιὰ δὲ ἐγέννησεν τὸν ⸂Ἀσάφ, 8 Ἀσὰφ⸃ δὲἐγέννησεν τὸν Ἰωσαφάτ, Ἰωσαφὰτ δὲ ἐγέν-

νησεν τὸν Ἰωράμ, Ἰωρὰμ δὲ ἐγέννησεν τὸνὈζίαν, 9 Ὀζίας δὲ ἐγέννησεν τὸν Ἰωαθάμ,Ἰωαθὰμ δὲ ἐγέννησεν τὸν Ἀχάζ, Ἀχὰζ δὲἐγέννησεν τὸν Ἑζεκίαν, 10 Ἑζεκίας δὲ ἐγέν-νησεν τὸν Μανασσῆ,Μανασσῆς δὲ ἐγέννησεντὸν ⸂Ἀμώς, Ἀμὼς⸃ δὲ ἐγέννησεν τὸν Ἰωσίαν,11 Ἰωσίας δὲ ἐγέννησεν τὸν Ἰεχονίαν καὶ τοὺςἀδελφοὺς αὐτοῦ ἐπὶ τῆς μετοικεσίας Βαβυ-λῶνος.

12 Μετὰ δὲ τὴν μετοικεσίαν ΒαβυλῶνοςἸεχονίας ἐγέννησεν τὸν Σαλαθιήλ, Σαλαθιὴλδὲ ἐγέννησεν τὸν Ζοροβαβέλ, 13 Ζοροβαβὲλδὲ ἐγέννησεν τὸν Ἀβιούδ, Ἀβιοὺδ δὲ ἐγέν-νησεν τὸν Ἐλιακίμ, Ἐλιακὶμ δὲ ἐγέννησεντὸν Ἀζώρ, 14 Ἀζὼρ δὲ ἐγέννησεν τὸν Σα-δώκ, Σαδὼκ δὲ ἐγέννησεν τὸν Ἀχίμ, Ἀχὶμ δὲἐγέννησεν τὸν Ἐλιούδ, 15 Ἐλιοὺδ δὲ ἐγέννη-σεν τὸν Ἐλεάζαρ, Ἐλεάζαρ δὲ ἐγέννησεν τὸνΜατθάν, Ματθὰν δὲ ἐγέννησεν τὸν Ἰακώβ,16 Ἰακὼβ δὲ ἐγέννησεν τὸν Ἰωσὴφ τὸν ἄνδραΜαρίας, ἐξ ἧς ἐγεννήθη Ἰησοῦς ὁ λεγόμενοςχριστός.

17 Πᾶσαι οὖν αἱ γενεαὶ ἀπὸ Ἀβραὰμ ἕωςΔαυὶδ γενεαὶ δεκατέσσαρες, καὶ ἀπὸ Δαυὶδἕως τῆς μετοικεσίας Βαβυλῶνος γενεαὶ δεκα-τέσσαρες, καὶ ἀπὸ τῆς μετοικεσίας Βαβυλῶνος

3

Page 59: Introducing SILE: A New Typesetting System

But so that you may know that the Son of Man has authorityon earth to forgive sins,”–he said to the paralytic– “I tell you,stand up, take your stretcher, and go home.” And immediatelythe man stood up, took his stretcher, and went out in front ofthem all. They were all amazed and glorified God, saying, “Wehave never seen anything like this!”

Jesus went out again by the sea. The whole crowd came tohim, and he taught them. As he went along, he saw Levi, theson of Alphaeus, sitting at the tax booth. “Follow me,” he saidto him. And he got up and followed him. As Jesus was havinga meal in Levi’s home, many tax collectors and sinners wereeating with Jesus and his disciples, for there were many whofollowed him. When the experts in the law and the Phariseessaw that he was eating with sinners and tax collectors, theysaid to his disciples, “Why does he eat with tax collectors andsinners?” When Jesus heard this he said to them, “Those whoare healthy don’t need a physician, but those who are sick do.I have not come to call the righteous, but sinners.”

Now John’s disciples and the Pharisees were fasting. Sothey came to Jesus and said, “Why do the disciples of Johnand the disciples of the Pharisees fast, but your disciples don’t

fast?” Jesus said to them, “The wedding guests cannot fast whilethe bridegroom is with them, can they? As long as they havethe bridegroom with them they do not fast. But the days arecoming when the bridegroom will be taken from them, and atthat time they will fast. No one sews a patch of unshrunk clothon an old garment; otherwise, the patch pulls away from it,the new from the old, and the tear becomes worse. And no onepours new wine into old wineskins; otherwise, the wine willburst the skins, and both the wine and the skins will be de-stroyed. Instead new wine is poured into new wineskins.”

Jesus was going through the grain fields on a Sabbath,and his disciples began to pick some heads of wheat as theymade their way. So the Pharisees said to him, “Look, why arethey doing what is against the law on the Sabbath?” He saidto them, “Have you never read what David did when he was inneed and he and his companions were hungry– how he enteredthe house of God when Abiathar was high priest and ate the sa-cred bread, which is against the law for any but the priests toeat, and also gave it to his companions?” Then he said to them,“The Sabbath was made for people, not people for the Sabbath.For this reason the Son of Man is lord even of the Sabbath.”

Then Jesus entered the synagogue again, and a man was therewho had a withered hand. They watched Jesus closely to seeif he would heal him on the Sabbath, so that they could ac-cuse him. So he said to the man who had the withered hand,“Stand up among all these people.” Then he said to them, “Is itlawful to do good on the Sabbath, or evil, to save a life or de-stroy it?” But they were silent. After looking around at them inanger, grieved by the hardness of their hearts, he said to theman, “Stretch out your hand.” He stretched it out, and his handwas restored. So the Pharisees went out immediately and beganplotting with the Herodians, as to how they could assassinatehim.

Then Jesus went away with his disciples to the sea, anda great multitude from Galilee followed him. And from Judea,Jerusalem, Idumea, beyond the Jordan River, and around Tyreand Sidon a great multitude came to him when they heardabout the things he had done. Because of the crowd, he toldhis disciples to have a small boat ready for him so the crowdwould not press toward him. For he had healed many, so thatall who were afflicted with diseases pressed toward him in or-der to touch him. And whenever the unclean spirits saw him,they fell down before him and cried out, “You are the Son ofGod.” But he sternly ordered them not to make him known.

Now Jesus went up the mountain and called for those hewanted, and they came to him. He appointed twelve (whomhe named apostles), so that they would be with him and hecould send them to preach and to have authority to cast out

demons. He appointed twelve: To Simon he gave the name Pe-ter; to James and his brother John, the sons of Zebedee, he gavethe name Boanerges (that is, “sons of thunder”); and Andrew,Philip, Bartholomew, Matthew, Thomas, James the son of Al-phaeus, Thaddaeus, Simon the Zealot, and Judas Iscariot, whobetrayed him.

Now Jesus went home, and a crowd gathered so that theywere not able to eat. When his family heard this they went outto restrain him, for they said, “He is out of his mind.” The ex-perts in the law who came down from Jerusalem said, “He ispossessed by Beelzebul,” and, “By the ruler of demons he castsout demons.” So he called them and spoke to them in parables:“How can Satan cast out Satan? If a kingdom is divided againstitself, that kingdom will not be able to stand. If a house is di-vided against itself, that house will not be able to stand. Andif Satan rises against himself and is divided, he is not able tostand and his end has come. But no one is able to enter a strongman’s house and steal his property unless he first ties up thestrong man. Then he can thoroughly plunder his house. I tellyou the truth, people will be forgiven for all sins, even all theblasphemies they utter. But whoever blasphemes against theHoly Spirit will never be forgiven, but is guilty of an eternalsin” (because they said, “He has an unclean spirit”).

Then Jesus’ mother and his brothers came. Standing out-side, they sent word to him, to summon him. A crowd was sit-ting around him and they said to him, “Look, your mother andyour brothers are outside looking for you.” He answered themand said, “Who are my mother and my brothers?” And looking

Page 60: Introducing SILE: A New Typesetting System

ἅγιος adj. 1. holy 2. saintἅλις adv. 1. enough (Euripides) 2. sufficethἅλλομαι verb. 1. leapt (Homer)ἅλμη noun. f. 1. brine 2. brine fromἅλς noun. f. 1. sea (Homer) 2. saltἅλυσις noun. f. 1. chainἅλωσις noun. f. 1. capture (Pausanias)ἅμα adv. 1. same time 2. with 3. at 4. at once 5. togetherἅμιλλα noun. f. 1. rivalryἅπαξ adv. 1. once 2. have once (Epictetus) 3. has once 4.once only 5. had onceἅπας adj. 1. all 2. whole 3. every 4. everythingἅπτω verb. 1. touch (Plato)ἅρμα noun. n. 1. chariot 2. car (Homer)ἅρπαξ noun. m. 1. harpagoἅτε adv. 1. since (Plato) 2. since they (Plato) 3. inasmuchas (Xenophon)ἁγνός adj. 1. holy (Aeschylus) adv.ἁλίσκομαι verb. 1. capture 2. convict (Demosthenes) 3. beconvicted (Demosthenes) 4. was captured (Strabo) 5. be taken(Flavius Josephus) 6. was taken 7. be caught (Xenophon) 8.were captured (Xenophon)ἁλίζω verb. 1. so much asἁλιεύς noun. m. 1. fisherman (Pausanias)ἁλμυρός adj. 1. salt (Homer) 2. saltyἁμάρτημα noun. n. 1. error (Plato) 2. sin (Flavius Josephus)3. offence (Lysias) 4. fault (Epictetus) 5. mistake 6. blunderἁμαρτάνω verb. 1. miss (Homer) 2. err 3. sin 4. mistake 5.error (Aristotle) 6. fault (Epictetus)ἁμαρτία noun. f. 1. sin 2. error 3. mistakeἁμαρτωλός adj. 1. sinnerἁνδάνω verb. 1. found favourἁπαλός adj. 1. tender (Homer)ἁπλόος adj. 1. simple 2. straightforwardἁπλός adv. 1. absolute (Aristotle) 2. simp 3. in short (Epicte-tus)ἁπλότης noun. f. 1. straightforwardness

ἁρμάμαξα noun. f. 1. carriage (Xenophon)ἁρμόζω verb. 1. fit 2. suitable (Aristotle) 3. harmonizeἁρμονία noun. f. 1. harmony (Plato)ἁρπάζω verb. 1. seize (Flavius Josephus) 2. snatch (Euripi-des) 3. plunder 4. carried offἁρπαγή noun. f. 1. plunder (Flavius Josephus) 2. rapineἄαπτος adj. 1. invincible (Homer)ἄατος adj. 1. ear (Plato) 2. insatiate (Homer)ἄβατος adj. 1. impassable 2. inaccessibleἄβιος adj. 1. abii (Strabo)ἄβυσσος adj. 1. abyssἄξενος adj. 1. inhospitableἄξιος adj. 1. worthy 2. worth 3. deserve 4. valueἄξων noun. m. 1. axle (Xenophon)ἄδεια noun. f. 1. impunity (Demosthenes) 2. security 3. im-munity (Demosthenes)ἄδηλος adj. 1. uncertain 2. uncertaintyἄδικος adj. 1. unjust (Plato) 2. injustice 3. wrong (Plato) 4.wrongful (Plato) 5. unjust man (Plato) adv. 1. unjust (Lysi-as)ἄδοξος adj. 1. ingloriousἄδολος adj. 1. without treachery 2. without fraud 3. with-out guile adv.ἄεισμα noun. n. 1. ode (Plato) 2. lyric (Pausanias)ἄφαρ adv. 1. straightway sheἄφεσις noun. f. 1. remissionἄφιλος adj. 1. friendless adv.ἄφνω adv. 1. sudden (Appian)ἄφοβος adj. 1. fearless (Plato) adv.ἄφθαρτος adj. 1. imperishable (Aristotle)ἄφθιτος adj. 1. imperishable (Homer)ἄφθονος adj. 1. abundance (Xenophon) 2. abundantἄφρων adj. 1. foolish (Plato) 2. fool 3. unwise (Plato) 4.senseless (Plato) 5. unintelligent (Plato) 6. witless adv.ἄφωνος adj. 1. mute 2. voicelessἄγαλμα noun. n. 1. image (Pausanias) 2. statue (Pausanias)

1

Page 61: Introducing SILE: A New Typesetting System

འདི་སྐད་བདག་གིས་ཐོས་པ་དུས་གཅིག་ན། བཅོམ་ལྡན་འདས་རྒྱལ་པོའི་ཁབ་བྱ་རྒོད་ཕུང་པོའི་རི་ལ་དགེ་སློང་གི་ དགེ་འདུན་ཆེན་པོ་དང་། བྱང་ཆུབ་སེམས་དཔའི་དགེ་འདུན་ཆེན་པོ་དང་ཐབས་གཅིག་དུ་བཞུགས་ཏེ། དེའི་ཚེ་བཅོམ་ལྡན་འདས་ཟབ་མོ་སྣང་བ་ཞེས་བྱ་བའི་ ཆོས་ཀྱི་རྣམ་གྲངས་ཀྱི་ཏིང་ངེ་འཛིན་ལ་སྙོམས་པར་ བཞུགས་སོ།། ཡང་དེའི་ཚེ་བྱང་ཆུབ་སེམས་དཔའ་སེམས་དཔའ་ཆེན་པོ་འཕགས་པ་ སྤྱན་རས་གཟིགས་དབང་ཕྱུག་ ཤེས་རབ་ཀྱི་ཕ་རོལ་ཏུ་ ཕྱིན་པ་ཟབ་མོའི་སྤྱོད་པ་ཉིད་ལ་རྣམ་པར་བལྟ་ཞིང་། ཕུང་པོ་ལྔ་དེ་དག་ལ་ཡང་ རང་བཞིན་གྱིས་སྟོང་པར་རྣམ་པར་བལྟའོ།། དེ་ནས་སངས་རྒྱས་ཀྱི་མཐུས། ཚེ་དང་ལྡན་པ་ཤཱ་རིའི་བུས་བྱང་ཆུབ་སེམས་དཔའ་སེམས་དཔའ་ ཆེན་པོ་འཕགས་པ་སྤྱན་རས་གཟིགས་དབང་ཕྱུག་ལ་འདི་སྐད་ཅེས་

ཤེས་རབ་སྙིང་པོ་1

Page 62: Introducing SILE: A New Typesetting System

���.BUU� ���

���.BSL ������ .BUU� ������� -VLF ������

��� *T� �����.BUU� ����-VLF ���� +PIO����

��� "DUT �����

��� � ,JO����

���.BSL ������� .BUU� �������� -VLF ���� ��

���� 1T� ����*T� ����� .BUU������ ������.BSL ����-VLF �������� .BSL���� ��� .BUU�

➠ ✞「

✔! ~!

3RLQWLQJ WR OLQJHULQJ UHVXOW➠ � &RPSOHWH�✔! � .HHS RQ GRLQJ�~!

xxx

xxx

xxx ✞「

」 ✞「」

.HHS RQ GRLQJ�~!

3RLQWLQJ WR OLQJHULQJ UHVXOW➠

'UDPDWLFDOO\ UHSHDWHGxxx

&RPSOHWH�✔!

Page 63: Introducing SILE: A New Typesetting System

Your Article NameJirka Kosek

[email protected]

http://xmlguru.cz

Jirka Kosek is a freelance XML consultantand teacher at the University of Economics in Prague. He has more than 10 years of experiencein providing XML consultancy and training. Jirka is an active member in several standardizationbodies, including OASIS (DocBook TC and RELAX NG TC), the W3C (XSL WG and ITS WG), and

ISO/IEC JTC1/SC34 (DSDL, Topic Maps). You can get familiar with his recent work and thoughts throughhis blog (http://xmlguru.cz). He's currently engaged in preparing the next XML Prague conference.

freelance ACME

Leading text before the first section can be there…… and there

1 IntroductionIntroductory section goes here…… more text …

2 Another sectionYou can use not only paragraphs, but also programlistings:

�������� ������������������������������������� ��������������� ������������������������� �� � ������ ����� ���������������

����������DocBook offers plenty of elements for inline markup, for example <code> for arbitrary code, e.g. print 2+3;.You can give titles to your programlistings using <example>:

Example 1: DocBook V4.5 document����� ������������� ��������������������������� ������� ������ �������������� ������� ��� ���������

����������������������������������������������������������������� ����������

������������� ������������������������� �� � ���� ����� ���������������

����������

Lists can be created using <itemizedlist> or <orderedlist> elements:

• DocBook V4.x is feature frozen. DocBook V4.5 is the last version of DocBook in the V4.x series. Any new DocBook development,like the addition of new elements, will be done in DocBook V5.0. It is only matter of time before useful, new elements will be addedinto DocBook V5.0, but they are not likely to be back ported into DocBook V4.x. DocBook V4.x will be in maintenance mode anderrata will be published if necessary.

• DocBook V5.0 offers new functionality. DocBook V5.0 provides significant improvements over DocBook V4.x. For example thereis general markup for annotations, a new and flexible system for linking, and unified markup for information sections using the

1

Page 64: Introducing SILE: A New Typesetting System

Things I learnt

Page 65: Introducing SILE: A New Typesetting System

Lua

Page 66: Introducing SILE: A New Typesetting System

PDF Libraries

Page 67: Introducing SILE: A New Typesetting System

Simon’s Law of Extensibility

A system which can be extended in multiple dimensions cannot prevent conflict between extensions.

Page 68: Introducing SILE: A New Typesetting System

“Hacker” News

Page 69: Introducing SILE: A New Typesetting System

I need to avoid buses

Page 70: Introducing SILE: A New Typesetting System

The Future of SILE

Page 71: Introducing SILE: A New Typesetting System

Technical goals

• Vertical typesetting

• PDF outline features

• Split off libtexpdf

Page 72: Introducing SILE: A New Typesetting System

Community goals

Page 73: Introducing SILE: A New Typesetting System
Page 74: Introducing SILE: A New Typesetting System

Thank you

http://www.sile-typesetter.org/google://sile+typesetter

Page 75: Introducing SILE: A New Typesetting System

Bonus Material

Page 76: Introducing SILE: A New Typesetting System

Context: Columns and notes

http://tex.stackexchange.com/questions/67078/text-in-outer-margin-of-multiple-columns

Page 77: Introducing SILE: A New Typesetting System

Context: Grid and notes