DECdocument
Producing Online and
Printed Documentation


Previous Contents Index

3.1.3 Coding a Table with a Key

Use a table key, or legend, to explain abbreviations used in a table. Table keys are not intended to replace footnotes. Use a table key as you use a map legend: to guide a reader through the information presented. You can only use one table key per table.

Place the <TABLE_KEY> tag directly after the <TABLE_SETUP> tag. Enter text between the <TABLE_KEY> and <ENDTABLE_KEY> tags. The text entered must use only <P>, <LIST>, or <EMPHASIS> tags.

Use the <TABLE_KEYREF> tag to control where the table key will be printed. (For a book that will be displayed by Bookreader, the key will always appear at the end of the table.) Place the <TABLE_KEYREF> tag anywhere in the argument to the <TABLE_HEADS> tag to force the key to print on the bottom of a one-page table or the bottom of each page of a multipage table. Place the <TABLE_KEYREF> tag anywhere in the argument to the <TABLE_ROW> tag to force the key to print at the bottom of the page where that table row appears.

The following table contains a table key that defines the symbols used in the column titled "Evaluation."

Example


 
    <TABLE>(Food Combining Recipes\recipes_tab) 
    <TABLE_SETUP>(3\15\15) 
    <TABLE_KEY> 
    <list>(simple) 
    <le>AF is a food from the Acid Fruit Group. 
    <le>LSV is a food from the Low Starch Vegetable Group. 
    <le>P is a food from the Protein Group. 
    <le>SAF is a food from the Sub-Acid Fruit Group. 
    <le>SV is a food from the Starch Vegetable Group. 
    <le>SF is a food from the Sweet Fruit Group. 
    <endlist> 
    <ENDTABLE_KEY> 
    <TABLE_HEADS>(Recipe Name\Description\Evaluation) 
    <TABLE_ROW>(<TABLE_KEYREF>Zucchini Soup\Chilled summer soup 
    made from buttermilk and zucchini.\P, LSV) 
    <TABLE_ROW>(Old-Fashioned Potato Soup\Hearty potato soup 
    with spinach, celery, and onion.\LSV and SV) 
    <TABLE_ROW>(Savory Stuffed Peppers\Green peppers stuffed with a 
    corn, tomato, and bean filling, flavored with cumin and 
    dill.\P, LSV, and SV) 
    <TABLE_ROW>(Oriental Specialty\Stir fried vegetables with 
    tofu.\P and LSV) 
    <TABLE_ROW>(Pineapple Cherry Beverage\Pureed frozen drink 
    using fresh pineapples and fresh cherries.\AF and SAF) 
    <TABLE_ROW>(Date Bread\Date quick bread sweetened with 
    pears.\SF and SAF) 
    <ENDTABLE> 
 

Output

Table n--n Food Combining Recipes
Recipe Name Description Evaluation
Zucchini Soup Chilled summer soup made from buttermilk and zucchini. P, LSV
Old-Fashioned Potato Soup Hearty potato soup with spinach, celery, and onion. LSV and SV
Savory Stuffed Peppers Green peppers stuffed with a corn, tomato, and bean filling, flavored with cumin and dill. P, LSV, and SV
Oriental Specialty Stir-fried vegetables with tofu. P and LSV
Pineapple-Cherry Beverage Pureed frozen drink using fresh pineapples and fresh cherries. AF and SAF
Date Bread Date quick bread sweetened with pears. SF and SAF



3.1.4 Setting up Nested Tables

A nested table is a table embedded within another table. A nested table begins with its own <TABLE> tag. Like an informal <TABLE> tag, it has no argument. You can use all other <TABLE> tags in a nested table as you would in any table.

Use nested tables carefully. A table should clarify relationships among items, and nested tables add a second dimension of relationships for readers to assimilate, which sometimes causes confusion. You also risk creating a table with so many layers and tags that source file errors may be more difficult to locate.

A nested table differs from a table unit in the following ways:

In the following example, the outermost table tag has two arguments. The embedded <TABLE> tags have no arguments. Tags for the table setup, the table body, and the table terminator require the same arguments for nested tables as they do for informal tables.

Example


 
    <TABLE>(Food Combining Workshop\schedule_tab) 
    <TABLE_SETUP>(2\10) 
    <TABLE_HEADS>(Day\Schedule ) 
    <TABLE_ROW>(Monday\<TABLE> 
                       <TABLE_SETUP>(2\8) 
                       <TABLE_ROW>(Morning\Review Workshop Objectives) 
                       <TABLE_ROW>(Afternoon\Study Protein Groups) 
                       <TABLE_ROW>(Evening\Study Minerals) 
                       <ENDTABLE>) 
    <TABLE_ROW>(Tuesday\<TABLE> 
                       <TABLE_SETUP>(2\8) 
                       <TABLE_ROW>(Morning\Study Fruit Groups) 
                       <TABLE_ROW>(Afternoon\Study Vegetable Groups) 
                       <TABLE_ROW>(Evening\Combining Food Groups) 
                       <ENDTABLE>) 
    <TABLE_ROW>(Wednesday\<TABLE> 
                       <TABLE_SETUP>(2\8) 
                       <TABLE_ROW>(Morning\Poultry and Fish Diets) 
                       <TABLE_ROW>(Afternoon\Special Diets) 
                       <TABLE_ROW>(Evening\Closing Remarks) 
                       <ENDTABLE>) 
    <ENDTABLE> 
 

