All right, after some readings, I came out with a node solution. The
major idea is listed below and works just fine. "n" from node_traverse
(head) and n.id==node.id ('glyph')
My question is: is there a better way? Because these codes are so
dirty. I prefer mplib but I have no clue how to do that.
=============================================
local ht,wd,dp = n.height,n.width,n.depth ;
local rwd = .5*65536
local k1 = node.new('kern')
k1.kern = -wd-.5*rwd
local r1 = node.new("rule")
r1.width, r1.height, r1.depth = rwd, ht, dp
local k2 = node.new('kern')
k2.kern = -r1.width
local r2 = node.new("rule")
r2.width, r2.height, r2.depth = wd+rwd, ht+.5*rwd, -ht+.5*rwd
local k3 = node.new('kern')
k3.kern = -r2.width
local r3 = node.new("rule")
r3.width, r3.height, r3.depth = wd+rwd, -dp+.5*rwd, dp+.5*rwd
local k4 = node.new('kern')
k4.kern = -.5*rwd
local r4 = node.new("rule")
r4.width, r4.height, r4.depth = rwd, ht, dp
local k5 = node.new('kern')
k5.kern = -.5*rwd
k1.next = r1
r1.prev = k1
r1.next = k2
k2.prev = r1
k2.next = r2
r2.prev = k2
r2.next = k3
k3.prev = r2
k3.next = r3
r3.prev = k3
r3.next = k4
k4.prev = r3
k4.next = r4
r4.prev = k4
r4.next = k5
k5.prev = r4
local box = node.hpack(k1)
local tb = node.vpack(box)
insert_after (head, n, tb)
=============================================
On Thu, Dec 22, 2011 at 6:47 AM, Hans Hagen
On 21-12-2011 12:16, Zhichu Chen wrote:
Hi,
I wrote some CJK vertical typesetting macros in mkii a long time ago and I want to adopt it to mkiv. Sadly the \iftracechinese is gone. Can I still draw boxes of each glyph to see if they are aligned in my way? Drawing a line in the background is so not cool.
mkiv does things completely different
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
-- Best Regards Chen