PDA

View Full Version : Multi-part Table making [Tutorial, including pictures]

Mulletmanalive
2011-08-16, 01:35 PM
NineThe Puma asked me to clean up my previous demonstration in the use of collapsed tables. I actually learned the technique from Vaynor's writings but here we go:

I apologise for the screen stretching but it's the enormous table at the bottom...

Tables with Merged Cells

Merging cells is fairly simple and uses the {colsp=X} command, which is placed in a table. The cell that it is included in "counts as" a number of cells equal to the number where "X" is written above.

As a simple, silly example, i'm going to merge the first three cells on the second line of a three line table. The fourth column is needed both to show the difference and to stop the line from becoming a mere mark on the page.

{colsp=3}MERGE!!!|Normal

stuff!|More Stuff!|ZOMG! Moar Stff!|Normal[/table]

Produces a table that looks like this [though it won't work as i've bolded the text of the code for the example]:

{colsp=3}MERGE!!!|Normal

stuff!|More Stuff!|ZOMG! Moar Stff!|Normal[/table]

Multi-part Tables

In response to the current fashion for nested tables, this is how to make a triple table:

Let's assume that we want to make a table that is for a sorcerer knock off. I'll just be using the actual tables from the Sorcerer for this, taken from the SRD.

The table will have three sub tables. To make this, we have to merge the three tables line by line . To split the tables, we'll put a double || in between the blocks of text for the sub tables.

Counting along, the first table is 6 columns wide:

{table]Level|
BAB|
Fort|
Ref|
Will|Special[/table]

So we'll put a top line on the table above that with {colsp=6} written in to it. We'll call that one "Features." We'll split that off with a || and then we'll do one for "Spells per Day" with {colsp=10} and again for the "Spells Known" section. Both have 10 sections because spells go from "0" to "9."

This has the following effect:

{colsp=6}Features||{colsp=10}Spells per Day||{colsp=10}Spells Known

Level|
BAB|
Fort|
Ref|
Will|Special||
0|
1|
2|
3|
4|
5|
6|
7|
8|
9||
0|
1|
2|
3|
4|
5|
6|
7|
8|
9

1|
+0|
+0|
+0|
+2|Familiar||
5|
3|
-|
-|
-|
-|
-|
-|
-|
-||
4|
2|
-|
-|
-|
-|
-|
-|
-|
-

