PrettyTables.jl
PrettyTables.jl copied to clipboard
New backend for math matrix printing
Currently the matrix format uses a slight variation of the default format, by using the box drawing characters and simply suppressing the top, bottom and middle lines of the table:
┌ ┐
│ 1 false 1.0 1 │
│ 2 true 2.0 2 │
│ 3 false 3.0 3 │
└ ┘
It would be nice if we could use actual bracket characters for the matrix backend. Unicode has dedicated characters for precisely this use case. It would look like this:
⎡ 1 false 1.0 1 ⎤
⎜ 2 true 2.0 2 ⎥
⎣ 3 false 3.0 3 ⎦
This was originally proposed in #33, but it would require more substantial changes than a mere tweak to the format, because with the extended bracket characters format the corners are not placed in a separate "row", as is the case with the current format, but rather inline with the first and last lines of actual content. Thus I'm opening a new issue to track this modification.
One downside to this otherwise very nice idea is that the display of ⎡ and ⎤ seems broken in e.g. VSCode's integrated terminal, cf.:
The display of U+23A1 (⎡) and U+23A4 (⎤) is mangled.
I guess the fallback font has these wrong, somehow; but since there's a lot of VSCode users, this may not be desirable.
EDIT: I filed an issue in VSCode repo about the character rendering issue: https://github.com/microsoft/vscode/issues/172504