# Tables

&kword; has the built in ability to generate simple tables.

!!!!Need to add more here -- Table formatting not implemented well!!!

If you need more complicated functionality or you want more control over the look of your table, you can Embed a &kspread; Table in your document.

This section of the document will cover the formatting of tables created in &kword;

## Adding a new Table

You can create a table in KWord in one of three ways:

- Select Tools Create Table from the Menu bar

- You can use the keyboard shortcut: F9

- or by clicking on the tool-bar.

This will open a dialog box.

This dialog box is divided into two halves.

The right half of the dialog box provides you a quick visual guide to how many rows and columns will be created in the table. This is useful for counting out your table. You can not edit your table layout here.

The left half of the dialog box consists of two drop down boxes, and two number selection boxes.

The number selection box labeled Number of Rows, allows you to specify from 1 to 128 rows in the table.

The number selection box labeled Number of Columns, allows you to specify from 1 to 128 columns in the table.

While adjusting either of these two options, the preview box adjusts to your new settings.

The drop down box labeled Cell Height, can be set to either of two options.

Automatic

  If this option is selected, &kword; will set the cell height of each cell in the new table to a size appropriate based on the size of the current text. &kword; will not automatically provide additional space in each cell, because you draw a table larger (or smaller) than necessary.

  As an example, if you create a table with three rows, it does not matter if you draw the table as 1 inch tall, or 4 inches tall, the height of each cell will be based on the current text size.

Manual

  When selected, calculate the cell height by dividing the user specified size of the table by the number of rows.

  If this is selected, and you create a table with 3 rows and draw the table 3 inches tall, each cell will be 1 inch in height. If you draw the table 1.5 inches tall, each cell will be 0.5 inches tall.

The drop down box labeled Cell Widths, can be set to either of two options.

Automatic

  If this option is selected, &kword; will determine the width of each cell, by dividing the total width of the frame by the number of columns. It is unaffected by the table size you have drawn on the document.

Manual

  When selected, &kword; determines the width of each cell, by dividing the width of the table you draw by the number of columns selected.

  As an example, if you create a table with 3 columns, and draw it 3 inches wide, each cell will be 1 inch in width. If, however, you draw the same table 6 inches wide, each cell will be 2 inches wide.

To change the properties of the table, click on the tab labeled Properties.

!!!Not implemented yet!!!

## Deleting a Table

To delete a table in &kword;:

1. Place the text cursor within any cell of the table you want to delete.

   Be sure you have selected the correct table before continuing. &kword; will not ask for confirmation.

2. Select Table Delete Table from the Menu bar

The table will be immediately deleted.

## Insert Row in Table

You can insert a row into any place in a table.

To insert a row into a table:

1. Place the text cursor within any cell of the table you want to add a row to.

2. Select either:

   - Table Insert Row from the Menu bar

   - or by clicking on the tool-bar.

   This will bring up a dialog box.

3. The number selection box labeled Row, allows you to select any row within the table. This number selection box limits you to the rows currently in the table.

   Select the row you want to use as a reference.

4. Now select either Before or After" as is appropriate.

5. Click OK to add the row or click Cancel to not add any rows.

## Insert Column in Table

To insert a column into a table:

1. Place the text cursor within any cell of the table you want to add a row to.

2. Select either:

   - Table Insert Column from the Menu bar

   - or by clicking on the tool-bar.

   This will bring up a dialog box.

3. The number selection box labeled Column, allows you to select any column within the table. This number selection box limits you to the columns currently in the table.

   Select the column you want to use as a reference.

4. Now select either Before or After as is appropriate.

5. Click OK to add the column or click Cancel to not add any columns.

## Delete Row in Table

To delete a row from a table:

1. Place the text cursor within any cell of the table you want to delete the row from.

2. Select either:

   - Table Delete row from the Menu bar

   - or by clicking on the tool-bar.

   This will bring up a dialog box.

3. Select the row you want to delete in the number selection dialog.

   Make sure you have selected the correct row before continuing.

   &kword; will not ask for verification before deleting the row.

4. Click OK to delete the row, or click Cancel to not delete any rows.

## Delete Column in Table

To delete a column from a table:

1. Place the text cursor within any cell of the table you want to delete the column from.

2. Select either:

   - Table Delete Column from the Menu bar

   - or by clicking on the tool-bar.

   This will bring up a dialog box.

3. Select the column you want to delete in the number selection dialog.

   Make sure you have selected the correct column before continuing.

   &kword; will not ask for verification before deleting the column

4. Click OK to delete the column, or click Cancel to not delete any column.

## Join Cells in Table

A table is traditionally made of a grid of rows and columns, with equal sized cells throughout the table.

