Open mn4367 opened 10 years ago
I worry that this is starting to get too specific, and not something that most MMD users need.
I'll leave this issue open for now as a reminder to keep thinking about this, but no promises.
Either way, however, I do appreciate your making the suggestion!
F-
I'd like to add something to the specification, the possibility to use custom classes:
| Col X | Col Y | Col Z |
| :---------- | :---------: | ----------: |
| Cell 1X | Cell 1Y | Cell 1Z |
| Cell 2X :|: Cell 2Y |: Cell 2Z :|
{:.table}
or even:
{:.table}
| Col X | Col Y | Col Z |
| :---------- | :---------: | ----------: |
| Cell 1X | Cell 1Y | Cell 1Z |
| Cell 2X :|: Cell 2Y |: Cell 2Z :|
to render the table envelop as:
<table class="table"> ... </table>
Looking at issue #49 it seems that 'correct' column alignment isn't possible with the indicators in the alignment/divider line alone. The following syntax proposal could help. The basic idea is to allow individual cell alignment by using colons in a similar same way they are used in the alignment/divider line:
The alignment of
Cell 1A
is driven by the system as before,Cell 1B
is centered,Cell 1C
is right aligned,Cell 2A
is left aligned andCell 2B
is centered.The alignment of the cells in the first row is controlled by the alignment/divider line as before,
Cell 2X
is right aligned,Cell 2YC
is left aligned andCell 2Z
is centered.In general, the following rules should apply:
I know that you are cautious in syntax extensions (for good reasons) but maybe you can consider this extension. Cell alignment is hard to get right with CSS or XSLT after MMD conversion for arbitrary tables.
It is also clear that this extension would break backwards compatibility with (a small amount of) existing documents, so it probably needs to be controllable with a command-line switch or a metadata key.
Thanks, Michael