tabularray
tabularray copied to clipboard
Add rotate option for table cells
Normally rotating a cell in not hard with the help of \rotatebox or \adjustbox command. But if the cell has multiple lines, it is a little complicated to rotate it. So it is better to have a general rotate option for cells.
There are some questions:
- How to rotate cells with multiple lines?
- How to rotate cells with paragraphs?
- Should we apply horizontal alignment to rotated cells?
- Which origin should we set in rotating cells?
While writing this answer, similar thought also popped up in my mind. It will be great if such an option exists.
Hi @lvjr, what is the status of this enhancement?
Sorry, no plan for this feature in the near future.
As suggested in https://github.com/lvjr/tabularray/discussions/85#discussioncomment-5143722 --- one possible interface would be to have a rotate=angle, inner pos key. It would typeset the cell's content in a parbox or similar, with the inner justification (left, right, center).
The "outside position" of the resulting box will be controlled by the standard cell option horizontally or vertically.
Optionally it can have a fixed width (handy sometimes) and the option to hide/fix the horizontal width (useful with oblique degrees titles, which are quite common, as in #343 --- although in this case, I do not know how to treat the background color...).