Tables in PGML #909
Replies: 4 comments
-
You are right that doing all the things you want would take some changes to the infrastructure, but it doesn't take too much change to make at least a preliminary version of this possible. I've made a version of PGML.pl called PGMLtables.pl that includes the needed changes. The main structural different in the PGMLtables.pl file is that the block definitions now allow you to specify a One caveat is that the contents of the cells can't be block-level commands (like paragraph breaks and numbered lists). It may be possible to allow that, but I have run out of time to work on this, and haven't looked into it to see how hard that would be (frankly, I have forgotten how it all works, and it is complicated). For now, you can't use those within a cell, and if you do, the results are completely messed up. That should be addressed in the future. Because indentation is meaningful in PGML (indentation by 4 spaces produces indentation in the output), allowing the indentation in your tables is a bit awkward. I have added a flag that ignores indentation commands, and that does allow for indentation, but it does mean you can't add indentation in the cells. But since you can't currently do block-level commands in the cells anyway, indenting would not be available anyway. It may be possible in the future to allow it (by removing the indentation of the Anyway, the link above should give you a |
Beta Was this translation helpful? Give feedback.
-
PS, I don't seem to have any problems with |
Beta Was this translation helpful? Give feedback.
-
I've updated the |
Beta Was this translation helpful? Give feedback.
-
Thanks Davide, this will be great. I have been bogged down with local things but I want to try this out and put it to use soon. Thank you for your time on this. |
Beta Was this translation helpful? Give feedback.
-
Seeking advice, most likely from @dpvc. With
niceTables.pl
, one of a few ways to construct a table is like:This way offers enough structure to put options on the cells. Note that
DataTable
has aLayoutTable
counterpart.I would like to make PGML markup that mimics this and is ultimteley translated to the above. I would like it to be such that for cells, an author still writes content using PGML markup. For example a cell might have
[_]{$answer}
in it. Here is the markup for a DataTable that I have gotten started with, for within PGML.and for a LayoutTable, a starred variant:
[# ... #]*{table options}
. All the newlines and indentation above is just for presentation, and is not supposed to make a difference with output. For example, an author could make the less readable:I want to ask for thoughts on this markup. Some thoughts/observations I had:
[# ... #]
I really only want to parse rows. But it seems like with machinery that is there now, I need toparseAll
.[- ... -]
I really only want to parse cells.[- ... -]
where the closing-]
gets parse as a horizontal rule. Was dash an intrinsically bad choice in any obvious way?Should I be using block delimiters with brackets in the first place? Given the
niceTables.pl
structure, what markup would you come up with for this?Beta Was this translation helpful? Give feedback.
All reactions