diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-10-24 21:26:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-10-24 21:26:00 +0200 |
commit | dff2745dae03ba945f2de644fb53218a47044e08 (patch) | |
tree | 74089de409cb9c40b52067e815e935029e817586 /tex/context/base/node-tra.lua | |
parent | 833cf5633ca02333e5a4880647cc3e69b71a314f (diff) | |
download | context-dff2745dae03ba945f2de644fb53218a47044e08.tar.gz |
beta 2011.10.24 21:26
Diffstat (limited to 'tex/context/base/node-tra.lua')
-rw-r--r-- | tex/context/base/node-tra.lua | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/tex/context/base/node-tra.lua b/tex/context/base/node-tra.lua index 706b2fc10..61bd82ddc 100644 --- a/tex/context/base/node-tra.lua +++ b/tex/context/base/node-tra.lua @@ -541,15 +541,27 @@ end nodes.showsimplelist = function(h,depth) showsimplelist(h,depth,0) end -function nodes.listtoutf(h,joiner) - local joiner = (joiner ==true and utfchar(0x200C)) or joiner -- zwnj +local function listtoutf(h,joiner,textonly) + local joiner = (joiner == true and utfchar(0x200C)) or joiner -- zwnj local w = { } while h do - if h.id == glyph_code then -- always true + local id = h.id + if id == glyph_code then -- always true w[#w+1] = utfchar(h.char) if joiner then w[#w+1] = joiner end + elseif id == disc_code then + local pre, rep, pos = h.pre, h.replace, h.post + w[#w+1] = format("[%s|%s|%s]", + pre and listtoutf(pre,joiner,textonly) or "", + rep and listtoutf(rep,joiner,textonly) or "", + mid and listtoutf(mid,joiner,textonly) or "" + ) + elseif textonly then + if id == glue_code and h.width > 0 then + w[#w+1] = " " + end else w[#w+1] = "[-]" end @@ -558,6 +570,8 @@ function nodes.listtoutf(h,joiner) return concat(w) end +nodes.listtoutf = listtoutf + local what = { [0] = "unknown", "line", "box", "indent", "row", "cell" } local function showboxes(n,symbol,depth) |