WinWord: Contents of the "Using SEQ Fields" Application Note
ID: Q85942
|
The information in this article applies to:
-
Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c
SUMMARY
This article contains the complete contents of the application note titled
"WD0521 Creating Sequenced Items with the SEQ field."
The following Microsoft Word file is available for download from the
Microsoft Software Library:
WD0521.EXE
For more information about downloading files from the Microsoft Software
Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services
MORE INFORMATION
======================================================================
Microsoft Product Support Services Application Note (Text File)
WD0521: CREATING SEQUENCED ITEMS WITH THE SEQ FIELD
======================================================================
Revision Date: 6/92
No Disk Included
The following information applies to versions 2.0 and 2.0a of
Microsoft Word for Windows.
--------------------------------------------------------------------
| INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY |
| ACCOMPANY THIS DOCUMENT (collectively referred to as an |
| Application Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY |
| KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO |
| THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A |
| PARTICULAR PURPOSE. The user assumes the entire risk as to the |
| accuracy and the use of this Application Note. This Application |
| Note may be copied and distributed subject to the following |
| conditions: 1) All text must be copied without modification and |
| all pages must be included; 2) If software is included, all files |
| on the disk(s) must be copied without modification [the MS-DOSŪ |
| utility DISKCOPY is appropriate for this purpose]; 3) All |
| components of this Application Note must be distributed together; |
| and 4) This Application Note may not be distributed for profit. |
| |
| Copyright 1992 Microsoft Corporation. All Rights Reserved. |
| Microsoft and MS-DOS are registered trademarks and Windows is a |
| trademark of Microsoft Corporation. |
--------------------------------------------------------------------
INTRODUCTION
============
With the SEQ field, Word for Windows allows you to create automatic
sequential numbering for groups of items. For example, you can use the SEQ
field to sequentially number tables, illustrations, photographs, and
chapter-page references for tables of contents.
Using sequence (SEQ) fields is preferable to typing individual numerical
references because when you edit a document, sequenced items may change
position several times (thereby invalidating the previous numbering
sequence). When you use SEQ fields, Word updates sequenced item numbers
automatically.
PARTS OF THE SEQ FIELD
======================
The syntax of the SEQ field is as follows:
{seq <identifier> [<bookmark>]}
The <identifier> within the SEQ field is the name you assign the group
of items being sequenced. For example, you could assign the
identifiers for figures, photos, tables, or chapters the names figs,
photos, tables, and chaps, respectively.
<Bookmark> is displayed in the above example in brackets to show that
this portion of the SEQ field is optional. The bookmark is a word you
assign to cross-reference an existing sequence number. The bookmark
name can be up to 20 characters long, must begin with a letter, and
cannot contain spaces--only letters, numbers, and the underscore
character (_) are allowed. For example, to reference a previously
appearing photo of the Kingdome, you would assign the bookmark
"kingdome" to the Kingdome photo's SEQ field, then insert the
following cross-reference in the text that discusses that photo:
See Photo {seq photo kingdome}
If the Kingdome photo's sequence number is, for example, 5, then the
result of the cross-reference is "See Photo 5."
CREATING THE SEQ FIELD
======================
There are two methods of creating SEQ fields:
1. The first method is to choose Field from the Insert menu. From the
Insert Field Type list, select Sequence. In the Field Code box,
after the word "seq", type the identifier you've assigned to
identify the sequence group. For example, if your identifier is
"photos", the Field Code box would show the following:
seq photos
Choose the OK button.
2. The second method is to press CTRL+F9. This produces field
characters, { }, with the insertion point between them. Type "seq"
(without the quotation marks), a space, and the identifier you've
assigned the sequence group. Below is an example of the syntax of a
sequence field where "fig" is the identifier:
The weave pattern is shown in Figure {seq fig}.
When the Field Codes command on the View menu has a check mark next
to it, all fields show their codes. When it has no check mark, all
fields show their results. (To switch between field codes and
results, see page 754 of the version 2.0 "Microsoft Word for
Windows User's Guide.")
If the sequence fields become reordered during the course of editing,
you must update the fields to restore correct numbering. To update all
the fields in a document, choose Select All from the Edit menu (or
press CTRL+KEYPAD 5) and press the Update Field Key (F9). To update
only an individual field, place the insertion point within that field
(or select the field) and press F9.
CREATING CROSS-REFERENCES
=========================
Word for Windows allows you to create cross-references to items in the
same document. To create a cross-reference to a sequentially numbered
item, you must select the item being referenced and insert a bookmark.
Then, in the text that discusses the referenced item, you must insert
a SEQ field that contains the bookmark name assigned to the referenced
item.
For example, suppose a document contains the following illustration
and SEQ fields:
-------------------- -------------------- --------------------
<graphic of a <graphic of a <graphic of a
box pattern> pyramid pattern> weave pattern>
Design {seq pattern} Design {seq pattern} Design {seq pattern}
-------------------- -------------------- --------------------
Illustration 1
With the field codes not displaying, the figures would display as
follows:
------------- ---------------- --------------
<graphic of a <graphic of a <graphic of a
box pattern> pyramid pattern> weave pattern>
Design 1 Design 2 Design 3
------------- ---------------- --------------
Illustration 1
To cross-reference the pyramid pattern (Design 2) at another place in
the document, select the {seq pattern} field corresponding with the
pyramid design, choose Bookmark from the Insert menu, type in a
bookmark name that you assign (for example, "pyramid"), and choose the
OK button.
Caution: If you type a bookmark name that is already assigned, the
original bookmark is removed and the current selection is marked
with this name.
After you insert the "pyramid" bookmark, position the insertion point
in the document where you want to refer to the pyramid pattern and
insert a SEQ field containing the bookmark name "pyramid." The
following is an example of how to reference the pyramid pattern
(Design 2) in Illustration 1:
See Design {seq pattern pyramid}.
This will result in the following reference:
See Design 2.
If the sequence fields become reordered during the course of editing,
you must update the fields to restore correct numbering. To update all
the fields in a document, choose Select All from the Edit menu (or
press CTRL+KEYPAD 5). To update only an individual field, place the
insertion point within that field (or select the field) and press F9.
FIELD CODE SWITCHES
===================
You can add switches to SEQ fields to control the sequence number
results. The following table shows how the switches can be used:
Table 1--SEQ Field Switches
Switch Function Example
------ -------- -------
\c Inserts the current or nearest {seq photo \c}
preceding sequence number
\h Hides the result {seq photo \h}
\r<n> Resets the sequence number to the {seq photo \r1}
number specified after \r
CREATING CHAPTER AND PAGE REFERENCES WITH SEQ FIELDS
====================================================
You can use SEQ fields to create "chapter-page" numbering in the
document; this numbering can also be used in a table of contents and
index. For example, a SEQ field can be used to insert 2-1 as the page
number on page 1 of Chapter 2, and table of contents entries and index
entries for that page will show 2-1.
To insert a chapter-page sequence number in the header or footer, you
must first include a new chapter SEQ field at the beginning of each
chapter, as follows: {seq chapter}. If you do not want the chapter
sequence number to be displayed or print in the body of the document,
include the \h switch, as follows:
{seq chapter \h}
Then, you must insert SEQ and PAGE fields in the header or footer as
follows:
{seq chapter \c}-{Page}
The \c switch in the SEQ field instructs the field to return the
current sequence value. If you insert {seq chapter} at the beginning
of Chapter 1 and you insert {seq chapter \c}-{page} in the header or
footer of the document, the page numbering will begin 1-1, 1-2, 1-3,
and so forth, until another {seq chapter} field is encountered in the
body of the document. The next occurrence of a {seq chapter} field in
the body of the document will cause the {seq chapter \c} field in the
header or footer to update to the next sequence value.
Compiling the Table of Contents and Index with Chapter-Page Numbers
-------------------------------------------------------------------
To create a table of contents that uses chapter-page numbers as found
in the header or footer of the document, use the \s <identifier>
switch in the TOC (table of contents) field. (The \s switch tells the
TOC field to use the identifier's page numbering sequence.) For
example, a table of contents to be compiled from heading styles
requires the following TOC field:
{toc \s chapter}
A table of contents compiled from TC (table of contents entry) fields
requires the following TOC field (the \f switch tells the TOC field to
use the TC fields, rather than the heading levels):
{toc \f \s chapter}
In both of these TOC fields, "chapter" is the SEQ identifier used in
the main body and header or footer of the document. These TOC fields
would result in chapter-page numbering, as in the following example:
Introduction to Computers 1-1
MS-DOS Operating System 1-5
Networks 2-1
Setting Up a Server 2-3
Printers 3-1
Ports 3-4
To create an index that uses chapter-page numbers as found in the
header or footer of the document, use the \s <identifier> switch in
the INDEX field. (The \s switch tells the INDEX field to use the
identifier's page numbering sequence.) For example, the index would
require the following field:
{index \s chapter}
In this INDEX field, "chapter" is the SEQ identifier used in the main
body and header or footer of the document. This INDEX field would
result in chapter-page numbering, as in the following example:
AUTOEXEC.BAT file, 1-2
CONFIG.SYS file, 1-2
MS-DOS, 1-5, 1-7, 1-8
Network server, 2-3, 2-4, 2-5
Network workstation, 2-1, 2-4
Print, 3-1, 3-2, 3-3, 3-4, 3-5
FORMATTING SEQ FIELDS
=====================
Sequence fields can also be used with optional switches that affect
the formatting of the fields' results. Using these optional
instructions, you can create other SEQ results than chapter-page
numbering. Table 2 shows some examples:
Table 2--Optional Field Instructions(1)
Format SEQ Field Syntax(2) Results
------ ------------------- -------
Alphabetic, {seq \c chapter \*Alphabetic}-{page} Z-1
uppercase
Alphabetic, {seq \c chapter \*alphabetic}-{page} z-1
lowercase
Ordinal {seq \c chapter \*Ordinal}-{page} 26th-1
Roman {seq \c chapter \*Roman}-{page} XXVI-1
numeral,
uppercase
Roman {seq \c chapter \*roman}-{page} xxvi-1
numeral,
lowercase
Cardinal {seq \c chapter \*cardtext}-{page} Twenty-Six-1
text
Ordinal {seq \c chapter \*ordtext}-{page} Twenty-Sixth-1
text
Hexadecimal {seq \c chapter \*hex}-{page} 1A-1
numbers
Cardinal {seq \c chapter \*dollartext}-{page} Twenty-Six
text with and NO/100-1
fraction
Arabic {seq \c chapter \*arabic}-{page} 26-1
number
Uppercase {seq \c chapter \*cardtext \*upper}-{page} TWENTY-SIX-1
Lowercase {seq \c chapter \*ordtext \*lower}-{page} twenty-sixth-1
(1) If the \h switch is used with any of these formatting
switches, the result of the SEQ field will not be hidden. To hide
the result of a SEQ field that contains formatting switches, you
must select the field and format it as hidden text by choosing
Character from the Format menu and selecting the Hidden check box
(or by pressing CTRL+H).
(2) You cannot use these formatting switches in a table of
contents; the results revert to the regular Arabic number format.
To use these formatting switches in an index, generate XE (index
entry) fields similar to the following:
{xe "entry text" \t "{seq chapter \c \*Alphabetic}-{page}"}
Using SEQ Fields to Number Paragraphs
-------------------------------------
Generally, the Bullets And Numbering command or the AUTONUM,
AUTONUMLGL, and AUTONUMOUT fields are used to automatically number
paragraphs in a document. However, the AUTONUM, AUTONUMLGL, and
AUTONUMOUT fields insert a period after the number. You can use the
SEQ field to insert an automatic number that does not include a
period.
You can also use a combination of SEQ fields to generate complex legal
paragraph numbering in a document. For example, to generate paragraph
numbers as 1, 1.1, 1.1.1, and so forth, use the following sequence
fields:
{seq one}
{seq one \c}.{seq two}
{seq one \c}.{seq two \c}.{seq three}
The \c switch is used to keep the individual sequence numbers current.
A SEQ field without the \c switch will increment to the next number.
Another advantage to using SEQ fields to number paragraphs is that you
can use the \r switch to reset any of the sequences to 0 or to any
number you choose.
Using SEQ Fields to Cross-Reference Automatically Numbered Paragraphs
---------------------------------------------------------------------
You can also cross-reference automatic paragraph numbers with the SEQ
field. An automatically numbered paragraph is created using the
AUTONUM, AUTONUMLGL, or AUTONUMOUT field. If you want to reference the
paragraph number of a paragraph numbered using this method, you can
use a number as the sequence identifier for the SEQ field, as in the
following example:
Syntax:
{seq <number>}
The <number> used as an identifier is actually a style reference. The
number can be any digit from 0 through 9, where numbers 1 through 9
refer to paragraphs formatted with the styles Heading 1 through
Heading 9 and 0 (zero) refers to paragraphs formatted with other
(nonheading) styles. The {seq <number>} field returns the value of the
preceding numbered paragraph formatted with the referenced style. In
the following example, "2" refers to the value of the preceding
numbered paragraph formatted with the Heading 2 style.
Example:
{seq 2}
Usage:
As described earlier in this section (Section {seq 2}), our revenue
has increased over last quarter.
Result:
As described earlier in this section (Section 4), our revenue has
increased over last quarter.
NOTE: The section referenced above was the fourth paragraph
formatted with a Heading 2 style and automatically numbered with
an AUTONUM field.
LIMITATION: This method of cross-referencing returns only a single
value reference in Arabic numeral format. As a result, you may not
obtain useful references when you use the AUTONUMLGL or AUTONUMOUT
fields. The SEQ field counts each occurrence of the paragraph
style referenced (for example, {seq 2} counts all occurrences of
the Heading 2 paragraph style) and uses that value as the result
of the SEQ field, regardless of what style of numbering has been
applied to the automatic field. For example, AUTONUMLGL fields
produce multiple value paragraph numbers such as 1., 1.1., 1.1.1.,
but the result of a SEQ reference to these numbers will be 1, 1,
1. Similarly, the AUTONUMOUT field produces paragraph numbers such
as I, A, i, but the result of a SEQ reference to these numbers
will also be 1, 1, 1.
REFERENCES
For more information, see the following pages in the version 2.0
"Microsoft Word for Windows User's Guide."
Chapter Page(s)
------- -------
Chapter 22, "Numbering Pages" 428-430
Chapter 29, "Indexes and Tables of Contents" 539, 561-564
Chapter 40, "Bookmarks and Cross-References" 741
Chapter 41, "Fields" 747-748, 752-762
Additional query words:
appnote wd0521
Keywords : winword winword2
Version : WINDOWS:2.0,2.0a,2.0a-CD,2.0b,2.0c
Platform : WINDOWS
Issue type : kbinfo