You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am currently documenting parameters in .rst format. I would love a solution for creating a clean multiline table in .rst. Does anyone have a solution? I am using this format:
Can you make this table multiline?
I read that you can use a single bar line ( | ) to add multiple lines, but I have not succeeded.
.. list-table:: Title :widths: 25 25 50 :header-rows: 1 * - Heading row 1, column 1 - Heading row 1, column 2 - Heading row 1, column 3 * - Row 1, column 1 - Row 1, column 2 - Row 1, column 3 - Row 1, column 3 * - Row 2, column 1 - Row 2, column 2 - Row 2, column 3
Hi Ashley,
The example you provided has 4 columns in the 1st row (- Row 1, column 3 is there twice), while the rest of the rows have 3 columns.
If I remove the extra - Row 1, column 3 and use the following in an .rst file committed in my repo:
.. list-table:: Title
:widths: 25 25 50
:header-rows: 1
* - Heading row 1, column 1
- Heading row 1, column 2
- Heading row 1, column 3
* - Row 1, column 1
- Row 1, column 2
- Row 1, column 3
* - Row 2, column 1
- Row 2, column 2
- Row 2, column 3
Then the table shows as follows:
Is this what you are expecting to see? And does it work if you remove the 4th column from the example?
Kind regards,
Theodora
Hi Theodora,
Thank you for your help! Yes I should have explained. That was my attempt at trying to add more rows within a row. I need. to add a "description," and it is multiple sentences. These tables are only lone-line sentences. It gets tricky to format a table with content in the rows. I have not found a solution yet. I decided o just list my parameters.
Sincerely,
Ashley
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashley,
Thank you for the clarification, I did not understand the issue initially.
Just to make sure I understand correctly, you are looking to have multiple rows/new lines within a table cell?
I have tried using the vertical pipe ( | ) you mentioned, and the following content:
.. list-table:: Title
:widths: 25 25 50
:header-rows: 1
* - Heading row 1, column 1
- Heading row 1, column 2
- Heading row 1, column 3
* - Row 1, column 1
- Row 1, column 2
- | Row 1, column 3
| Another row
| A third row
* - Row 2, column 1
- Row 2, column 2
- Row 2, column 3
will format the table like this:
Is this what you are looking for? Or were you looking for something different?
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Theodora,
This is actually what im looking for. I wonder if I can add, for example, three sentences or more. It gets really hard to have more content and keep the integrity of the table. I will try and replicate this!
Thank you,
Ashley
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wonder if its possible to create a table that has 20-30 rows.. with multi-line text in one of the columns?. I am trying to create a table for Parameters in .rst.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashley,
Thank you for the feedback. You are asking
I wonder if its possible to create a table that has 20-30 rows.. with multi-line text in one of the columns?. I am trying to create a table for Parameters in .rst.
Could you please explain how this is different from the example I gave you in my previous reply?
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your answer is correct. It just gets difficult with actually putting content inside the table and then also keeping the table formatted for it to render in HTML. I will work on this and do my best to create a working table. Your answer is the best I have had since I started the search. I don't think there is any other solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, Ashley. If you run into any issues that you'd like some help with, it would be useful to have a demo of the content you are using, a screenshot of what you are seeing (it doesn't have to be the actual content of your file, it could be some demo code to demonstrate the issue) and an explanation on how you would like it to be formatted instead. Please feel free to let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Theodora,
I used your table example yesterday to show. I spoke with a coworker and discovered that one of the issues was a CSS fix. If I run into another issue as I build, I would love your help. Thank you for all the support. If I need more assistance, I will be happy to show a demo of what it is I am attempting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome, please feel free to reach out if needed!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.