Roam-Research / issues

Roam Research - A note-taking tool for networked thought.
https://roamresearch.com/
304 stars 7 forks source link

Transpose table #703

Open MatthieuBizien opened 3 years ago

MatthieuBizien commented 3 years ago

Describe the problem

A common workflow is to create a table, and to want to transpose it afterwards. It's similar to matrix transpose or Excel transpose.

It could also ease the creation of the table in some cases.

Feature implementation

A syntax like {{[[table]]: transposed}} could be used for that.

Eg. the table [1] is created by the code [2]. If I want to transform it to [3], I have to reformat the code to match [4].

It would be great that [5] generate [3].

[1]: image

[2]:

- {{[[table]]}}
    - **Country**
        - **Capital**
    - **USA**
        - Washington DC
    - **China**
        - Beijing

[3]: image

[4]:

- {{[[table]]}}
    - **Country**
        - **USA**
            - **China**
    - **Capital**
        - Washington DC
            - Beijing

[5]:

- {{[[table]]: transposed}}
    - **Country**
        - **Capital**
    - **USA**
        - Washington DC
    - **China**
        - Beijing
phhq commented 3 years ago

This would be excellent. A simple "invert" which would reverse the order of a tree would also be awesome, eg something like: {{[[invert]]: ((A))((E))}}

Prior A

After: E