Output

Table n--n: Food Combining Workshop
Day Schedule
Monday
Morning Review Workshop Objectives
Afternoon Study Protein Groups
Evening Study Minerals
Tuesday
Morning Study Fruit Groups
Afternoon Study Vegetable Groups
Evening Combining Food Groups
Wednesday
Morning Poultry and Fish Diets
Afternoon Special Diets
Evening Closing Remarks

3.1.5 Controlling Table Attributes

You can control the following table attributes:

3.1.5.1 Controlling the Width and Size of Table Text

The width of a table is determined by the following default attributes:

For example, you could code the following table without arguments to the <TABLE> tag and place it in the context of a list, as follows:

Example


 
    <list>(Unnumbered) 
    <le>These are the heart rates. 
 
    <table> 
    <table_attributes>(keep) 
    <table_setup>(3\16\9) 
    <table_heads>(Common Name\Weight\Heart Rate <line>Beats per Minute) 
    <table_row>(European hedgehog\500-700\246)                            
    <table_row>(Gray shrew\3-4 g.\782) 
    <table_row>(Least chipmunk\40 g.\684) 
    <table_row>(Harbor porpoise\170 kg.\40-110) 
    <table_row>(Mink\0.7-1.4 kg\272) 
    <table_row>(Harbor seal\20-25 kg.\18-25) 
    <endtable> 
    <endlist> 
 

Output

If you specify table width values that extend the table beyond the right margin of text, the text formatter attempts to reduce the size of the text so the table will fit between the margins. If the table still does not fit, warning messages alert you that you must modify your table. In many cases, you can reduce the widths of the individual columns in the <TABLE_SETUP> tag to fit the table in the image area.

If you want to use the full page width for a table and override the default left margin, use the argument WIDE in the <TABLE_ATTRIBUTES> tag. Here is the same table coded with <TABLE_ATTRIBUTES>(WIDE).

Example
Common Name Weight Heart Rate
Beats per Minute
European hedgehog 500-700 246
Gray shrew 3-4 g. 782
Least chipmunk 40 g. 684
Harbor porpoise 170 kg. 40-110
Mink 0.7-1.4 kg 272
Harbor seal 20-25 kg. 18-25

You can use the argument WIDE to avoid having the text formatter switch to a smaller text size. To manually reduce the text to a smaller point size, specify <TABLE_ATTRIBUTES>(MAXIMUM).

If you specify the <TABLE_ATTRIBUTES> tag, it must precede the <TABLE_SETUP> tag in your SDML file.

3.1.5.2 Controlling Page Breaks in Tables

By default, when the text of a table does not fit on a single page, DECdocument breaks the table across pages.

When a table is continued across several pages, the text formatter repeats the following text at the top of the second page and each subsequent page of output:

If you want to keep a short table from breaking across pages, you can specify <TABLE_ATTRIBUTES>(KEEP). In this case, the text formatter determines whether the table fits on the current page. If the table does not fit, the text formatter starts a new page of output, leaving the page preceding the table with blank space at the bottom. If the table is too long to fit on one page, you receive warning messages, and the part of the table that did not fit on the page will not print in the output.

You can control the page breaks in multipage tables in several ways:

In some cases, you may also need to provide special information to the text formatter to help in breaking complex tables.

Table 3-2 summarizes the rules used by the text formatter for breaking tables. Review these rules if you are having difficulty getting a table to format correctly. Generally, the more places you indicate acceptable page breaks in a table, the better the text formatter can select the best page breaks and not cause many short, uneven pages.

