-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List tables #27
Comments
This list-like syntax seems like it would be very messy if a cell were to contain a list. If you can specify the dimensions of the table at the top (number of rows and cols), then it's predetermined how many cells you have, and you can just specify that many items for your list. How about:
|
@jgm I don't like the "table" keyword since it's natural language specific. I'd rather use a specific delimiter like Also alignments could be shown symbolically with punctuation
Where aligns are symbolized with
My Pandoc filter repeats the rightmost explicit alignment when there are more columns than explicit alignments. That's handy e.g. when you want the leftmost column to be left aligned and the rest to be right aligned. Are widths supposed to be percentages of the total available width? I think that would be the easiest conceptually and notationally Perhaps also a
BTW my filter accepts numbered lists and produces them by default, giving the header row if any index 0. That is very useful to keep track on where you are in a large table. @uvtc I have used nested lists for and in tables for a long time with my filter. They are not confusing if you indent properly and use a variety of list markers. Also you can wrap the cell contents in a div to disambiguate further. I think complicating the syntax would be really confusing.
|
I think |
Yeah. I see what you mean. Incidentally, I don't like calling these "list tables", since the list item markers aren't exactly working like regular list markers (e.g. they have two in a row). (Maybe "list-like tables"...) Would this syntax break design goal num 7 (friendly to hard-wrapping)? |
Do we need nested lists here? We already make blank lines between list elements meaningful, so we can, asciidoctor-style, use blanks to delimit the rows?
if we need to delimit the header-row, we can re-use thematic break |
What about cells with more than one paragraph, or with content with something else than a paragraph? IMNSHO the whole point of list tables is to allow that, but it won't work if you use blanks to delimit rows. |
I think it would?
That is, blanks between the cells seems unambiguous with blanks within the cells |
Thinking about this more, nested lists allow to express N-dimensional structures, while we only need 2D. So a flat sequence which delimits row starts is enough. One way to delimit rows would be blank lines, but we also can use different list marks:
|
This is pretty similar to wikipedia table syntax.
|
Inspired by #128 (comment), what if we do the following for all tables:
Examples
This ... probably has all kinds of ambiguities, and requires a fair amount of "pattern matching" from the convertor to infer the structure from syntax, but on the first glance it seems like it is both convenient for short tables and reasonable for large tables. I think the main thing we've lost is specifying aligment on per-row basis, but that doesnt' seem crucial. |
Or maybe we don't? Maybe we can treat |
Tables whose cells contain block-level content (multiple paragraphs, lists, code blocks) can't be represented as pipe tables. For these cases we might want to provide "list tables" as in RST. These could be rerpresented as a list in a div with attributes.
The text was updated successfully, but these errors were encountered: