Defining Custom Tables
You can define the elements that comprise a custom table in the document type's .dcf file. You can define multiple custom table models, specifying the elements that identify the table and rows, along with optional header rows, individual cells within a row, and row shading.
|
You can also designate elements to comprise a custom table in an Arbortext Styler stylesheet (.style). If you are using a .style file, the custom table settings in that file will override corresponding settings in the .dcf file.
|
To specify a custom table:
1. Open Arbortext Architect.
2. Choose > .
3. Locate the directory in which the document type is saved, and click Select.
4. Once the document type is loaded, choose > . If the document type has a .dcf file, it displays in the Arbortext ArchitectDCF Editor window. If there is no .dcf file associated with this document type, Arbortext Architect automatically creates one.
5. Locate the TableModelDefinitions element in the DCF Editor. If the file doesn't include a TableModelDefinitions element, add one.
|
Open the Document Type Viewer ( > ) to view the element hierarchy for the .dcf file. This will help you determine the valid location for the TableModelDefinitions element.
|
6. Place your cursor to the right of the TableModelDefinitions element, press Enter to get the Quick Tag menu, and select CustomTableModel. You can alternatively insert the CustomModelTable element using the Insert Markup dialog from the > menu.
7. Click on the Modify Attributes toolbar button to open the Modify Attributes dialog box.
|
You must have the Force Required Attributes EntryEdit preference selected for this dialog box to open automatically.
|
8. In the columnWidthDefault field, enter the default column width for any column in the table that does not have a specified width. This value is best suited for custom table models that do not have a fixed number of columns. The default is 1*, a proportional column width meaning that all default columns will have the same proportional width.
The following units of measure are allowed for this field:
◦ in — inches
◦ cm — centimeters
◦ mm — millimeters
◦ pc — picas
◦ pt — points
◦ px — pixels
◦ em — a measurement for fonts
◦ pi — a measurement for picture or symbol fonts
◦ * — used as a modifier for proportional column widths
For example, assume the following values are set for proportional column widths:
1* 1* 2*
In this case, the first and second column would each get 25% of the available column width, and the third column would get 50% of the available column width.
◦ % — used as a modifier to set a percentage of the remaining column width available
9. In the columnWidthsDefault field, enter the default column widths, separated by a space, for any number of columns. This setting is used for tables that either do not have a ColumnWidthsAttribute or the ColumnWidthsAttribute does not have a value. This value is best suited for custom table models that have a fixed number of columns. There is no default value.
You can use the same units of measure in this field as in the columnWidthDefault field. For example, assume the following values are entered in this field:
1in 1* 3*
In this case, the first column has a fixed value of one inch. If there are two columns, the second column gets all of the remaining column width. If there is a third column, then the second column gets 25% of the remaining column width, and the third column gets 75% of the remaining width.
10. In the fosiComposeUsingStylesheet field, set the value to yes if you want a FOSI stylesheet to control the style properties of the elements defined in the custom table. If you want the elements to be displayed as a custom table under the control of the Arbortext print composition, then set the value to no. When set to no, print output will be similar to the view of the table you see in the Editor window.
11. In the name field, enter a user-friendly name that defines the type or use of the table. This field is used to select a table model when inserting a new table.
12. In the rulesDefault field, enter the default table rules display for this table model. This setting is used for tables that either do not have a rulesAttribute or the rulesAttribute does not have a value. The default is all, meaning all outer frame and inner rules are displayed.
The following values are allowed for this field:
◦ all — All outer frame and inner rules are displayed.
◦ bottom — Only bottom frame rules are displayed.
◦ cols — Only vertical frame and inner rules are displayed.
◦ frame-only — Only frame rules are displayed.
◦ left — Only left frame rules are displayed.
◦ none — No rules are displayed.
◦ right — Only right frame rules are displayed.
◦ rows — Only horizontal frame and inner rules are displayed.
◦ sides — Only left and right frame rules are displayed.
◦ top — Only top frame rules are displayed.
◦ topbot — Only top and bottom frame rules are displayed.
13. Click OK. The next Modify Attributes dialog appears.
14. In the columnWidthsAttribute field, you can optionally enter the name of an attribute associated with your table element that can be used to specify the column widths for your table. This attribute can take the same values as the columnWidthsDefault field.
15. In the element field, you must identify the element that represents the table element in your document type. The phrase Element: Table appears in the lower left corner of the Modify Attributes dialog. Enter the element name in the element field.
16. In the rulesAttribute field, you can optionally enter the name of an attribute associated with your table element that can be used to specify the rules display for your table. This attribute can take the same values as the rulesDefault field.
17. Click OK.
18. In the next Modify Attributes dialog, you are asked to identify the element that represents the row element in your document type. The phrase Element: Row appears in the lower left corner of the Modify Attributes dialog. Enter the element name in the element field.
19. Click OK.
20. Choose > to save the changes you have made to the .dcf file.
To specify cells in a row of a custom table:
|
Specifying cells in a row is optional. If you choose to let the content model drive the entry of cells in the custom table, you do not need to specify any cell elements. However, if you want to restrict the cells in the table to specific elements in your content model, you can do that by specifying the cells in your row explicitly.
The cells you identify in the .dcf file for a row are the cells your custom table will display when you edit the table with the table editor. If elements required in the content model for the row are not identified as cells, you will not be able to edit them from the table editor; you will be able to edit them only from the document map.
|
1. Place your cursor to the right of the Row element, press Enter to get the Quick Tag menu, and select Cell. You can alternatively insert the Cell element using the Insert Markup dialog from the > menu.
2. Click on the the Modify Attributes toolbar button to open the Modify Attributes dialog box.
|
You must have the Force Required Attributes EntryEdit preference selected for this dialog box to open automatically.
|
3. In the next Modify Attributes dialog, you are asked to identify the element that represents a cell element in the row of your custom table; the phrase Element: Cell appears in the lower left corner of the Modify Attributes dialog. Enter the element name in the element field.
|
The element chosen as a cell must be defined in the content model of the element defined as the row.
|
4. Click OK.
5. If you want to specify additional cells in your custom table model, repeat the previous two steps.
6. Choose > to save the changes you have made to the .dcf file.
To specify color shading for rows in a custom table:
As part of your custom table definition, you can assign color shading to the rows in your table:
1. Place your cursor after the Row element, press Enter to get the Quick Tag menu, and select RowShading. You can alternatively insert the RowShading element using the Insert Markup dialog from the > menu.
2. Click on the Modify Attributes toolbar button to open the Modify Attributes dialog box.
|
You must have the Force Required Attributes EntryEdit preference selected for this dialog box to open automatically.
|
3. In the Modify Attributes dialog, you can define the following attributes:
◦ header — Determines whether header and footer row are included in the count of rows for which the color shading should be applied. The default is No. Enter Yes to include header and footer rows in the color shading.
◦ count — Determines the number of rows to which to apply the color. The minimum value is 1.
◦ backgroundColor — Determines the background color to be applied to all of the cells in the affected rows. The value can be either a named color or an RGB specification preceded by #.
4. Click OK.
5. If you want to establish a pattern of different colored rows in the table, then enter one or more additional RowShading elements, optionally designate a different count, and designate a different backgroundColor. If the pattern you specify covers less rows than the number of rows in the table, that pattern will repeat until all table rows are shaded.
For example, if you want the rows in your table to alternate between blue and green shading enter two RowShading elements. For the first element, set the count to 1 and backgroundColor to blue. For the second element, set the count to 1 and backgroundColor to green. In this case, all of the rows in your table will alternate between blue and green color shading.
6. Choose > to save the changes you have made to the .dcf file.