texstudio icon indicating copy to clipboard operation
texstudio copied to clipboard

Transpose table

Open oscargus opened this issue 2 years ago • 4 comments

Describe the feature and the current behavior/state

Sometimes one realize that one started the table in the wrong direction. For example, one got too many columns, but not that many rows. Then it would be useful to be able to transpose the table, i.e. turn columns into rows and rows into columns.

Who will benefit with this feature?

People that are surprised by the width/height of their table.

Any Other info

As this may be rather error prone and/or have a lot of special cases with multicolumns etc that are tricky to sort out, I suggest that this is implemented as "copy as transposed" or something. So no direct manipulation of the table.

Aligning and lines and so on is of course an issue, but the feature will be very useful and save quite a bit of work compared to having to rewrite the whole table. So I wouldn't worry too much about keeping those in a sensible way.

oscargus avatar Jun 11 '22 11:06 oscargus

Can you explain which table you are talking about? Do you mean a transpose button for the Tabular Wizard?

fjpereny avatar Jun 11 '22 14:06 fjpereny

I primarily mean in the editor (similar to the cut/add columns) as I do not use the Tabular Wizard. But that can probably be useful as well (and most likely easier to implement).

(As far as I know, it is not possible to "get back" to the Tabular Wizard once one has a "plain text" tabular?)

oscargus avatar Jun 11 '22 14:06 oscargus

You have actually given me an idea, perhaps a function to take a current tabular and put it back into the tabular wizard for modifications. Perhaps a highlight and right click window or dropdown or something. Then it would also be easy to put a transpose function in as well.

fjpereny avatar Jun 11 '22 16:06 fjpereny

macro/scritp is also a solution, see wiki (e.g. table) and manual

sunderme avatar Jun 11 '22 16:06 sunderme