Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Textile table syntax 2.2 - Pls. offer some help (and semantics)
Last night I built a fully featured HTML table …
And then I became overambitious …
And rebuilt the whole table with Textile 2.2.
It worked out very well (in the end) but all those textile table syntax shortcuts are a pain in the a…
I hereby declare to need a spoonful of TTSH :)
- Give me some extra textile table help in the write tab
- (TXP 10) Offer me a textile table build widget in the write tab
- Last not least please think about a speaking textile table syntax (semantics). I am referring to the new Textile Table Syntax
PS: ‘I’ and ‘me’ are meant as synonyms for DUTTS
PPS: Automatic odd/even CSS class declaration for tr
are urgently needed as well.
PPS: Oh, and the textile table parser should support line breaks.
Last edited by merz1 (2011-11-14 08:43:49)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: Textile table syntax 2.2 - Pls. offer some help (and semantics)
merz1 wrote:
all those textile table syntax shortcuts are a pain in the a…
Congrats for making a table in Textile. Hardcore!
We tried to be consistent with the rest of the Textile system by using ^
for header, ~
for footer and -
for body, like other markup helpers. Some are unique to Tables though; the =
for caption, for instance. Shame the HTML5 spec has removed the table summary, but I guess they have their reasons.
Give me some extra textile table help in the write tab
Could do. We should also revive the notion that Textile needs its own proper home page, not just the sitemonks server. That way we can link to the current documentation instead of zem’s. Make some noise.
(TXP 10) Offer me a textile table build widget in the write tab
I’m sure someone can come up with a textile plugin for this, when that feature becomes core.
please think about a speaking textile table syntax
Automatic odd/even CSS class declaration for
tr
are urgently needed as well.
Isn’t CSS nth-child more widely adopted across browsers yet? (I don’t know as it’s not my field of expertise)
the textile table parser should support line breaks
If it’s not already an issue on the github Issue Tracker, can you please either submit one there, or send us a defect report from the sitemonks page, detailing an example where it doens’t work and what you expect. Thanks.
Last edited by Bloke (2011-11-14 09:11:38)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Textile table syntax 2.2 - Pls. offer some help (and semantics)
Bloke wrote:
We tried to be consistent with the rest of the Textile system by using
^
for header,~
for footer and-
for body, like other markup helpers. Some are unique to Tables though; the=
for caption, for instance. Shame the HTML5 spec has removed the table summary, but I guess they have their reasons.
They are not memorable, not readable and a complete table becomes as messy as the real HTML thing. More below.
Could do (some extra textile table help in the write tab). We should also revive the notion that Textile needs its own proper home page, not just the sitemonks server. That way we can link to the current documentation instead of zem’s. Make some noise.
Can’t comment too much on those two points. They are both a must.
I’m sure someone can come up with a textile plugin for this (textile table build widget in the write tab), when that feature becomes core.
I would have been happy already yesterday if I could find a complete table set with all options as ready made code with some short txp:hide
comment on every line.
Why not allow additional thead.
, tfooter
, tbody.
, tcaption.
, tcolspan.
with nested tcolgroup.
, etc.
Sidenote: I am building a small client (worse: a friend) site and beside other things I have no idea how to explain those textile table thingies to him. I can’t postpone editorial access by himself forever, you know? Let alone let him change the table himself [and repair the mess afterwards (hell!)].
Yes, I’ll head over to github and check the repository but before I’ll have to create another table 1st :)
Isn’t CSS nth-child more widely adopted across browsers yet? (I don’t know as it’s not my field of expertise)
Have to check that but still I have to check then how to make it work (switchable) in textile.
If it’s (the textile table parser should support line breaks) not already an issue on the github Issue Tracker, can you please either submit one there, or send us a defect report from the sitemonks page, detailing an example where it doens’t work and what you expect. Thanks.
I have to use <br />
which always is ugly as hell (or can also be used in the TXP world as a placeholder for one of your famous portrait photos).
Thanks for listening!
Right now I try to remember:
table. summary
|=. caption - text above table
|:. |250|100| <txp:hide>complicated: colgroup, colspan, col definition</txp:hide>
|^. <txp:hide>thead declaration</txp:hide>
|_. Why is a<br />needed |_. Why is a br-tag needed |
|~. <txp:hide>footer declaration</txp:hide>
|\2. footer text span over two columns |
|-. <txp:hide>tbody - needed above every sub-tbody</txp:hide>
(dark). | The odd/even tr-class thing should be | *automatic*! |
| And I want | speaking |
| semantic | understandable |
| memorable | syntax! |
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: Textile table syntax 2.2 - Pls. offer some help (and semantics)
hi merz
have you tried aks_table plugin? it let make copy/past table from spreadsheet inot article, but it s not supporting complex tables.
Cheers
Offline
Re: Textile table syntax 2.2 - Pls. offer some help (and semantics)
Bloke wrote:
Isn’t CSS nth-child more widely adopted across browsers yet? (I don’t know as it’s not my field of expertise)
Agreed. You certainly don’t need to put class="odd"
or class="even"
on lists or table rows these days, just use (for example)…
tr:nth-child(2n) {
background-color: #eee;
}
…to target every second <tr>
in a table. Works in all current browsers and IE9. If you need IE7/IE8 support use Selectivizr – though since this is cosmetic styling it’s not essential to support IE8 IMHO.
Last edited by philwareham (2011-11-14 14:25:27)
Offline
Re: Textile table syntax 2.2 - Pls. offer some help (and semantics)
merz1 wrote:
They are not memorable, not readable and a complete table becomes as messy as the real HTML thing.
Agreed. But the original table syntax was hardly pretty if you want to start adding things like classes. And we had to work within that framework for backwards compatibility. Perhaps over time a better syntax could come along, which could run in parallel.
In Textile’s defence, at least it has table syntax, unlike Markdown (Markdown Extra includes it, and the syntax is prettier, though I don’t know if it handles tfoot or captions. And it doesn’t do line breaks either. Nor speaking tables).
[ Textile needs its own proper home page ] a must.
Sure. Wave your wand and I’ll magic up a bit of free time and money to register a domain and set up a fully-functioning site for all the Textile ports to live. Until someone else (not me: my site design isn’t great) gets time to do that, perhaps you could put a site together to do it? Then all we’ve got to do is register the domain and host it.
I would have been happy already yesterday if I could find a complete table set with all options as ready made code with some short
txp:hide
comment
That was yesterday :-) Since then, you’ve gone through the learning curve so feel free to share your commented findings and I’ll find a place to put them. fwiw, there are a few examples in the huge comment block at the top of the classTextile.php file, but I admit that’s not the most user friendly place for them. Just a convenience for people who only have the raw source and no other docs I guess.
Why not allow additional
thead.
,tfooter
,tbody.
,tcaption.
,tcolspan.
with nestedtcolgroup.
, etc.
Then what’s the advantage to Textiling it over writing it in HTML or using a WYSIWYG table generator? Not much. Textile is about minimising keystrokes to mark stuff up. Sometimes it’s not pretty, sometimes you have to stretch your brain and remember that ^
means up (superscript, header, …) and ~
means down (subscript, footer, …), and so on. If you do it a few times, it becomes easier: it’s the learning curve that’s the hard part.
I have no idea how to explain those textile table thingies to him
Then don’t. Give him Excel and use jmd_csv or aks_table or similar to allow them to be injected straight into Txp.
[nth-child] I have to check then how to make it work (switchable) in textile.
Not sure I follow. Isn’t nth-child a CSS selector? If you only want it on particular tables, give them a class and put that name in your selector.
[EDIT: Dragondz and philwareham were ninja-quick on some of the above points]
Last edited by Bloke (2011-11-14 14:39:35)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Textile table syntax 2.2 - Pls. offer some help (and semantics)
Thanks Phil!
I deleted all class declarations and did something similar to
tbody tr:nth-child(odd) {
background-color: #eee;
}
… and it works perfectly well (IE <9 can kiss my a.. until the client complains :)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: Textile table syntax 2.2 - Pls. offer some help (and semantics)
Maybe this could become a v.0.1 of an extra Textile Table Syntax Help block in the article write sidebar:
table. summary (deprecated in HTML5) <txp:hide>"Textile 2.2 table syntax":http://textile.sitemonks.com/?eg=RefGuide#table</txp:hide>
|=. caption - text above table
|:. |250|100| <txp:hide>complicated: colgroup, colspan, here: 2 col definition in pixels</txp:hide>
|^. <txp:hide>thead declaration</txp:hide>
|_. thead th cell 1 |_. thead th cell 2 |
|~. <txp:hide>footer declaration</txp:hide>
|\2. footer text span over two columns |
|-. <txp:hide>tbody declaration- needed above every sub-tbody</txp:hide>
(dark). | <<< A tr-class | added manually! |
| Better use a CSS pseudo:class | Example: ??tbody tr:nth-child(odd) {background-color: #eee;}?? |
| td table cell | td table cell |
| td table cell | td table cell |
| td | td |
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: Textile table syntax 2.2 - Pls. offer some help (and semantics)
(Me) Why not allow additional thead., tfooter, tbody., tcaption., tcolspan. with nested tcolgroup., etc.
(Bloke) Then what’s the advantage to Textiling it over writing it in HTML or using a WYSIWYG table generator? Not much. Textile is about minimising keystrokes to mark stuff up. Sometimes it’s not pretty, sometimes you have to stretch your brain and remember that ^ means up (superscript, header, …) and ~ means down (subscript, footer, …), and so on. If you do it a few times, it becomes easier: it’s the learning curve that’s the hard part.
Advantages:
- readable …
- I said ‘additional’
- The learning curve is for people who do it often but what about people like me who do a table every quarter? I forget the advanced table syntax the moment I publish a table.
- minimising keystrokes is no argument when it comes to complex tables. For tables the main argument pro textile is valid HTML output. minimising keystrokes is still available for easy editing of table cells.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: Textile table syntax 2.2 - Pls. offer some help (and semantics)
merz1 wrote:
Advantages: [snip]
All valid points. Consider me beaten into submission.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline