In WordPerfect, the content of an XML document is separated from its formatting using a collection of rules. WordPerfect XML Project Designer lets you create rules that specify the way elements in an XML document should display. The rules you create are saved in a WordPerfect template that you use with a WordPerfect XML document.
In this section, you'll learn about
working with page size definitions and layout
centering and spacing text
keeping text together
inserting horizontal lines
justifying text
creating subscript or superscript text
modifying font settings
indenting lines and paragraphs
adding tab stops
using bulleted lists
creating columns
numbering lines in documents
numbering pages
using counters
Working with page size definitions and layout
A page size definition determines how a printer formats and prints pages.
You can choose a page size definition and paper orientation. You can also set margins for a selected element defined in the DTD, and start an element on a new page.
By default, WordPerfect removes the white space, including tabs and spaces, where data PCDATA, RCDATA, and CDATA is not allowed in a document; however, you can choose to maintain the white space between selected elements.
To choose a page size definition
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Page Paper size.
5 In the Page setup dialog box, choose a paper size from the Page definition list box.
Notes
Page size definitions are matched to the default printer and may not be available from another printer; therefore, WordPerfect uses the best match from those available with the other printer. If the best match does not produce quality results, you must re-create the page size definition using the printer you want.
For information about selecting a default printer, see "Setting up a printer" in the WordPerfect Help.
To choose a paper orientation
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Page Paper size.
5 In the Page definition area, enable one of the following options:
Portrait
Landscape
To set margins for an element
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Format Margins.
5 In the Margins dialog box, type values in any of the following boxes:
Left
Right
Top
Bottom
To start an element on a new page
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Page New page.
To maintain the white space between selected elements
1 In WordPerfect XML Project Designer, open or create an XML project.
2 Click Edit Preserve white space.
3 In the Preserve white space dialog box, enable any of the check boxes.
You can also
Select all elements Click Select all.
Disable all selected elements Click Clear all.
Centering and spacing text
You can center text between the top and bottom margins of a document.
You can change the spacing between lines of text associated with a specific element.
To center text between the top and bottom margins
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Page Center page, and enable one of the following options:
Current page-to center text on the current page
Current and subsequent pages-to center text on all the pages in the document
No centering-to turn page centering off
To change the spacing between lines of text
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Line Spacing, and click one of the following:
Single-to set single line spacing
Double-to set double line spacing
Other-to set custom line spacing
If you clicked Other, type a value in the box in the Line spacing dialog box.
Note
In single-spacing, the distance from baseline to baseline is one line height. When you click Other and type a value in the Line spacing dialog box, the current line height is multiplied by that number.
Keeping text together
To keep words together, you can insert a hard space between them. You can also prevent the first and last lines of a paragraph from being separated from the rest of the paragraph across a page break.
You can also insert a line break to begin a new line without ending the paragraph.
To keep words together
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Insert Hard space.
To keep a paragraph together
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Page Widow/orphan.
To insert a line break
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Line New line.
Inserting horizontal lines
You can insert a preset horizontal line that extends between margins. This is useful if you want to separate text or graphics on a page to make a document visually appealing and easier to read.
To insert a horizontal line
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Insert Horizontal line.
Justifying text
You can justify text in a WordPerfect XML document. Doing so aligns the text horizontally between the left and right margins of the page.
To justify text
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Paragraph Justification, and click one of the following:
Left-to align text evenly with the left margin
Right-to align text evenly with the right margin
Center-to center text between the left and right margins
Full-to align text, excluding the last line, between the left and right margins
All-to align text, including the last line, between the left and right margins
Creating subscript or superscript text
You can create subscript or superscript text.
To create subscript or superscript text
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Format Font.
5 In the Font properties dialog box, click the Font tab.
6 Click Position, and click one of the following:
Subscript
Superscript
You can also
Turn subscript text on or off Click Position, and click Subscript on or Subscript off.
Turn superscript text on or off Click Position, and click Superscript on or Superscript off.
Modifying font settings
You can apply formatting to text to change the font and its attributes, such as style, size, and color.
To change the font and font attributes
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Format Font.
5 In the Font properties dialog box, click the Font tab.
6 Choose a font from the Face list.
You can also
Change the font style In the Appearance area, enable any of the check boxes.
Change the font size Choose a font size from the Size list box.
Set the relative font size Click Relative size.
Change the font color Open the Color picker, and click a color.
Indenting lines and paragraphs
Indenting arranges text on a page by moving one or more lines to the left or the right of the margin. You can indent a line or a paragraph.
To move the first line of a paragraph farther to the left than subsequent lines, you can insert a hanging indent.
To indent a line
1 In the WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Line Tab, and choose one of the following options:
Soft tab-to indent the line according to the tab type defined in the next tab setting
Back tab-moves the insertion point to the previous tab setting
Hard tabs-to indent the line according to the position defined in the next tab setting
Hard tabs with dot leaders-to indent the line with leaders to the next tab setting
Note
Hard tabs remain even if you modify the tab settings.
To indent a paragraph
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Paragraph Indent, and click one of the following:
Normal-to move a paragraph one tab stop to the right
Double-move a paragraph in one tab stop from both the right and left margins
Note
A double indent is often used to format lengthy quotations.
To insert a hanging indent
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Paragraph Indent, and click one of the following:
Normal-to move a paragraph one tab stop to the right
Double-move a paragraph in one tab stop from both the right and left margins
5 Click Line Tab Back tab.
Adding tab stops
You can add tab stops to a document. Tab stops let you determine where the cursor moves to when you tab forward or tab back.
You can also delete tab stops.
To add a tab stop
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Line Tab set.
5 From the Settings area in the Tab set dialog box, choose a tab style from the Type list box.
6 Type a value in the Position box.
7 In the Position from area, click one of the following buttons:
Left margin (relative)
Left edge of paper (absolute)
If you want to repeat the tab stop at regular intervals, enable the Repeat every check box, and type a value in the box to its right.
8 Click Set.
Note
When you use Dot left, Dot center, Dot right, and Dot decimal tabs, leaders display between the tab insertion point and the next tab setting. Leaders help to guide the eye from one tab stop to the next, usually illustrating a relationship between information at the tab stops; for example, you can use leaders in a table of contents to show the page number that corresponds to a title.
To delete a tab stop
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element to which a tab stop is applied from the Rule list.
3 Click Edit Edit rule.
4 Click Line Tab set.
5 In the Settings area of the Tab set dialog box, choose a tab setting from the Type list box.
6 Click Clear.
You can also
Delete all tabs Click Clear all.
Restore the default tab settings Click Default.
Using bulleted lists
You can create bulleted lists for list elements in a DTD by defining a bullet type and creating the bulleted list in a document.
You can also use counters to create numbered lists. For more information, see "Using counters".
To define a bullet type for a bulleted list
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 In the Rule entry for start tag box, click where you want to place the bullet.
4 Click Display Text.
5 In the Text dialog box, click Symbols.
6 From the Set list box, choose a symbol type or character set.
7 Choose a symbol from the Symbols list.
8 Click Insert and close.
Note
You can also create bulleted lists by defining a bullet type as a style in a WordPerfect template. For more information about styles, see "Formatting XML documents".
To create a bulleted list
1 In a WordPerfect XML document, open the XML flyout, and click Elements.
2 Click in a tag where bulleted lists are valid.
3 From the All elements list in the Elements dialog box, choose BulletList.
4 Enable the Auto-insert check box.
5 Click Insert.
6 Click Exit.
7 Choose </> ListItem from the All elements list.
8 Click Insert.
Creating columns
You can use columns to divide text vertically on a page. There are four types of columns for use in documents such as newsletters, glossaries, scripts, or inventory lists: Newspaper, Balanced newspaper, Parallel, and Parallel with block protect.
Text in newspaper columns flows down the column to the bottom of a page or column break and starts again at the top of the next column.
Balanced newspaper columns are similar to regular newspaper columns, but each column is adjusted on the page so they are equal in length.
Parallel columns group text across the page in a row. The next row starts below the longest column of the previous row. Parallel columns are useful for resumes, scripts, charts, inventory lists, or lists where columns span across pages.
Parallel columns with block protect keep each row of columns together. If a column in one row becomes so long that it moves across a page break, the entire row moves to the next page.
Any column can be discontinued.
To create a column
1 In the WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Format Columns.
5 In the Number of columns area of the Columns dialog box, type a value in the Columns box.
6 In the Type area, enable one of the following options:
Newspaper-to format text to flow down a column to the bottom of a page or column break and continues it at the top of the next column
Balanced newspaper-to format newspaper columns of equal length
Parallel-to format columns grouped across a page in rows, and starting subsequent rows below the longest column of the previous row
Parallel w/block protect-to format Parallel columns with all of the rows of columns kept together across page breaks
You can also
Change the spacing between rows in Parallel or Parallel w/block protect columns Click in the Line spacing between rows in parallel columns box.
Set the default spacing between Newspaper and Balanced newspaper columns Click in the Spacing between columns box.
Specify column widths In the Column widths area, type a value in any of the Column boxes; for example, Column 1.
Specify the width between columns In the Column widths area, type a value in the appropriate Space boxes.
Note
You can number lines in newspaper columns. For more information, see "To number lines in newspaper columns."
Tip
If you want to maintain the column widths or the width between columns, regardless of width or margin changes in other columns, enable the Fixed check box to the right of the Column and Space boxes in the Column widths area.
To discontinue a column
1 In WordPerfect XML Project Designer, open or create an XML project.
2 From the Rule list in the Element rule list area, choose an element to which you have formatted columns.
3 Click Edit Edit rule.
4 Click Page Hard column.
Numbering lines in documents
You can number the lines in a document. When you number lines, you can set the numbering method, the starting line number, where you want the numbers to begin, and which line numbers are displayed and printed.
You can also number lines in newspaper columns.
To make it easier to find information in your XML documents, you can automatically number all lines in a document or in newspaper columns.
To number the lines in a document
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Line Numbering.
5 In the Line numbering dialog box, enable the Turn line numbering on check box.
6 In the Position of numbers area, enable one of the following options:
From the left edge of page-to specify the distance from the left edge of the page or from the center of the space between columns, to the line number
Left of margin-lets you specify the distance from the left margin of the page to the line number
You can also
Set the starting line number In the Numbering options area, type a value in the Starting line number box.
Set the first printed line number In the Numbering options area, enable the First printing line number option.
Specify the interval between printed line numbers Type a value in the Numbering interval box.
Restart line numbers on each page Enable the Restart numbering on each page check box.
Include blank line when numbering Enable the Count blank lines check box.
Choose a numbering method Choose a numbering method from the Numbering method list box.
To number lines in newspaper columns
1 In WordPerfect XML Project Designer, open or create an XML project.
2 From the Rule list in the Element rule list area, choose an element to which you have formatted columns.
3 Click Edit Edit rule.
4 Click Line Numbering.
5 In the Line numbering dialog box, enable the Turn line numbering on check box.
6 In the Position of numbers area, enable the Left of margin option.
If you want to specify the distance between the line numbers and the left edge of text in each column, type a value in the box to the right of the Left of margin option.
7 Enable the Number all newspaper columns check box.
You can also
Choose a numbering style In the Numbering options dialog box, choose a numbering style from the Numbering method list box.
Specify a starting line number Type a value in the Starting line number box.
Specify a numbering interval Type a value in the Numbering interval check box.
Note
If you specify the distance between the line numbers and the left edge of text in each column, that distance must be less than the amount of space between the columns; otherwise, the line numbers may overlap the text in the columns.
Numbering pages
You can number the pages of a document, including information such as the number of pages, chapters, volumes, or secondary pages. You can choose a position for the numbers and define the numbering format you want to use.
To set a page number for a specific element
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Page Numbering.
5 In the Page numbering dialog box, choose a position from the Position list box.
6 From the Numbering style list box, choose a numbering style.
7 Type a value in the New page number box.
You can also
Increase or decrease the page number Type a value in the Increase/decrease existing page number box.
Include text with the page number In the Number and accompanying text box, type text where you want it to display with the page number; for example, to display Chapter 1, Page 1, click to the left of [Pg#], type Chapter 1, and press the Spacebar.
Using counters
WordPerfect uses several built-in counters to keep track of pages, paragraphs, lines, figures, and other numbered items in an XML document. Counters are useful if you want to count equation boxes, figure boxes, table boxes, text boxes, and more.
Counters can display numbers, letters, and Roman numerals anywhere in a document. You can use counters to create numbering levels. You can also change the numbering method used in counters. You can also increase or decrease the value of a counter. You can also display counters in a document. You can also delete counters.
To create numbered levels using counters
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Define counters.
4 Click Create.
5 In the Create counter definition dialog box, type a name in the Counter name box.
6 Type a value in the Number of levels box.
7 In the Multi-level definition area, type a name for each level in the corresponding Level name box.
8 From the corresponding Numbering method list box, choose a numbering method for each level.
Note
When you set a value for one level of a multi-level counter, the value for all lower levels is reset to 1; for example, a three-level counter has been set at 2,4,5,. If level 1 is increased to 3, levels 2 and 3 are reset to 1. If all three levels of the counter are displayed, the numbers will be 3,1,1.
Tip
If you want to define a single level, choose a numbering method from the Single level method box.
To change the numbering method of a counter
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Display Counters.
4 In the Counter number dialog box, choose a counter from the Counter list.
5 Click Value.
6 In the Set value/number method dialog box, choose a numbering method from the Numbering method list box.
Note
If you change the numbering method of a counter associated with the root element, all elements are affected.
To increase or decrease the value of a counter
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Display Counters.
5 In the Counter numbering dialog box, choose a counter level from the Counter list box.
6 In the Value area, click one of the following buttons:
Increase- to increase the counter by one
Decrease- to decrease the counter by one
Note
When you increase or decrease a value for one level of a multi-level counter, the value for all lower levels is reset to 1; for example, a three-level counter has been set at 2,4,5,. If level 1 is increased to 3, levels 2 and 3 are reset to 1. If all three levels of the counter are displayed, the numbers will be 3,1,1.
To display counters in a document
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Display Counters.
5 In the Value area of the Counter numbering dialog box, click Display in document.
You can also
Increase the counter by one and display it in the document Click a counter in the Counter list, and click Increase and display.
Decrease the counter by one and display it in the document Click a counter in the Counter list, and click Decrease and display.
Tips
If you want the counter to begin at 1, set the value to 0. When you click the Increase and display button, the counter increases before it is displayed.
If you want to display a number that is equal to that of the starting value of the counter, chose a counter level from the Counter list, and click Display in document before increasing or decreasing a counter; otherwise, the first number displayed will be increased or decreased by one from the starting value.
To delete counters
1 In WordPerfect XML Project Designer, open or create an XML project.
2 In the Element rule list area, choose an element from the Rule list.
3 Click Edit Edit rule.
4 Click Display Counters.
5 In the Counter numbering dialog box, choose the counter you want to remove from the Counter/value box.
6 Click Delete.
Note
The counter definitions in the element rules are not deleted when you delete a counter.