Company Logo

FrameMaker Fix For Faked Paragraph Numbers

#! /bin/sh
SRC_ID='@(#) $Header: DpsNumBody,v 1.0 93/11/10 14:56:15 uid=135(dhighley)
    gid=10(staff) groups=10(staff) Exp $'
# Author: David Highley
# Copyright (c) 1993 Highley Recommended, Inc.
# All Rights Reserved.  This copyright and the "SRC_ID" string(s)
# included in the source must not be removed.  Permission is granted for
# licensed systems.

#
# $Log$
# Initial Edit: 93/11/10 14:56:15
#


        Rev='$Revision: 1.0 $'


nawk '
{

###########################################################################
#  This section fixes a real ugly paragraph style where the numbering for #
#  the paragraph was just a text string and the Annotation line was part  #
#  of this ugly paragraph.                                                #
###########################################################################
	print $0
	while ( getline > 0 ) {
		if ( match($0,"<PgfTag DpsNumBody>") >0 ) {
						# Change paragraph style
			print "   <PgfTag DpsSubSubSec>"
			getline			# PgfFIndent
			print $0
			getline			# Pgf
			print $0
			getline			# ParaLine
			getline			# <String `1.1.1
			getline			# Font
			getline			# >
			Ind = 0
			while ( Ind < 11 ) {	# Break Annotation line
						# into seperate paragraph
				getline
				print $0
				Ind = Ind + 1 }
			getline			# Delete one line feed
			print " > # Para"	# Make new paragraph
			print " <Para"
			print "  <Pgf"
			print "   <PgfTag DpsBody>"
			print "   <PgfFIndent 0.000000> <PgfLIndent 0.000000>"
			LineIndex = LineIndex + 1
			print "  > # Pgf"
			continue }

	print $0
	} # End of loop for extraction of Subsection paragraph
}'