|
Styles are just WordPerfect codes
-- but codes that can contain other codes, text, graphics, headers,
footers, comments, tables, table of contents markers, and --
you guessed it -- counters. They act like containers to allow
you to quickly apply consistent structure or formatting -- such
as the Heading styles that ship with WordPerfect.
For an example of including counters
in a style, here's a method designed for a user who needed to
number paragraphs independently of a standard outline. The user
wanted to be able to independently number these paragraphs
no matter what level of outline they appeared under.
Example:
First, create a single-level
counter:
1. Click on Insert, Other, Counter,
Create. In the "Create Counter Definition" dialog that
appears, give the counter a name, (optionally) choose a numbering
method (numbers, letters, Roman numerals) in the "Single
level method" field, accept all other default values fields,
and click OK.
Next, create a style with the
new counter in it, and save the style to your default or other
template:
2. Click Format, Styles, Create
to open the Styles Editor. Give the new style a name and description.
For "Type," choose "Document." (This is an
open style that will remain in effect until the style is chosen
again, at which point the number will be incremented. You can,
of course, use a Paragraph or Character style. For more on styles
see here.)
3. Click in the Contents field
of the Styles Editor.
4. From the Styles Editor menu,
click Insert, Other, Counter, and make sure the new counter is
selected, then click the "Display in Document" button.
Then repeat: click Insert, Other, Counter, and make sure the
new counter is selected, then click "Increase."
You should now have two codes
in the Contents field:
[Count Disp][Count Inc] -- in that order.
The idea is to make WP display
the number, then (internally) increment it for any counter number
that may follow later in the document.
5. Add a period (full stop),
colon, space, or other "separator" character after
the two codes. You can also add formatting to the codes (select
them first), such as bold or italic, and/or add tabs (Insert,
Tab) or hard left indents (Format, Paragraph, Indent) before
or after the two codes.
6. Click OK to return to the
Styles dialog.
7. If you want this style to
be available to all new documents based on the default template,
make sure the style is selected in the "Available styles"
pane, then click the Options button, then Copy. Choose "Copy
To: Default template," then click OK.
If you want the style available
to other templates, it can be Saved/Retrieved -- or copied --
into them as needed. For example, once the new style is in the
default template, editing any other template allows you to use
the Copy/Remove Object button on the other template's property
bar to copy the style from the default template into the other
template.
8. When finished, click Close
to return to the document.
9. Now, when you are using the
main outline, toggle it off temporarily (usually, <Ctrl+H>
or <Ctrl+T>; see here for more
on this), then apply the new style. (You can select the style
code and make a QuickWord out of it to more quickly access it
when typing the document. Or, record a macro that inserts the
style and assign it to a keystroke; to assign macros to keystrokes,
see here.)
10. When you need a new number
for a subsequent block of text, apply the style again; the internal
counter will insert the incremented number. When you need to
go back to your regular outline, toggle it on again, etc. You
can insert new material, or delete the [Style] code, and the
other items will be automatically renumbered.
Related Tips.
- You may want to create several
new styles-with-counters, each with varying numbers of leading
tabs or hard left indents to match the indentation of the levels
of the main outline. Or, simply use tabs or hard left indents
to line up under the current outline level before applying the
style.
- You can use a macro to create
various styles-with-counters, as explained in the footnote
on the Outlines page.
- To cross-reference these
counters:
- Place your cursor just to the
left of the [Style] code in the main document.
For example, if you have created a Paragraph style with an embedded
counter, you should see this string of codes wherever the style
was applied; just place you cursor where indicated below:
- [Para Style>*[Style]<Para Style]
- * = cursor location
- Click Tools, Reference, Cross
Reference. In the Reference Tools dialog that appears, choose
"Counter" as the Reference Type. The Counter dialog
appears.
- In that dialog, choose the custom
counter you created in Step 1 at the top of this section (above),
then click OK.
- Back in the Reference Tools
dialog, give the Target a name in the Select Target field, then
click on Mark Target. A [Target] code will appear at the cursor
location in the document, like this:
- [Para Style>[Target][Style]<Para
Style]
- Repeat the above for your other
Counter cross references until all [Target] codes are inserted
in the document, adjacent to their [Style] codes.
- Next, create your text references.
Place your cursor at the appropriate location(s) in the text
area of your document and create the reference(s) with the Mark
button (not the Mark Target button) on the Reference Tools
dialog. Before marking them, be sure the Reference Type is set
to "Counter." Then set the Select Target to the appropriate
target name for the current target.
- Note: This step places a temporary
"?" in the document, which will display the actual
counter's number/letter when you generate the references.
- Once finished creating your
references ... click on Generate (or you can generate later from
the Tools, Reference menu).
- If you have created short Paragraph
or Character styles-with-counters, you can have WordPerfect include
these styles in a Table of Contents.
Page
Top |