Thanks for pointing that out, which I didn't know. Simple modification works in that case:
bstr=:todisplay@:mat@:thbox (you could eliminate the call to mat inside thbox without observable differences) 2007/8/15, Roger Hui <[EMAIL PROTECTED]>: > In case you don't already know, the bstr verb fails > on arrays with rank greater than 2. e.g. > > y=: sigma ; ;:'chthonic diplodocus egg' > bstr y > bstr 4 5$y > bstr 2 4 5$y NB. wrong result > > > > ----- Original Message ----- > From: June Kim <[EMAIL PROTECTED]> > Date: Tuesday, August 14, 2007 11:10 > Subject: Re: [Jgeneral] unicode spacing problem > To: General forum <[email protected]> > > > For a general approach, see http://jsoftware.com/jwiki/JuneKim > > > > Usage example with your sigma: > > > > bstr <sigma > > +-+ > > |σ| > > +-+ > > > > > > 2007/8/14, Carl Ledbetter <[EMAIL PROTECTED]>: > > > I'm trying to use some unicode characters and have encountered > > a problem I > > > just can't seem to solve. Although the characters > > display nicely in an .ijx > > > window, the formatting for boxes around them gets messed up-- > > presumably> because they're double byte characters. I cannot > > find a way to solve this, > > > although I've spent hours looking in the documentation and > > trying various > > > things. Although the context in which I am trying to use them > > is much more > > > complicated, the matter comes down basically to this problem: > > > > > > sigma =: 4 u: 963 > > > sigma > > > σ > > > <sigma > > > ┌──┐ > > > │σ│ > > > └──┘ > > > <'s' > > > ┌─┐ > > > │s│ > > > └─┘ > > > The box around the σ spaces incorrectly (by analogy with a box > > around> an ordinary character). The parts of the box not on the > > σ line appear > > > to believe they need an extra space, even though it doesn't. > > > > > > I have tried converting to U8 characters, among other things, > > but nothing > > > seems to work. > > > > > > Is there a way to solve this formatting problem? I have > > tried, for > > > instance, to insert an invisible blank appended to the σ to > > push the > > > right side of the box over (not a perfect solution, but it > > would work) > > > but can't even find a way to do that. The best solution > > would be to find > > > a way to create the σ so that it doesn't make the < think > > it needs to be > > > wider. > > > > > > Anyone have a way to do that? > > > > > > I am using this, for now, only on the display by employing > > > > > > W =: (1!:2)&2 > > > > > > as in: > > > > > > W 'σ' > > > σ > > > > > > or > > > > > > W sigma > > > σ > > > W <sigma > > > ┌──┐ > > > │σ│ > > > └──┘ > > > > > > Eventually I'll use LaTeX to set type--and I expect to > > encounter some > > > version of this problem again when mixing TeX and J. Any > > advice on that? > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm >
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