Sometimes you would like to spread text out over several cells in a table. This is especially common with titles.

&kword; allows you to do this by Joining two (or more) adjacent cells of a table together.

This is an example of three cells joined together in the middle of a table.

You can join cells vertically, as well as horizontally.

To join several cells:

1. You must be in Frame Edit Mode. To change to Frame Edit Mode, you can:

   - Select Tools Edit Frames from the Menu bar

   - You can use the keyboard shortcut: F5

   - or by clicking on the tool-bar.

2. Now select one of the two (or more) cells you want to join into one. You can do this by clicking once in the cell with the left mouse button.

3. Select another cell you want joined", by holding down the &Ctrl; key and clicking with the left mouse button.

   Continue to select additional cells, until you have selected all the cells necessary.

   If you have a number of cells in a row that you want to select, you can select them in two quick steps:

   First click on one of the end cells.

   Now hold down the &Shift; key and click on the cell at the other end of the row or column you want to join.

   All cells between these two cells will be selected.

4. Select Table Join Cells from the Menu bar

The cells will now be joined.

Any text in the right most frame will now be located in the joined frame. Any text from any other frames will be hidden from view.

## Split Cells in Table

Joining several cells together into one larger cell, is not a one way action.

If you decide that you do not want the previously joined cells to be joined any longer, you can "split" them back into individual cells again.

To split previously joined cells: you must be in Frame Edit Mode.

1. You must be in Frame Edit Mode. To change to Frame Edit Mode, you can:

   - Select Tools Edit Frames from the Menu bar

   - You can use the keyboard shortcut: F5

   - or by clicking on the tool-bar.

2. Select the cell you want to split by clicking on it with the left mouse button.

3. Select Table Split Cells from the Menu bar

The cells will be restored to their previous state. Any text in the original cell will be relocated to the rightmost cell.

## Ungroup a Table

!!!Causes a crash at this point!!!

## Format a Table

!!!Not implemented!!!

# Headers/Footers

With multi-page documents, you might want to provide certain information at the tops or bottoms of each page throughout the document. They can provide the reader with important information and they tie your documents together.

Fortunately, headers and footers are really just a special type of frame. You can edit the text and data within the headers and footers

You can toggle headers and footers independently at any time.

If you are using a Word processing template, the footers will be added below the margins you set under page setup. The text within the main frames will be moved so the headers and/or footers do not overlap any text.

If you are using a DTP template, the headers/footers will be placed at the margin edges, just like in the word processing templates, but these frames are treated just like any other frame. If the text frame below the Header/footer frame is set to wrap around text in overlapping frames, that will cause the text to move.

You can toggle the headers by selecting View Headers. from the Menu bar.

You can toggle the footers by selecting View Footers. from the Menu bar.

# Creating Templates/Saving a document as a template

&kword; comes with several pre-defined templates (both Word processing and DTP templates), which are designed to get you started on your documents.

If, however, you often use the same format for a document over and over, you may want to create a template which exactly matches your needs.

You can create an unlimited number of templates in &kword;, and you can organize them into categories for easy recall.

You create these templates by first generating the layout in &kword; based on one of the pre-defined templates, and then you save the file. Instead of saving it as a traditional file, you save it as a template.

What follows, is a step by step process to save the current document as a template.

1. When the document is like you want, Select Extra Create Template From Document from the Menu bar.

   This brings up a dialog:

   This dialog helps you organize your templates into categories.

2. As you can see, your templates will be saved into a sub-directory in your home directory. You first need to create a Folder (which represents a sub-directory) within the `templates` directory.

   1. To create this folder:

      Place the mouse cursor over the line directory name (in this example: `/home/mmcbride/.kde/share/apps/kword/templates/`) and click with the right mouse button.

      This will bring up a sub-menu.

   2. Select Add Folder.

      This will add another dialog to the screen.

   3. Type in a name for the folder. The name should be descriptive of the types of templates you will be placing within it.

      Click Clear to ???Not implemented yet???.

      Click Cancel to abort creating a new folder.

      Click OK to create this folder.

      The dialog box will now show your new folder.

      You do not need to create a new folder for each template. The folders you create can be used to organize your templates.

      You must, however, have at least one folder. You can not save any templates into the templates sub-directory.

3. Select the newly created folder by clicking once on it with the left mouse button.

4. Type the name of your new template in the blank entitled Template Name.

5. You now need to select a graphic to represent your template in the open document window.

   ???Not implemented yet???

Once you have saved your template, the next time you open a document, you will see your new category/new template in the open file dialog.

This is an example of a new category named Newsletters, with a new template named Monthly.