On 30 March 2018 at 22:11, Andrei Chis <chisvasileandrei(a)gmail.com> wrote:
Hi,
By default there is no support for right-justified columns in Glamour.
But have a look at the glamour presentation based on fast table. With that
presentation the #column:evaluated: method can also return a morph, not
just a string. It might be possible to return a morph that aligns the
content to the right.
Thanks for that tip!
What do you mean by fixed-width font? Do you have an
example of what
you'd like to do?
If you have HTML enabled in your email client then I can demonstrate right
here.
I would like to be able to format semi-structured text in a fixed-width
font for neat alignment like this:
---- TRACE 1 start stdin:1
0006 MULVN 0 0 1 ; -3
0007 FORL 1 => 0006
---- TRACE 1 IR
.... SNAP #0 [ ---- ]
0001 rbp int SLOAD #2 CI
0002 xmm7 > num SLOAD #1 T
0003 xmm7 + num MUL 0002 -3
0004 rbp + int ADD 0001 +1
.... SNAP #1 [ ---- 0003 ]
0005 > int LE 0004 +1000
.... SNAP #2 [ ---- 0003 0004 ---- ---- 0004 ]
0006 ------------ LOOP ------------
0007 xmm7 + num MUL 0003 -3
0008 rbp + int ADD 0004 +1
.... SNAP #3 [ ---- 0007 ]
and I would like to avoid presenting it with a variable-width font and
wonky alignment like this:
---- TRACE 1 start stdin:1
0006 MULVN 0 0 1 ; -3
0007 FORL 1 => 0006
---- TRACE 1 IR
.... SNAP #0 [ ---- ]
0001 rbp int SLOAD #2 CI
0002 xmm7 > num SLOAD #1 T
0003 xmm7 + num MUL 0002 -3
0004 rbp + int ADD 0001 +1
.... SNAP #1 [ ---- 0003 ]
0005 > int LE 0004 +1000
.... SNAP #2 [ ---- 0003 0004 ---- ---- 0004 ]
0006 ------------ LOOP ------------
0007 xmm7 + num MUL 0003 -3
0008 rbp + int ADD 0004 +1
.... SNAP #3 [ ---- 0007 ]
I realize that I could parse the structure of this text and e.g. present it
with a fastTreeTable but I suspect this won't work very well when the
structure of the data is not entirely uniform between rows.