Table 3-2 Text Formatter Rules for Breaking Tables
SDML Tag Description
<TABLE_ATTRIBUTES>(CONTROLLED) Use this tag in a table along with the <TABLE_ROW_BREAK>(FIRST) and <TABLE_ROW_BREAK>(LAST) tags to control page breaks manually. The tag is not required when breaking pages manually within a table unit. (See Section 3.1.2.)
<TABLE_ROW_BREAK>(FIRST) Specifies the first point, or beginning range, where a page break is acceptable within a table. The tag must be used along with the <TABLE_ATTRIBUTES>(CONTROLLED) tag.
<TABLE_ROW_BREAK>(LAST) Specifies the last place, or ending range, where a page break is acceptable within a table. The tag must be used along with the <TABLE_ATTRIBUTES>(CONTROLLED) tag.
The text formatter assumes that it can break the table between any two table rows that are between the <TABLE_ROW_BREAK>(FIRST) and <TABLE_ROW_BREAK>(LAST) tags. It assumes that all text before <TABLE_ROW_BREAK>(FIRST) and after <TABLE_ROW_BREAK>(LAST) must be on the same page; if that text is more than a page, the text formatter chooses a place to break the table.
If you do not specify these tags, the text formatter tries to keep the table on one page. If the table does not fit, it breaks the table, fitting as much as it can on each page.
By default, page breaks must not occur within the bounds of <TABLE_UNIT> and <ENDTABLE_UNIT> tags. The text formatter tries to keep all the rows in a table unit on the same page. If the table unit does not fit on the page, it breaks the table, fitting as much as it can on each page. Within the bounds of a table unit, you can specify <TABLE_ROW_BREAK>(FIRST) and <TABLE_ROW_BREAK>(LAST) tags to indicate the best first and last places for page breaks.
If a table has footnotes, the text formatter does all the page breaking. The <TABLE_ROW_BREAK> tags are ignored.
<VALID_TABLE_ROW_BREAK> Identifies legal page breaks in the middle of a table row. This argument is required within long table rows. By default, the text formatter never breaks a table in the middle of a table row. If you want to allow page breaks within a table row, use this tag within the column of the table row. Place this tag immediately before a <P>, <LIST>, or <LE> tag, where some vertical space already exists.
<NESTED_TABLE_BREAK> The text formatter never breaks a nested table, by default. Use this tag to allow a page break within a nested table. Place this tag just before <P> or <LE> tags, where some vertical space already exists.
<SET_TABLE_ROW_BREAK_DEFAULT> Use this tag to provide a default number of rows that must be on the first page of the table. For example, if you specify <SET_TABLE_ROW_BREAK_DEFAULT>(3), any subsequent table will not be broken until after the third row.
<PAGE>
<FINAL_CLEANUP>(PAGE_BREAK)
You can use these tags in tables to control paging explicitly. If you use these tags in a table to force a page break, however, the table headings are not repeated on the page after the break. You must repeat the <TABLE_HEADS> tag immediately after the <PAGE> tag to restore the default table headings. Headings are repeated on each page of a table only when DECdocument is allowed to break the table across pages.

3.1.6 Additional Table Tags

Table 3-3 lists and describes additional tags used with tables. You can find an example of each tag in Using Global Tags.

Table 3-3 Additional Table Tags
Tag Description
<ALIGN_CHAR> Specifies a special character that is replaced by a space wherever it appears in a table row. You can use this tag to align numbers in a column.
<ALIGN_NUMBER> Specifies how a number will be aligned in relation to a decimal point, and with other numbers in the same table column.
<NESTED_TABLE_BREAK> Marks a place that a nested table may be broken across pages.
<SPAN> Causes a heading to span more than one table column.
<RULE> Specifies that a horizontal rule appears in a table. Specify the <RULE> tag in <TABLE_ROW>, <TABLE_HEADS>, or <TABLE_UNIT_HEADS> tags.
<TABLE_FILE> Includes a separate file that contains a table.

Note

¹ The continued caption's placement and the continuation text may vary from one doctype to another.

3.2 Figures

Use figures in your document whenever you want to illustrate a concept. Whereas tables present long portions of text in a tabular fashion, figures allow readers to visualize what they are reading.

DECdocument provides a <FIGURE> tag to indicate placement of an illustration: a graphic file, a hand-drawn illustration that you need to paste into your output, or anything else you want to express in a diagram.

Along with the <FIGURE> tag, use a set of required tags to identify the figure, establish the figure's attributes, and marks the end of the figure. You can use a separate set of figure tags to identify whether the figure is line art, is an icon, is located in a different file that you want to include, or consists of blank space that you want to insert so that a figure can be physically pasted in later.

Table 3-4 summarizes the tags available for use in figures. You can find an example of each tag in Using Global Tags.

Table 3-4 Figure Tags
Tag Description
<FIGURE> Begins a figure. For a formal figure, supply a caption argument and a symbol name.
<CODE_EXAMPLE> Marks a section of text that illustrates programming code. DECdocument displays this text in a monospaced format.
<ENDCODE_EXAMPLE> Ends a section of text that illustrates programming code.
<FIGURE_ATTRIBUTES> Specifies the placement of a figure on the page. Also specifies whether a figure will extend across several pages.
<FIGURE_FILE> Includes a figure contained in a separate file and an amount of white space (approximately one pica) before and after the included figure. Note that the exact amount of space is doctype-specific.
<FIGURE_SPACE> Leaves a user-specified amount of space for a figure to be pasted in later.
<INTERACTIVE> Marks a system-user dialogue as a figure.
<ENDINTERACTIVE> Ends the system-user dialog.
<LINE_ART> Identifies, as line art, a rough sketch produced at the keyboard for draft output.
<ENDLINE_ART> Ends the line art.
<SAMPLE_TEXT> Distinguishes an illustration of sample text from the surrounding text.
<ENDSAMPLE_TEXT> Terminates the <SAMPLE_TEXT> tag.
<VALID_BREAK> Indicates an acceptable page-breaking point. Used in the context of <CODE_EXAMPLE> or <INTERACTIVE>.
<ENDFIGURE> Ends a figure.


Previous Next Contents Index