> one shortcomming: (uses J display rather than data)
Don't understand you.
sbox returns a result (of precision: unicode) which can be assigned.
z=: cutopen '€1.23 €45.67 €890.12'
zz=: sbox z
zz
+-----+------+-------+
|€1.23|€45.67|€890.12|
+-----+------+-------+
As for boxes not quite lining up, that only serves to emphasize what I
said: that "fixed width" with today's fonts is more of an expressed wish
than a realized actuality. In your case I think it's 127{a. that's fouling
things up. At least it does on my Mac. Windows might / will behave
differently. So will different fonts.
On Wed, Apr 30, 2014 at 1:15 PM, 'Pascal Jasmin' via Programming <
[email protected]> wrote:
> It is cool, and example looks good:
>
> one shortcomming: (uses J display rather than data)
>
> sbox 3}._32<\ u: a.
>
> this almost lines up: (i think char 173/174 double prints?)
> sbox <"1 u: (95 166 188 +"0 1 i.30) { a.
>
>
> ----- Original Message -----
> From: Ian Clark <[email protected]>
> To: Programming forum <[email protected]>
> Cc:
> Sent: Wednesday, April 30, 2014 1:17:56 AM
> Subject: Re: [Jprogramming] Unicode boxed display
>
> This is the addon mentioned by Danylo...
>
>
> require 'format/sbox'
> ] z=: cutopen '€2.56 €72.67 €1287.21' NB. "Euro" signs
>
> ┌───────┬────────┬──────────┐
>
> │€2.56│€72.67│€1287.21│
>
> └───────┴────────┴──────────┘
>
> sbox z
>
> ┌─────┬──────┬────────┐
>
> │€2.56│€72.67│€1287.21│
>
> └─────┴──────┴────────┘
>
> You'll need to paste it into a "Term" or an IJS window to see it properly.
> Let me know if sbox doesn't work for you.
>
> There's a lab that goes with the 'format/sbox' addon called: "Displaying
> boxed nouns containing unicode glyphs".
>
> I wrote this thing way back in Oct 2012. There's a forum thread:
> http://www.jsoftware.com/pipermail/programming/2012-October/029641.html
> comparing June's and my approaches, which are totally different. Basically
> June extends the original algorithm. I simply get a box layout sans unicode
> and overlay the unicode back onto it. If I recall, my method must
> eventually break down if you have too many boxes.
>
>
> On Tue, Apr 29, 2014 at 8:55 PM, Danylo Lizanets <[email protected]>
> wrote:
>
> > There is standard sbox addon.
> >
> >
> > On Sun, Apr 27, 2014 at 12:02 AM, Henry Rich <[email protected]>
> wrote:
> >
> > > Display of boxes containing non-ASCII characters messes up the
> alignment
> > > of the boxes. Has anyone written a verb to format such boxes so that
> the
> > > boxes line up?
> > >
> > > Henry Rich
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
>
> > >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm