Kalak_of_Tyr
 member, 4 posts
Tue 21 Apr 2009
at 08:40
Re: Easy Tables and Grids.
smarttable too
megadeus
 member, 1151 posts
 'Twas brillig and the
 slithy toves...
Wed 22 Apr 2009
at 02:14
Re: Easy Tables and Grids.
Hearing the arguments against Markdown-like tables, I rescind my recommendation to mimic Markdown's table structure.

The alternate simple table structure proposed in this thread would work just as well, and I agree that since Rpol has its own unique markup for most other features, it might as well be consistent in making up its own markup, rather than picking and choosing from a number of possibly-conflicting syntaxes.
fantasyknight
 member, 36 posts
Wed 23 Dec 2009
at 06:42
Re: Easy Tables and Grids.
I vote for the markdown. I know its not as versatile, but for the majority of the masses here on RPoL, its the simplest and easiest thing to use. Not to say that the SmartTable isn't going to be overly difficult, but for the most noob friendly implementation, it has to be the markdown.
Genghis the Hutt
 member, 1781 posts
 AKA Banaticus
Thu 10 Jun 2010
at 06:06
Re: Easy Tables and Grids.
I like the one that's most similar to HTML, since virtually all of RPoL works with regular HTML tags instead of BB code.
matthewfenn
 member, 115 posts
 www.nj-pbem.com
 Northern Journey PBeM DM
Thu 10 Jun 2010
at 08:37
Re: Easy Tables and Grids.
Having just caught up on this thread and having missed it before - I'd vote for Smarttable.

Is it still possible to have multiple lines within a cell?

See below an example of how I've used the existing tables:

Note - one of the problems I've had is I can't force a column to a specific width.  You can force the table to 100% (or less), but not individual columns to say 50% sadly...  what are the chances of implementing that? he asks hopefully. :-)

LIFE: 57
CRMNLSTGRANT
C.HAND: 2  Grant Hand 4
C.DECK: 39 (60 card deck) Grant DECK 39 (60 card deck)
BATTLEFIELD:
Land
(-)Piranha Marsh (B)
(-)Swamp (B)

