Formatting a table

Choosing table spacing and alignment

You can specify how the table is aligned on the page and what space to leave around the table.

Right-click anywhere in the table and select Table from the pop-up menu or select Table > Table Properties from the menu bar. On the Table Format dialog, select the Table tab.

((Insert figure.))

On this page, you can:

  • Set a name for the table. This has no effect on the display but makes the table easier to find when using the Navigator. This can be very useful if your document has a number of tables. A table name cannot have any spaces. To make a meaningful name, you could use underscores or hyphens (for example, Table-1_Doll_House_Inventory).
  • Set the overall width of the table, either absolute or relative to the page width. This option is available only if the Alignment is not set to Automatic. (See below.)
  • Specify how the table is aligned if it does not fill the width of the page (between the margins). Under Alignment:
    • Left aligns the table with the left margin.
    • Right aligns the table with the right margin.
    • From Left lets you specify under Spacing exactly how far from the left margin the table is placed.
    • Center aligns the table in the middle between the left and right margins. If the table width is less than the space between the margins, the excess is evenly distributed on both sides of the table. If the table width is greater, the table will extend outside of the margins.
    • Manual lets you specify the distances from both left and right margins under Spacing.
  • Under Spacing: Above and Below, specify the distances to leave above and below the table.

Specifying text flow

On the Text Flow page of the Table Format dialog, you can:

  • Insert a page or column break either before or after the table. Use the Text Flow: Break checkbox, combined with the Page or Column and the Before or After buttons.
  • If you insert a page break before the table (that is, start the table on a new page), you can also change the page style that will go with it by checking the With Page Style box and selecting a new page style. As with any page break, you can also reset the page numbers using the Page number box.

  • Keep a table on one page by deselecting the Allow table to split across pages and columns checkbox. If this item is deselected, the next item is not active.
  • Keep each row on one page by deselecting the Allow row to break across pages and columns checkbox.
  • Use the Repeat heading checkbox and the numbers box to select the number of table heading rows that will be repeated on each page. A complicated table may need two or three heading rows to be easily read and understood.
  • Use the Text direction list to select the direction for the text in the cells. The most common setting is Left to right for Western languages. Note: The phrase Use superordinate object settings means “use the formatting settings from the paragraph before the table”.
  • Select the vertical alignment of the text in the table or the selected cells; the choices are to align with the top of the cell, the center of the cell, or the bottom of the cell. This alignment is in addition to the Left-Right alignment options available under Table > Table Properties > Table or by right-clicking and choosing Table > Table.

((Insert figure.))

Note: A Table Heading row can not span two pages, but any other row can. A one-row table (often used for page layout purposes), if set up with the default of including a heading, will not break across pages. The cure is to make sure the table is defined without a heading row.

Specifying table borders

On the Table Format dialog, select the Borders tab.

((Insert figure.))

Here you can set borders for a whole table or groups of cells within a table. In addition, a shadow can be set for the whole table.

Borders have three components: where they go, what they look like, and how big a space is left around them.

  • Line arrangement specifies where the borders go. If a group of cells is selected, the border will be applied only to those cells. You can specify no border or any combination of border for the outside edges and the cell divisions—either by selecting a default arrangement or by clicking on the lines in the User-defined area to get exactly what you want.
  • Line specifies what the border looks like: the style and color. There are a number of different styles and colors to choose from.
  • Spacing to contents specifies how much space to leave between the border and the cell contents. Spaces can be specified to the left, right, above, and below. Check Synchronize to have the same spacing all the way round.

Shadows always apply to the whole table. A shadow has three components: where it is, how thick it is, and what color it is. Set each of these under Shadow style on the dialog.

If Merge adjacent line styles is checked, two cells sharing a common border will have their borders merged, rather than being side by side.

Tip: To reset everything if you are having problems with borders, right-click in the table and select Table > Borders or select Table > Table Properties > Borders and then select the Set no borders icon under Line arrangement: Default (the box on the left).

Selecting background colors and graphics

The background of a table, a cell, or a group of cells can be set to a color or a background graphic. If you select an image, you can position it in the cell (or group of cells), stretch it to fill the space, or tile the image across the cells. You can set the background for the whole table in the same way.

To set the background for a cell, row, or table:

  1. Select the cells you wish to work with. If you are changing the background for a row or table, just place the cursor anywhere inside the row or table to be changed.
  2. Right-click and select Table from the pop-up menu, or select Table > Table Properties from the main menu.
  3. In the Table Format dialog, select the Background tab.
  4. In the For section, chose whether to apply the settings to cell, row, or table. If you choose Cell, any changes apply to all the selected cells.
  5. In the As section, choose whether the background is a color or a graphic.
  6. To apply a color, select the color and click OK.
  7. To apply a graphic, first select the graphic to use. This must be a graphic file accessible from your computer. (Writer supports a large number of graphics formats.)
    • You have the option with the Link checkbox to link the graphic file. If it is linked, changes to the graphic (for example, if you edit it in a different package) will be reflected in your document. However, you also need to keep the linked graphic file with the document file. If, for example, you email the document without the graphic file, the graphic will no longer be visible.
    • Under Type, select the type of placement for the graphic. If you choose Position, you can select where to position the graphic within the cells, row, or table. If you choose Area, the graphic is stretched to fill the whole area. If Tile, the graphic is tiled (repeated horizontally and vertically) to fill the area.
    • If the Preview checkbox is checked, the graphic displays in the pane above the checkbox.
      To apply the graphic, click OK.

The figure shows an example of a background for a cell using an unlinked graphic which can be viewed in the Preview pane.

((Insert figure.))

AutoFormatting tables

You can use AutoFormat to make your table formats consistent. You can also create and add your own table autoformats. Here is how:

  1. Create a table and manually format it as you wish, including borders, spacing of text from the top and bottom borders, fonts to be used in the table heading and data cells, and background colors.
  2. Note: To use background colors in a new format, color the cells rather than the table. That is, select the cell or cells you wish to color, select Table > Table Properties > Background (or right-click and choose Table > Background), choose a color, and specify As: Color, For: Cell.

  3. Position the cursor anywhere in the table and then click Table > AutoFormat.
  4. On the AutoFormat dialog, click Add, give the table format a name in the AddAutoFormat dialog, and click OK.
  5. The newly named autoformat now appears as an available format. Click OK to close the AutoFormat dialog.

Tip: This technique does not include table and column widths in the table format. To insert a table with predefined full formatting, save it as AutoText.

((Insert figure.))

<< Previous section | Next section >>


This book is licensed under the terms of the Creative Commons Attribution License, version 3.0.

Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkedin

Categories

Archives