tabularray icon indicating copy to clipboard operation
tabularray copied to clipboard

Add rotate option for table cells

Open lvjr opened this issue 4 years ago • 4 comments

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:

  1. How to rotate cells with multiple lines?
  2. How to rotate cells with paragraphs?
  3. Should we apply horizontal alignment to rotated cells?
  4. Which origin should we set in rotating cells?

lvjr avatar Sep 09 '21 09:09 lvjr

While writing this answer, similar thought also popped up in my mind. It will be great if such an option exists.

md-al-imran-abir avatar Jul 30 '22 17:07 md-al-imran-abir

Hi @lvjr, what is the status of this enhancement?

JDMCreator avatar Aug 06 '22 16:08 JDMCreator

Sorry, no plan for this feature in the near future.

lvjr avatar Aug 07 '22 08:08 lvjr

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...).

Rmano avatar Feb 28 '23 12:02 Rmano