(-)Crypt of Agadeem (B)(see link)
 [http://magiccards.info/zen/en/212.html]
Creatures
War-spike changeling (3/3,changeling)(R:1st strike)(runed halo)
[http://magiccards.info/mt/en/112.html]
Child of Night (2/1, lifelink)
 [http://magiccards.info/m10/en/88.html]
Anowon, the Ruin Sage (4/3)on our upkeep, each player sacs a nonvampire)
 [http://magiccards.info/wwk/en/49.html]
 
Vampire Nighthawk (10/11, flying,deathtouch,lifelink)[8](runed halo)[http://magiccards.info/zen/en/116.html] (blade of bloodchief)
t-Kalitas, Bloodchief of Ghet (5/5)(BBB,tap: destroy creature, see link)
 [http://magiccards.info/zen/en/99.html]
Vampire Aristocrat (6/6)(sac creature get +2/+2 for turn)[4](blade of bloodchief)
 [http://magiccards.info/m10/en/117.html]
Black Vampire Creature Token (2/4)
Black Vampire Creature Token (1/1)

praguepride
 member, 312 posts
 Asker of Questions
 Finder of Answers
Thu 10 Jun 2010
at 14:14
Re: Easy Tables and Grids.
+1 for WYSIWYG table creation

I'd be a HUGE fan of cleaning up all those <td><tr>'s as it makes complicated grids very difficult to read.


When I was running maps in games I would constantly have to Preview to make sure I put stuff in the right box because when you get a 20x20 grid full of stuff, it becomes very difficult to keep track of as your vision is clouded by all the <td>'s and <tr>'s

It was even more difficult during a board game I tried to run as if you spend a lot of time to make your grid nice and readable, and someone "quotes" it and messes it up, then you're back with a huge blob again.
Zag24
 member, 308 posts
Thu 10 Jun 2010
at 14:56
Re: Easy Tables and Grids.
I don't feel strongly about which form of simple table you implement -- the choices all seem ok and pretty simple to get right.  If I were to pick, I'd go with wiki table format, which is pretty easy and powerful, doesn't get in the way much.

However, one feature I would really like is some technique to convert the simple one to the more complex layout using the table, th, tr, and td tags that you already support.  I often start making a simple table and get half way into it before realizing that I want something more complex than the simple format supports.  If it were easy to convert -- a one-time, no way back conversion -- that would be super.
stm
 member, 28 posts
Thu 10 Jun 2010
at 15:11
Re: Easy Tables and Grids.
I'd say that WYSWYG editing is outside the scope of this thread. ;)

One argument against smarttable: Have some mercy with us poor non-english-keyboard users. It's really a pain to type "[]" or "{}" because it's AltGr + something over here.

For consistency reasons I'd stick with the <> idiom as much as possible (I'm constantly confused about the [list], and [code] tag). So


<smarttable>
Header 1 | Header 2
---
Field 1 | Field two
</smarttable>


would be my favorite. (My actual favorite would be the dokuwiki syntax, but you seem determined to do it your own way.)

This message was last edited by the user at 15:11, Thu 10 June 2010.

praguepride
 member, 313 posts
 Asker of Questions
 Finder of Answers
Thu 10 Jun 2010
at 16:12
Re: Easy Tables and Grids.
It wouldn't be a complete WYSIWYG because of tags on the text, but otherwise it'd be nice to have a simple thing like a <tt> tag but one that arranges things a bit nicer with the solid lines etc.
ashlayne
 member, 1566 posts
 May you have exactly the
 God/dess you deserve. =p
Fri 11 Jun 2010
at 03:24
Re: Easy Tables and Grids.
Praguepride: truetype already exists.
with code

F
 o
  r
   m
    a
     t
      t
       i
        n
         g

           w
           i
           t
           h

         T
        r
       u
      e
     t
    y
   p
  e
 !


showing code
<tt>
F
 o
  r
   m
    a
     t
      t
       i
        n
         g

           w
           i
           t
           h

         T
        r
       u
      e
     t
    y
   p
  e
 !</tt>
cruinne
 moderator, 5324 posts
 Jack, you have
 debauched my sloth!
Fri 11 Jun 2010
at 13:06
Re: Easy Tables and Grids.
In addition to the teletype tag, there is also the <pre></pre> tag for "preformatted" text.  Teletype -- <tt></tt> -- is intended for inline text, and preformatted is for blocks of text.  Though, on RPoL, teletype preserves whitespace better than it does in normal HTML so can be used as ashlayne showed, above :-)
praguepride
 member, 320 posts
 Asker of Questions
 Finder of Answers
Fri 11 Jun 2010
at 15:59
Re: Easy Tables and Grids.
I already know about the <tt> tag, use it quite extinsively. I was using it as an example to show how much easier formatting is when you can just see it right there without having to surround every single word with tags.


Being able to <tt> but with a table as described in the OP would make tables & grids much easier to use from the perspective of someone who doesn't like having to dig through a whole mess of <td> and <tr>'s to find out what's what.


For example: I had a 16x16 grid for players to use as a map. They'd post their actions like: E5 to F9. Easy right?

But I would have to go through and count out where F9 was to get them moved to the right spot. Now make that a larger battle and I hope you see where it gets annoying. Even properly arranging your <td>'s into a grid still means you've got a lot of clutter on the screen.

Then, when I was done moving the PC's, I still had to figure out what the NPC's were doing. And again, because of the clutter of all those table tags, I usually ended up having to preview the post so I could see the nice clean table, and then write down the moves in notepad, re-edit the post and again count out where everything moved to.

In the end it became too much of a hassle so I went mapless, and that makes me sad as someone who likes playing with maps.

If the tables were simple and easy to see like in the OP with his "smarttable" example, it would have been nice and easy as I could see the grid laid out without all those tags extending the lenght of a line.

[] vs. <td></td> saves you 7 characters PER CELL. For a 10 length row, that's 79 characters of saved space. This avoid the line from wrapping, and makes it much easier to read.
Genghis the Hutt
 member, 1786 posts
 AKA Banaticus
Fri 11 Jun 2010
at 19:08
Re: Easy Tables and Grids.
You know, if you use Excel, you can just put characters or whatever in each cell, then "save as web page" then copy/paste the source of that into RPoL, since RPoL basically uses HTML tags for everything.
jase
 admin, 3072 posts
 Cogito, ergo procuro.
 Carpe stultus!
Mon 29 Apr 2013
at 14:40
Re: Easy Tables and Grids.
I've been working on the "easy" tables in conjunction with something else recently, and it quickly became apparent to me that having anything with an opening and closing character was rather... annoying.  Plus what stm said about non-english keyboard stuck in my mind.

So with that in mind I've ditched the original smarttable layout and gone with something between PHP Markdown, Wikis, and random voices in my head.  The reason I haven't gone with something in particular is there's no standard, so there's no reason for me to pick something that already exists, plus those I liked the most had severe limitations (such as PHP Markdown has to have a header row, and cannot have header cells anywhere else).

So, the new proposal for easy tables is that they are now constructed with simple pipe symbols at the start of a line, and separating each cell.

| Header | Header | Header |
|--------|--------|--------|
| Cell   | Cell   | Cell   |

Or ...
| Header | Header | Header |
|--------------------------|
| Cell   | Cell   | Cell   |


Or ...
|= Header  | Cell  | Cell  |
|= Header  | Cell  | Cell  |
|= Header  | Cell  | Cell  |

Characters immediately after the pipe affect the display of the cell.
  1. "=" denotes a header cell (TH)
  2. "^" means centre aligned
  3. ">" means right aligned
  4. "<" means left aligned
  5. A number means a columns span of that many columns.
  6. An additional full stop plus a number after the above means row span.

1-4 can be jammed up against the cell text (e.g. "=<Text"), however the column/row span require a space after them to avoid the table automatically grabbing text it shouldn't.  If your cell is going to have one of the special characters in it then just put a space after the pipe, which I'd recommend for good visual layout anyway.

This all happens without needing a encompasing wrapper.  To avoid ordinary pipe symbols being turned into a table, there has to be at least two lines starting with a pipe, the first line has to have at least two pipes in total.

e.g.


| Header | Header | Header |
|-   (enough to denote it's a table, plus at least one minus sign so it's considered a header)

Or ...
| Cell | Cell  | Cell  |
|    (enough to trigger the table conversion)

Trailing (end-of-line) pipe symbols are optional.

The table generation also takes lead from the first row in the table and assumes you want that many columns for the table.  Though you can exceed it later, the table will pad out the extra cells per row as it thinks they're needed.


| Header 1.1   | Header 1.2 | Header 1.3  |  1.4 |
|------------------------------------------------|
|>Header 2.1   | Cell 2.2   | Lazy...
|>2.3 Cell 3.1              | Cell 3.3    |> 3.4 |
                            |1.3 Cell 4.3 |^ 4.4 |
                                          |  5.4 |
| 6.1          | 6.2                      |  6.4 |

Will display something like:

Header 1.1Header 1.2Header 1.31.4
Header 2.1Cell 2.2Lazy... 
Cell 3.1Cell 3.33.4
Cell 4.34.4
5.4
6.16.26.4

This message was last edited by the user at 04:08, Fri 03 May 2013.

rogar308
 member, 323 posts
 Gaming is good!
 Got RPOL in my soul
Mon 29 Apr 2013
at 15:16
Re: Easy Tables and Grids.
+1 for random voices in my head

I already use the |'s for tables in another wiki so that works well for me.
Maidenfine
 member, 78 posts
Mon 29 Apr 2013
at 17:09
Re: Easy Tables and Grids.
+1 It's relatively simple for someone who just wants to do something quick. But it also allows for more complication if someone needs or wants it.
Lunarius
 member, 248 posts
 eadem mutata resurgo
 pax ex tyranny
Mon 29 Apr 2013
at 19:18
Re: Easy Tables and Grids.
+1 if the current table method will still exist and this will be an additional option for formatting.
-1 if it will replace the current table method outright.
adrasteia1
 member, 1274 posts
 Even a small star
 shines in the darkness
Mon 29 Apr 2013
at 22:48
Re: Easy Tables and Grids.
That's very well thought out.

+1 as an additional and potentially simpler method for table creation.
-1 but (as Lunarius said) if it's to replace the use of the html table tags.
jmkool
 member, 250 posts
 aka'd as The Kool
Mon 29 Apr 2013
at 22:59
Re: Easy Tables and Grids.
This seems well thought out, and much easier to visualize as it's being prepared.

+1 as an option, but -1 if it's to replace the existing method.  The current method, while more cumbersome, allows for more exactness.
jase
 admin, 3073 posts
 Cogito, ergo procuro.
 Carpe stultus!
Tue 30 Apr 2013
at 00:34
Re: Easy Tables and Grids.
Breaking tables in the current 7 million posts seems a really good idea!
Lunarius
 member, 249 posts
 eadem mutata resurgo
 pax ex tyranny
Tue 30 Apr 2013
at 00:37
Re: Easy Tables and Grids.
In reply to jase (msg # 55):

Too bad we're at the end of April; that would make one heck of a prank. :P
adrasteia1
 member, 1275 posts
 Even a small star
 shines in the darkness
Tue 30 Apr 2013
at 01:07
Re: Easy Tables and Grids.
Well, I guess there's that..
Skald
 moderator, 413 posts
 Whatever it is,
 I'm against it
Tue 30 Apr 2013
at 05:47
Re: Easy Tables and Grids.
VERY clever.

I like it ... but I'd also want an option to override, as I use character sheets which make extensive use of pipe symbols and don't know that I'd necessarily want them to turn into tables (though I'm sure a bit of beta testing would determine that one way or t'other).

Would/could the pre and/or tt tags override the smart table ?  Compared with 7 million posts, it'd be nothing for me to have to add tags to char sheets in my games if I needed to.

And of course, where would we be without feature creep ... would it be possible/desireable to add another control character (say ~) to hide the table lines (ie make 'em the same colour as the background) - sometimes it's nicer to set out data that way, and could be used to give the effect of set tabstops with a proportional font.
jase
 admin, 3074 posts
 Cogito, ergo procuro.
 Carpe stultus!
Tue 30 Apr 2013
at 08:02
Re: Easy Tables and Grids.
Skald:
I use character sheets which make extensive use of pipe symbols

Yes, but I assume they're not the first character on each line.

   This | Will | Not
Trigger |    A | Table

| Nor | Will | One | Line

| Nor
| Will
| One
| Pipe


ThisWill
TriggerATable

Putting anything infront of the pipe (except a space) will stop the table triggering, so wrapping a pipe in tt or something will also do it, if for some reason you do need a bunch of lines starting with |.
matthewfenn
 member, 303 posts
 www.nj-pbem.com
 Northern Journey PBeM DM
Tue 30 Apr 2013
at 09:20
Re: Easy Tables and Grids.
In reply to jase (msg # 59):

Would this trigger a table?

.A.
B..
..C