Copy link to clipboard
Copied
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!
Top suspects might include (but are not limited to):
I'm not aware of any limit on the max number of Index entries.
Copy link to clipboard
Copied
Top suspects might include (but are not limited to):
I'm not aware of any limit on the max number of Index entries.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
When I add a new index marker, sometimes I insert a marker of another type. Did you check this in your new markers?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
#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;
}
Copy link to clipboard
Copied
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
Find more inspiration, events, and resources on the new Adobe Community
Explore Now