[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

TOC Trick

Forgot to put in a subject line the first time I sent this.
Sometimes, in a Table of Contents, you need to add an entry to the TOC 
which does not physically appear within the book, but should appear 
immediately following a particular TOC entry. This situation often occurs, 
for instance, in database publishing, where a group of consecutive indented 
subtitles you want to appear in the TOC requires a non-existent title to 
appear before the first subtitle. I recently encountered this situation in 
developing a database publishing solution for an HMO physician directory, 
in which the book file had the following set of files:
Title Page

Table of Contents


One or more files produced by processing database extracts, using UniMerge 
to produce FrameMaker files

The UniMerge-produced FrameMaker files consist of Physician's Groups, each 
containing the listings (including name, address, phone numbers, etc.) of 
affiliated hospitals, primary care and specialist physicians (grouped by 
their specialties), plus mammography clinics and urgent care centers.

The client wanted the TOC to include the major topic headings in the 
Introduction, followed by an entry for each included physician group. But 
the client also wanted a TOC entry immediately following the last entry in 
the Introduction and preceding the first Physician Group entry which would 
contain the phrase "Physician's Groups." (without a page number, since it 
does not exist on any page).

To further complicate the problem, some of the actual titles in the 
Introduction did not match what the client wanted to appear for that title 
in the TOC. So, the obvious solution was to generate the TOC as a list of 
markers (LOM). This is easy to implement throughout because UniMerge can 
automatically insert markers containing the name of each physician group.

That left the problem of inserting the entry containing "Physician's 
Groups." following the last TOC entry in the introduction. But we all know 
that you cannot insert static text in the midst of generated list or index 
entries, because such text disappears when the list or index is generated.

So, what I did was to create a special marker type for the last TOC entry 
in the Introduction, and, on the TOC reference page, set the specification 
for that marker as:
<$markertext>   \(tab)<$pagenum>
Physician's Groups
Where <$pagenum> is followed by a soft return, followed by "Physician's 
Groups" on the second line.
The resulting generated TOC looks like this:

IntroTopic 1.............................Pgnum
IntroTopic n.............................Pgnum
Physician's Groups
        Physician Group1..............Pgnum
        Physician Group n.............Pgnum

Where IntroTopic n is the one having the special marker type

Note that the same technique would work just as well for the case where the 
TOC is produced from a specified set of paragraph tags rather than markers. 
In that case, the last title in the Introduction would be assigned an 
unique paragraph tag (identical in format to the other titles), and the 
specification for that paragraph tag on the TOC reference page would be:
Physician's Groups

FrameMaker/FrameMaker+SGML Document Design & Database Publishing
DW Emory <danemory@globalcrossing.net>

** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **