Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on Best practices for posting tabular data
Parent
Best practices for posting tabular data
I am trying to find how tabular data is presented in Software Development. So far, I have found one question, How to pivot text?. The question presents tabular data using code blocks, dash to indicate a new row, pipe to indicate column separation and underscore to indicate an empty cell. I took the data from the referred question and set none as the programming language to prevent the text from being highlighted:
- PERSON 1 | PERSON 2 | YES
- PERSON 1 | PERSON 3 | YES
- PERSON 2 | PERSON 1 | YES
- PERSON 2 | PERSON 3 | YES
- PERSON 3 | PERSON 1 | NO
- PERSON 3 | PERSON 2 | NO
and
- _________| PERSON 1 | PERSON 2 | PERSON 3 |
- PERSON 1 | X | YES | YES |
- PERSON 2 | YES | X | YES |
- PERSON 3 | NO | NO | X |
Sometimes, including the column and row headers on spreadsheet-formula
questions might be relevant. Below I'm using dashes (-) and a plus (+) character between columns to separate the column headers from the data below:
| A | B | C
--+----------+----------+-----
1 | PERSON 1 | PERSON 2 | YES
2 | PERSON 1 | PERSON 3 | YES
3 | PERSON 2 | PERSON 1 | YES
4 | PERSON 2 | PERSON 3 | YES
5 | PERSON 3 | PERSON 1 | NO
6 | PERSON 3 | PERSON 2 | NO
It bugs me a bit that the space between lines looks to be too big.
- Is there a better way to present tabular data?
- Is there a way to reduce the space between lines?
Post
I just found a post in Codidact Meta using showing a rendered table. Looking at the post content, it is using markdown.
Playing a bit, I found that the following "plain text" (intended to show markdown features, not to make it readable, maintainable, etc.)
| | | |
-|-|-
PERSON 1 | PERSON 2 | YES|
PERSON 1 | PERSON 3 | YES|
PERSON 2 | PERSON 1 | YES|
PERSON 2 | PERSON 3 | YES|
PERSON 3 | PERSON 1 | NO|
PERSON 3 | PERSON 2 | NO|
is rendered as follows:
Live demo:
PERSON 1 | PERSON 2 | YES |
PERSON 1 | PERSON 3 | YES |
PERSON 2 | PERSON 1 | YES |
PERSON 2 | PERSON 3 | YES |
PERSON 3 | PERSON 1 | NO |
PERSON 3 | PERSON 2 | NO |
Recently found related posts
Blog
- Newsletter #5 (December 2020) Mentions adding table support in the editor.
2 comment threads