The actual text from this and the first two lines of the table looks [hauntingly] like this:
[{colsp=6}Features||{colsp=10}Spells per Day||{colsp=10}Spells Known

Level|
BAB|
Fort|
Ref|
Will|Special||
0|
1|
2|
3|
4|
5|
6|
7|
8|
9||
0|
1|
2|
3|
4|
5|
6|
7|
8|
9

1|
+0|
+0|
+0|
+2|Familiar||
5|
3|
-|
-|
-|
-|
-|
-|
-|
-||
4|
2|
-|
-|
-|
-|
-|
-|
-|
-

Using Excel:

Making tables from scratch is a [swears] nightmare and you can't, unfortunately, use the table generator sites to make these merged tables. I prefer to use Excel to do this anyway.

Below is my method.

First, we need to get the table. I usually write the things in Excel anyway, as it makes transposing them into Word easier. I've tried Open Office but I instantly gave in in hair pulling frustration [though I know it works fine].

As I was working with existing tables, I took the sorcerer ones from the .RTF files on the Wizards site. I stitched them together and had to rewrite the first line because of a wierd glitch but I ended up with this:

http://i833.photobucket.com/albums/zz256/mulletmanalive/Prepairing-the-table.jpg

From there, you need to make extra columns. I haven't bothered to make a macro for this, so if anyone can figure out how, that'd be smashing.

The basic method is to left click on the tab at the top of the column, then right-click on it, finally clicking [Insert Column].

http://i833.photobucket.com/albums/zz256/mulletmanalive/Slitting-the-table.jpg

From here, you type in the first piece of the puzzle. As there's no position adjustment for the first column, I simply inserted the | symbol and then typed
straight after it.

Then, you simply reselect the cell and use the little black box in the corner to pull the thing down the column:

http://i833.photobucket.com/albums/zz256/mulletmanalive/First-Column.jpg
http://i833.photobucket.com/albums/zz256/mulletmanalive/Copying-Down.jpg

The seperators for the more common cells have to close the
tags on the previous cell and open the next set after a divide. Ending up looking like this:

|

I didn't center the Special column, so the bits around it look like

| and |[center] respectively.

Finally, I pasted the normal [|[center] code into the divider columns between the sub tables. I then selected the first cell, went to the action bar up top and added an extra | to make the extra split.

The end result looked like:

http://i833.photobucket.com/albums/zz256/mulletmanalive/Finished.jpg

Finally, I copied the whole thing and dumped it into the forum.

The heading line, I usually just apply the normal adjustments from the above method to everything and then manually bold things once it's in the forum, but in this case, I just copy pasted the code from the three example lines, leaving me with the following, beautiful table.

Level |
BAB |
Fort |
Ref |
Will |Special ||
0 |
1st |
2nd |
3rd |
4th |
5th|
6th |
7th |
8th |
9th||
0 |
1st |
2nd |
3rd |
4th |
5th |
6th |
7th |
8th |
9th

1st |
0 |
0 |
0 |
2 | Summon Familiar ||
5 |
3 |
- |
- |
- |
- |
- |
- |
- |
- ||
4 |
2 |
- |
- |
- |
- |
- |
- |
- |
-

2nd |
1 |
0 |
0 |
3 | ||
6 |
4 |
— |
— |
— |
— |
— |
— |
— |
— ||
5 |
2 |
— |
— |
— |
— |
— |
— |
— |

3rd |
1 |
1 |
1 |
3 | ||
6 |
5 |
— |
— |
— |
— |
— |
— |
— |
— ||
5 |
3 |
— |
— |
— |
— |
— |
— |
— |

4th |
2 |
1 |
1 |
4 | ||
6 |
6 |
3 |
— |
— |
— |
— |
— |
— |
— ||
6 |
3 |
1 |
— |
— |
— |
— |
— |
— |

5th |
2 |
1 |
1 |
4 | ||
6 |
6 |
4 |
— |
— |
— |
— |
— |
— |
— ||
6 |
4 |
2 |
— |
— |
— |
— |
— |
— |

6th |
3 |
2 |
2 |
5 | ||
6 |
6 |
5 |
3 |
— |
— |
— |
— |
— |
— ||
7 |
4 |
2 |
1 |
— |
— |
— |
— |
— |

7th |
3 |
2 |
2 |
5 | ||
6 |
6 |
6 |
4 |
— |
— |
— |
— |
— |
— ||
7 |
5 |
3 |
2 |
— |
— |
— |
— |
— |

8th |
4 |
2 |
2 |
6 | ||
6 |
6 |
6 |
5 |
3 |
— |
— |
— |
— |
— ||
8 |
5 |
3 |
2 |
1 |
— |
— |
— |
— |

9th |
4 |
3 |
3 |
6 | ||
6 |
6 |
6 |
6 |
4 |
— |
— |
— |
— |
— ||
8 |
5 |
4 |
3 |
2 |
— |
— |
— |
— |

10th |
5 |
3 |
3 |
7 | ||
6 |
6 |
6 |
6 |
5 |
3 |
— |
— |
— |
— ||
9 |
5 |
4 |
3 |
2 |
1 |
— |
— |
— |

11th |
5 |
3 |
3 |
7 | ||
6 |
6 |
6 |
6 |
6 |
4 |
— |
— |
— |
— ||
9 |
5 |
5 |
4 |
3 |
2 |
— |
— |
— |

12th |
6 |
4 |
4 |
8 | ||
6 |
6 |
6 |
6 |
6 |
5 |
3 |
— |
— |
— ||
9 |
5 |
5 |
4 |
3 |
2 |
1 |
— |
— |

13th |
6 |
4 |
4 |
8 | ||
6 |
6 |
6 |
6 |
6 |
6 |
4 |
— |
— |
— ||
9 |
5 |
5 |
4 |
4 |
3 |
2 |
— |
— |

14th |
7 |
4 |
4 |
9 | ||
6 |
6 |
6 |
6 |
6 |
6 |
5 |
3 |
— |
— ||
9 |
5 |
5 |
4 |
4 |
3 |
2 |
1 |
— |

15th |
7 |
5 |
5 |
9 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
4 |
— |
— ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
2 |
— |

16th |
8 |
5 |
5 |
10 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
5 |
3 |
— ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
2 |
1 |

17th |
8 |
5 |
5 |
10 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
4 |
— ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
3 |
2 |

18th |
9 |
6 |
6 |
11 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
5 |
3 ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
3 |
2 |
1

19th |
9 |
6 |
6 |
11 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
4 ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
3 |
3 |
2

20th |
10 |
6 |
6 |
12 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
3 |
3 |
3 [/table]

Non Parsed Version for scooping:

Level |
BAB |
Fort |
Ref |
Will |Special ||
0 |
1st |
2nd |
3rd |
4th |
5th|
6th |
7th |
8th |
9th||
0 |
1st |
2nd |
3rd |
4th |
5th |
6th |
7th |
8th |
9th

1st |
0 |
0 |
0 |
2 | Summon Familiar ||
5 |
3 |
- |
- |
- |
- |
- |
- |
- |
- ||
4 |
2 |
- |
- |
- |
- |
- |
- |
- |
-

2nd |
1 |
0 |
0 |
3 | ||
6 |
4 |
— |
— |
— |
— |
— |
— |
— |
— ||
5 |
2 |
— |
— |
— |
— |
— |
— |
— |

3rd |
1 |
1 |
1 |
3 | ||
6 |
5 |
— |
— |
— |
— |
— |
— |
— |
— ||
5 |
3 |
— |
— |
— |
— |
— |
— |
— |

4th |
2 |
1 |
1 |
4 | ||
6 |
6 |
3 |
— |
— |
— |
— |
— |
— |
— ||
6 |
3 |
1 |
— |
— |
— |
— |
— |
— |

5th |
2 |
1 |
1 |
4 | ||
6 |
6 |
4 |
— |
— |
— |
— |
— |
— |
— ||
6 |
4 |
2 |
— |
— |
— |
— |
— |
— |

6th |
3 |
2 |
2 |
5 | ||
6 |
6 |
5 |
3 |
— |
— |
— |
— |
— |
— ||
7 |
4 |
2 |
1 |
— |
— |
— |
— |
— |

7th |
3 |
2 |
2 |
5 | ||
6 |
6 |
6 |
4 |
— |
— |
— |
— |
— |
— ||
7 |
5 |
3 |
2 |
— |
— |
— |
— |
— |

8th |
4 |
2 |
2 |
6 | ||
6 |
6 |
6 |
5 |
3 |
— |
— |
— |
— |
— ||
8 |
5 |
3 |
2 |
1 |
— |
— |
— |
— |

9th |
4 |
3 |
3 |
6 | ||
6 |
6 |
6 |
6 |
4 |
— |
— |
— |
— |
— ||
8 |
5 |
4 |
3 |
2 |
— |
— |
— |
— |

10th |
5 |
3 |
3 |
7 | ||
6 |
6 |
6 |
6 |
5 |
3 |
— |
— |
— |
— ||
9 |
5 |
4 |
3 |
2 |
1 |
— |
— |
— |

11th |
5 |
3 |
3 |
7 | ||
6 |
6 |
6 |
6 |
6 |
4 |
— |
— |
— |
— ||
9 |
5 |
5 |
4 |
3 |
2 |
— |
— |
— |

12th |
6 |
4 |
4 |
8 | ||
6 |
6 |
6 |
6 |
6 |
5 |
3 |
— |
— |
— ||
9 |
5 |
5 |
4 |
3 |
2 |
1 |
— |
— |

13th |
6 |
4 |
4 |
8 | ||
6 |
6 |
6 |
6 |
6 |
6 |
4 |
— |
— |
— ||
9 |
5 |
5 |
4 |
4 |
3 |
2 |
— |
— |

14th |
7 |
4 |
4 |
9 | ||
6 |
6 |
6 |
6 |
6 |
6 |
5 |
3 |
— |
— ||
9 |
5 |
5 |
4 |
4 |
3 |
2 |
1 |
— |

15th |
7 |
5 |
5 |
9 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
4 |
— |
— ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
2 |
— |

16th |
8 |
5 |
5 |
10 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
5 |
3 |
— ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
2 |
1 |

17th |
8 |
5 |
5 |
10 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
4 |
— ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
3 |
2 |

18th |
9 |
6 |
6 |
11 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
5 |
3 ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
3 |
2 |
1

19th |
9 |
6 |
6 |
11 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
4 ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
3 |
3 |
2

20th |
10 |
6 |
6 |
12 | ||
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 |
6 ||
9 |
5 |
5 |
4 |
4 |
4 |
3 |
3 |
3 |
3 [/table]

Macro:

Dim C As Long
Dim i As Long
C = ActiveSheet.UsedRange.Columns.Count
For i = C To 2 Step -1
Columns(i).Insert
Next
End Sub

This is a macro made by my friend Tim Johnson of Liverpool John Moores University IT department that inserts extra column into your sheet. Cuts a whole bunch of trouble out.

Go to Tools > Macro > Macros, which opens the dialogue box

tap something random into the bar so that the [Create] button highlights and then click on that, which opens the VisualBasic editor.

Highlight all the text, then copy the above macro and paste it over the top of the stuff in the VisualBasic Editor. Then click save workbook, close the editor and then go:

Tools > Macro > Macros again, click on the macro AddColumn and click run.

Voila! Now you can just paste the code in where it needs to go.

[I]Right, hope that was helpful. I don't claim to be an expert, but I'm willing to answer any questions anyone has to the best of my ability...

NineThePuma
2011-08-16, 03:52 PM
I'd like to nominate this for a pin.

zagan
2011-08-16, 04:12 PM
Excellent work. It's well explained and will probably be very useful.
One question why the extra empty column betwen features, spell day and spell know ?

NeoSeraphi
2011-08-16, 04:13 PM
I'd like to nominate this for a pin.

Seconded. This is some high class tutorial work, and the bit about Excel was especially helpful.

Mulletmanalive
2011-08-16, 05:22 PM
I'd like to nominate this for a pin.

Go for it

Excellent work. It's well explained and will probably be very useful.
One question why the extra empty column betwen features, spell day and spell know ?

Thanks.

The extra line is simply because normal presentation tables would have a thicher line to break up the sections and aid reading but last i checked such was impossible.

Seconded. This is some high class tutorial work, and the bit about Excel was especially helpful.

Thank you. I did my best and thought that it was definitely worth saving folks the trial and error that got me to that method in Excel

Epsilon Rose
2011-08-17, 02:14 AM
Out of curiosity, do you know of a way to make the column for 0th level spells the same size as all of the other columns without actually appending the th? It's probably one of the ugliest parts of these tables... well, atleast, the way the borders are so close to the numbers bugs me...

zagan
2011-08-17, 03:59 AM
Out of curiosity, do you know of a way to make the column for 0th level spells the same size as all of the other columns without actually appending the th? It's probably one of the ugliest parts of these tables... well, atleast, the way the borders are so close to the numbers bugs me...

For that I can help. You write it like that -0- but you put the two - in white with a code like that:

-0-

And that give you this result.