PDA

View Full Version : On the Origin of Tables



An Enemy Spy
2010-07-02, 10:30 AM
How exactly do you make a table in your posts?

Jokasti
2010-07-02, 10:43 AM
[ table = head ] Header 1 | Header 2 | Header 3
A | 1 | !
B | 2 | @
C | 3 | #
[ / table]

without spaces becomes:
{table=head] Header 1 | Header 2 | Header 3
A | 1 | !
B | 2 | @
C | 3 | #
[/table]

The Rose Dragon
2010-07-02, 10:50 AM
{table=head] Header 1 | Header 2 | Header 3
A | 1 | !
B | 2 | @
C | 3 | #
[/table]

Would it be so hard to use the noparse tags?

Ashen Lilies
2010-07-02, 11:07 AM
It depresses me that you lacked the initiative to go ahead and change the third column so that it read 'do-re-mi' as well... :smalltongue:

GenPol
2010-07-02, 11:11 AM
http://www.giantitp.com/forums/misc.php?do=bbcode

Scroll all the way down to the bottom, it's explained there. Although if your intention is to use the table for homebrew, than Fax Celestis has an excellent guide (http://www.giantitp.com/forums/showthread.php?t=10313) on making tables and formatting things for that purpose.

EDIT: Actually, you'll find a better answer a few posts down.

Jokasti
2010-07-02, 11:51 AM
Would it be so hard to use the noparse tags?

Incredibly so.

Zeta Kai
2010-07-02, 12:36 PM
Here's how I do my tables:

Make them in Excel, as fancy as I care to.
Copy the table.
Paste into Notepad (seriously).
Highlight one of the blank spaces (which is like a solid Tab of empty space).
CTRL + H to pull up the Replace window.
Paste the empty space into the Find What field.
Type a | (SHIFT + \ on most keyboards) into the Replace With field.
Hit ENTER.
Copy the resultant text (CTRL + A, then CTRL + C).
Go to your GitP Forum window.
Type {table=head][/table].
Paste your text in between the table tags.
Post the message at your liesure.
Profit.

Trust me, it looks WAY more complicated than it is. I don't even think about the steps anymore, & most of those are automatic to anyone who is reasonably internet-savvy.

Keris
2010-07-02, 01:09 PM
Threads on the table function seem to roll around every month or so. I wonder how much use I'll get out of this post yet. :smalltongue:

All you ever wanted to know, and more, about tables:

Originally posted by The vB Code List (http://www.giantitp.com/forums/misc.php?do=bbcode)
table
With this vB code tables can be inserted into the post. Columns are seperated by »|«, every new line is a new row.
Usage
{table]value[/table]
Example Usage
{table]column 1|column 2|column 3[/table]
Example Output{table]column 1|column 2|column 3[/table]

Introduction to options:
example: {table="option1;option2=value;option3='this is a long value with space';option4=value1,value2,value3"]
The whole option list should be wrapped with quotes.
Options are seperated by a semicolon
If an option has a value it is assigned with "equal to" mark. (option2)
If the value contains blanks or special characters it has to be wrapped with apostrophes. (option3)
If an option has more than one value they are seperated by a comma. (option4)

Description of options:
head
This option defines the first line as head, so the first row is shown as head of the table. If the table sould be sorted, the head is not sorted.

sort=1d,2,3
This defines the table to be sorted by column 1, then column 2, then column 3. The "d" after the first colum specifies the order: descending (default: ascending)

autonum=1 (equal to autonum) autonum=a autonum=A
Defines that a new first column containing a numbering should be inserted.
1 -> 1, 2, 3, 4, ... , 999, 1000, ....
a -> a, b, c, ... , aa, ab, ... , zz
A -> A, B, C, ... , AA, BB, ... , ZZ

autonumtitle=oneword autonumtitle='long value with spaces'
Defines the title of the autonum-column. Can be left empty.

width=123px width=45em width=67%
Defines the width of the table.

Introduction to special options (formating cells and rows):
example: {option1=value1}{option2=value2}
These "special" options can be written as the very first content of a cell to format it.

Description of special options:
{colsp=5}
Defines a colspan from current cell with the length of 5 cells
N.B., insertion of a space between a | and a special option will result in the special option being ignored.


{table] A | {colsp=2} B
C | D | E [/table]
gives
{table] A | {colsp=2} B
C | D | E [/table]
But with the elimitation of the space between the | and the {colsp=2}, we get
{table] A |{colsp=2} B
C | D | E [/table]

For a linebreak within a cell, you can use a [br] tag.

{table]Two[br] lines|one line[/table]
gives
{table]Two[br] lines|one line[/table]

N.B., if previewed, edited or quoted, instances of [br] will be changed to <br>, so you'll have to go change them back to square brackets by yourself. If you're doing a lot of editing to a long post with multiple [br] tags, I find it useful to paste it into a text editor, copying back just to preview each change.

Additionally, when using alignment tags ([LEFT], [CENTER], [RIGHT]) in the cell at the end of a row, you will need to add a blank line before the next row, or things get muddled.

{table]A1 |
Aligned
A2 | B2[/table]
gives
{table]A1 |
Aligned
A2 | B2[/table]

Whereas

{table]A1 |
Aligned

A2 | B2[/table]
gives
{table]A1 |
Aligned

A2 | B2[/table]

Shhalahr Windrider
2010-07-02, 03:08 PM
http://www.giantitp.com/forums/misc.php?do=bbcode

Scroll all the way down to the bottom, it's explained there.
Not entirely explained :smallannoyed:. It leaves out pretty much all the special options, leaving only generic tables. See the bit quoted from Rawhide in Keris’s post above for those.

GenPol
2010-07-02, 11:06 PM
Not entirely explained :smallannoyed:. It leaves out pretty much all the special options, leaving only generic tables. See the bit quoted from Rawhide in Keris’s post above for those.

Er, yeah, that would probably be better. :smallredface: