Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Maximum size of Index?

Community Beginner ,
Jul 03, 2021 Jul 03, 2021

I have developed a very large book over the last 20 years, using various versions of FM. I currently use the most recent version & update. The book contains an Index of more than 100 pages of double column format. Recently, I have noticed that Index marks that I have added to the book have not appeared in the Index after subsequent updates of the book. Is there a maximum number of indexes that can be incorporated into a book?

If not, can anyone suggest what might solve my problem of missing entries in the Index?

Thanks in advance for any help that may be given!

488
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 03, 2021 Jul 03, 2021

Top suspects might include (but are not limited to):

  • .ix component file has lost its "generated" status and is not being regenerated
  • generation is happening, but .ix file is being written somewhere else, or is unwriteable for some reason, so not being updated
  • new tagged content isn't using the same Marker type as the legacy content

I'm not aware of any limit on the max number of Index entries.

Translate
Community Expert ,
Jul 03, 2021 Jul 03, 2021

Top suspects might include (but are not limited to):

  • .ix component file has lost its "generated" status and is not being regenerated
  • generation is happening, but .ix file is being written somewhere else, or is unwriteable for some reason, so not being updated
  • new tagged content isn't using the same Marker type as the legacy content

I'm not aware of any limit on the max number of Index entries.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 04, 2021 Jul 04, 2021

There may be the limit of maximum number of document objects. For the 32-bit versions of FM this is 2^24. For a calculations an index entry consists of some (probable 5-10) document objects. But IMHO this limit will not be reached by your index: 120pages * 2 columns * 50 lines * 10 objects is only 120 000 < 16 million...

The internal context table is a memory construct that holds many types of FrameMaker document objects. The following table illustrates the different entries and their requirements.
Element: 2 entries; Variable: 2 entries; Cross-reference: 2 entries; Marker (any type): 1 entry; Table: 1 entry; Aanchored frame: 1 entry; Hidden conditional text: 1 entry per block. In FrameMaker 5.5, maximum number of entries is 2^24 (16 777 216). This may be extended in the 64-bit version (since FM-15). See https://www.daube.ch/docu/fmaker25.html

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 07, 2021 Jul 07, 2021

Thanks, Bob. You were right with your first suggestion. The Index file had been lost from the Book Update. I could not find a way to reinsert it in the Update other than creating a new Index with a different name. After doing so, it worked just fine, and I removed the old Index from the book and renamed the new Index with the name of the old Index. Everything is back to normal.

Thanks to all of those who responded to my problem.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 08, 2021 Jul 08, 2021
LATEST

re: I could not find a way to reinsert it in the Update other than creating a new Index with a different name.

When you have an existing/old generated file (.ix in this case), the work-saver is to rename it, ask FM to create a new one, then import formats from the old one. Don't forget to copy in any static content above the generated content.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 04, 2021 Jul 04, 2021

When I add a new index marker, sometimes I insert a marker of another type. Did you check this in your new markers?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 06, 2021 Jul 06, 2021

One way you may be able to determine if there is a limit: count the Index markers in the book. Then count the number of Hypertext marker in the index. These numbers may not correspond exactly if any of your Index markers have semicolons in them for multiple entries per marker. Anyway, I will post a script that you can use to count markers in a document or book. You supply the marker type in the call to the main function.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 06, 2021 Jul 06, 2021

 

#target framemaker

main ("Index");

function main (markerType) {

    var book, doc, count;
	
	book = app.ActiveBook;
	if (book.ObjectValid () === 1) {
	    count = processBook (book, count, markerType);
		alert (count + " " + markerType + " markers in book.", "www.frameexpert.com");
	}
	else {
		doc = app.ActiveDoc;
	    if (doc.ObjectValid () === 1) {
		    count = processDoc (doc, count, markerType);
		    alert (count + " " + markerType + " markers in document.", "www.frameexpert.com");
		}
	}
}

function processDoc (doc, count, markerType) {

	var marker;
	
	count = count ? count : 0;
	
	marker = doc.FirstMarkerInDoc;
	while (marker.ObjectValid () === 1) {
		if (marker.MarkerTypeId.Name === markerType) {
			count += 1;
		}
		marker = marker.NextMarkerInDoc;
	}
	
	return count;
}

function processBook (book, count, markerType) {

    var bookComp, doc, regex;
    
    // Regular expression for standard FrameMaker documents.
    regex = /\.fm$/i;
    
    // Loop through all of the components in the book.
    bookComp = book.FirstComponentInBook;
    while (bookComp.ObjectValid () === 1) {
        if (bookComp.ExcludeBookComponent === 0) {
            if (regex.test (bookComp.Name) === true) {
                // Get the document returned in a JavaScript object.
                doc = CP.getDocument (bookComp.Name, undefined, false);
                if ((doc) && (doc.ObjectValid () === 1)) {
                    book.StatusLine = "Processing " + File (bookComp.Name).displayName;
                    // Call the function to get the document's data.
					count = processDoc (doc, count, markerType);
                    // If the document was opened by the script, close it.
                    if (doc.openedByScript === true) {
                        doc.Close (true);
                    }
                }
            }
        }
        bookComp = bookComp.NextBookComponentInDFSOrder;
    }

    // Reset the book status line.
    book.StatusLine = "";
	
	return count;
}

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 06, 2021 Jul 06, 2021

Copy the code from the post into a plain text file and save it somewhere as CountMarkers.jsx. Then, open your FrameMaker book and choose File > Script > Run and choose the script. Note that on a large book, it will take some time to run. It will display the marker count when finished.

 

Next, change main ("Index"); to main ("Hypertext");, save the script and open the Index and run it again. See if there is a mismatch between the Index and Hypertext counts.

 

If you need help with this, please contact me offlist: rick at frameexpert dot com

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines