1if not modules then modules = { } end modules ['spac-brk'] = {
2 version = 1.001,
3 comment = "companion to spac-brk.mkiv",
4 author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
5 copyright = "PRAGMA ADE / ConTeXt Development Team",
6 license = "see context related readme files"
7}
8
9
10
11
12
13
14
15
16
17
18
19
20local checklist = { }
21nodes.handlers.linebreakchecks = checklist
22
23local report = logs.reporter("linebreaks")
24local breakcodes = tex.breakcodes
25
26checklist[-1] = function(what)
27 report("callback %i : %s",what,breakcodes[what])
28end
29
30local function check(what,checks,...)
31 local check = checklist[checks]
32 if check then
33 return check(what,checks,...)
34 else
35
36 end
37end
38
39callback.register("line_break",check)
40callback.register("balance", check)
41 |