PrettyTables.jl
PrettyTables.jl copied to clipboard
`AnsiTextCell` and alignment
I was expecting that AnsiTextCell would behave somewhat like a "minipage" in LaTeX: i.e. effectively as a rectangular box that is plugged in as an element of the table and isn't affected by alignment in the table itself.
Currently, however, the content of AnsiTextCell follows the alignment of the table itself, i.e.:

I had hoped that every alignment would've not affected the display of each AnsiTextCell. With the current behavior, for wanting AnsiTextCell to print "as-is" relative to its text-representation, one must use alignment = :l or manually ensure that each line in the AnsiTextCell is equally long.
Hi @thchr
I see. Actually AnsiTextCell is a customized cell. Each line is treated as a line in a cell. That's why you are seeing this type of behavior.
I really do not want to change this behavior just for AnsiTextCell since every customized cell is handled generically inside PrettyTables.jl. However, we can add an option when creating AnsiTextCell to force every line to have the same length by appending spaces. Will it be enough?
Ah, I see; that's my misunderstanding then.
If there were an option to append spaces automatically to "fill out" short lines, that would indeed be enough and would suit my purposes perfectly!
Nice! I will do it!