ELECTRONIC PUBLISHING, VOL. 4(1), 43–60 (MARCH 1991) Numbering document components 1 MICHAEL A. HARRISON AND ETHAN V. MUNSON Computer Science Division University of California at Berkeley Berkeley, CA 94720, USA SUMMARY Numbering document components such as sections, subsections, figures and equations gives each component a unique identifier and helps the user locate the component when it is cross- referenced. This paper discusses ways in which such numbering can be described and proposes a simple paradigm for declarative specification of how components should be numbered. The class of algorithms for incremental update of component numbers is studied and the “best” such algorithm is developed in detail. KEY WORDS Structured documents Component numbering Incremental update Interactive systems Last/previous algorithm Declarative specification 1 INTRODUCTION It is common, particularly in technical documents, to assign ordinal numbers to certain document components, such as sections, figures, and equations. The purpose of numbering is to facilitate cross-referencing of distant components and to help the user locate distant components in a long document. Numbering serves these purposes in two ways. First, it gives each component a unique identifier within its type, so that Figure 2 is the only figure given the number 2. Unlike such alternative identifiers as section titles and figure captions, numbers are short, can be generated automatically, and are certain to be distinct. Also, there is an inexhaustible supply of them. However, numbers have none of the mnemonic qualities of these textual alternatives. Secondly, a component number gives the reader a strong hint about the component’s location in the document. Figure 2 is guaranteed to appear after Figure 1 and before Figure 3. Page numbers might specify the location more precisely, but they may not specify a unique component (since a page may contain multiple figures or equations). Moreover, in certain computerized document systems, the text is assumed to be an infinite scroll, i.e. there are no page numbers. Thus, while component numbering is neither the best unique identifier nor the best locator, it is probably the best tool for achieving both. Support for automated component numbering has traditionally been one of the fea- tures that distinguish “document-processing” systems from “word-processing” systems. Document-processing systems free the user from the tedious task of updating component numbers and cross-references by hand. However, for those document-processing systems 1 Sponsored by the Defense Advanced Research Projects Agency (DARPA), monitored by Space and Naval Warfare Systems Command under Contract N00039-88-C-0292. 0894–3982/91/010043–18$9.00 Received 20 August 1990 c 1991 by John Wiley & Sons, Ltd. Revised 15 November 1990 © 1998 by University of Nottingham.