The index is sorting “alphabetically”, despite the fact that we recognise the entries as numbers. 8 comes after 10, because the sort order is character-by-character, and 8 comes after 1.
The easiest way i can think of to fix these is to pad your figures with leading zeroes in the index entry box, so use 01.02.11 instead of 1.2.11. Then 01 sorts before 10 because 0 sorts before 1.
This doesn’t mean changing the text as it appears to the reader, just the index tag. It does, however, mean quite a lot of fiddly editing.
I've never played with it, but I thought you could add some arguments to the string on the reference page to tell the program what order to use when sorting entries. I seem to remember it coming up with indices using Asian languages or something.
Is there anyway to do this by using the Reference page? I have about 70 pages of index (unformatted) and I'm thinking that's a good idea, but not the best method.
Do you know of an argument/tag(s) that would help with sorting?
I just checked in my copy of Sarah O'Keefe's Unstructured FM8 (a great reference work, even with FM10) - talks about using the SortOrderIX entry on the reference page to spell out the order of what you want sorted - replace the building blocks with the sort order you want to use. That might get around your problem. I think that the book is also available on the Scriptorium blog/wiki.
I will definitely check that out. We have books, unfortunately the newest version we have is 6.0 and I'm working with 10. So, it's not that helpful.
All right. If i use the SortOrderIX entry, could I tell it to make it think the number order is 1, 2, 3, 4, 5, 6, 7. 8. 9, 0, instead of 0. 1 - 9?
So my question should be as such, How can I change the character order of the <$numerics> tag? Or, is this even possible?
From what I was reading, it looks like you sub out the <$numerics> part with the numbers in the order you want - I've never played around with this stuff, so I can't help you much.
I created a new index marker and tested manually putting in zeroes, and this is what I got:
Chapter 1 - 01.1.1 5 5
Chapter 10 - 010.1.1 587 587
Chapter 2 - 02.1.1 105 105
Chapter 3 - 03.1.1 127 127
Chapter 4 - 04.1.1 181 181
Chapter 5 - 05.1.1 255 255
Chapter 6 - 06.2.1 379 379
Chapter 7 - 7.1.1 449 449
Chapter 8 - 8.1.1 539 539
Chapter 9 - 9.1.1 565 565
FM does not read the zero anyway. You can see that by looking at Chapters 7-9, I took out the 0 and they stayed at the end of the list.
I even tried <$1;2;3;4;5;6;7;8;9;0> instead of <$numerics> and they mean the same thing. It doesn't matter where I put the 0.
Any other ideas/thoughts?
I don't remember seeing that syntax being used - did you find the reference on the scriptorium wiki that I was talking about?
I did not. I did some minor searching. Could you maybe send me a link?
No, if you do it that way you should pad with zeroes only the single digits, so that every chapter has two digits: 01, 02, 03 … 08, 09, 10 11. That would sort properly.
But if you have so many to do it may be better to explore the ideas that Jeff is talking about. I remember doing something like that to index Cyrillic correctly before FrameMaker understood Unicode. Essentially you enter a chain of characters in the sort-order you want on the reference page. But I’m not sure it would work for 1 and 10, say.
Date: 29 March 2012 18:40
To: David Crowe
Re: FM 10 Index section numbering issue
created by emalie.whan in FrameMaker General Discussion - View the full discussion
You're right. I tried that couple hours after i submitted that post and found that it does work. Unfortunately, this happens so many times in the index and we can't leave the zeroes on the numbers. It gets tricky when getting into the Level2IX and so on...
I think what needs to be done is figure out what all of the "code" means on the reference page and find a way to re-sort the sort order. I might have to have one of our programmers create a program where we save the fm doc as an MIF, open the mif in the program, and that program tells the number 10 to go to the end of the list.
We'll see if it's possible. I don't want to give up on framemaker yet!
Somebody must have run across all this before - try searching the Framer's mailing list or asking there.
The way to handle the adjustment of the sort order for numerics was identified by David but there was one detail not specifically mentioned. In your Index markers, you have to add the leading zero-padded values so that all of your sections and sub-sections are at the same number of digits using the sort order modifier (value enclosed in square brackets), e.g. the entries in the Index marker should look like this:
6.4.14 445[06.04.14 445]
6.4.15 446[06.04.15 445]
6.4.8 439[06.04.08 439]
6.4.9 439[06.04.09 439]
This can readily be accomplished with a script to modify your existing Index markers using either FrameScript or Extendscript. No need to play with a MIF file after the fact - that is just asking for more trouble.
So, I tried adding the padded zeroes in brackets. It worked, but it didn't at the same time. Some of these have multiple index tags on them and some just have one (example below). Also, since i have added the zeroes, it sends them to a Numerics section, but they need to be in the C section (I'm glad I don't mean Caesarian section...) for Child Labor Laws.
Here is what I've generated, let me know what you think:
Child labor laws
*This is below the entire index, and here is where the padded zeroes get placed. I'm assuming they go here because of how FM reads numbers as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Child labor laws
Child labor laws
Any new ideas for me? I'm going to work on this until I figure it out, so hopefully I'll hear back from you (or anyone) as soon as possible.
Emalie – I think there are some basics you haven’t got the hang of:
Square brackets in entries are optional; if they don’t exist, it’s the ordinary, non-bracketed text, that is indexed.
if you do add square brackets to the index entry, the entry is considered in two parts.
- The text outside the brackets is what is printed in the index, i.e. what the reader will see.
- The text in the brackets is the sort order and does not appear in the visible entry.
It’s useful if you want to index St as Saint, for example: St Paul’s Cathedral[Saint Paul] would be indexed before Stepford; or to list names in firstname-surname order, but alphabetise them by surname, such as Tony Blair[Blair T], George W. Bush[Bush G], which would make an index in which Bush follows Blair, despite the fact that George would come before Tony.
Note that you don’t need to put the whole entry inside the brackets, just enough to make sure it sorts as you wish. The content is never seen by the reader.
Now that I see more of your index, I’m prompted to ask a more fundamental question. It’s there to guide the reader, and would normally contain terms that the reader is going to look up. Are entries such as 22.214.171.1245 meaningful to someone consulting your index? Forgive the interference, but do they need to be indexed at all?
I understand all of that. I literally copy and pasted Arnis' suggestion into the index marker. When I re-generate the Index, It takes it out of where it should be (under C) and puts it into a new category in the Index called "Numerics", which comes after Z. I even tried moving around the brackets and that made it significantly worse. I wish I could just give you a page of it and mess around with it, but I don't think that's possible.
As for the citations we'll go with your example of 6.4.13 445. 6.4.13 stands for the section number and 445 refers to the page it's on. This section is very important to the employer that wants to employ a minor and wants to read more about meal breaks. This specific section is titled "Meal Breaks for Minors".
The reason I'm having so many problems is because this is the first time we're putting this specific line of books into FrameMaker. Until now, I've been using InDesign and putting a 600 page book into InDesign is painful. I'm sure you'd agree.
To further answer your last paragraph, we publish over 75 safety and regulation books/handguides/training materials and this is how most to all of our indexes appear. I don't believe we've ever gotten a complaint on an index. I hope I answered your question fully.
If you have any ideas, I'd love to hear them.
So if you want 126.96.36.1995 to appear under C (presumably under Child labor laws) you need an index entry along these lines:
First-level entry: 188.8.131.525[child labor laws 06.04.013.445].
You appear to have at least two levels, so a second-level entry might be child labor laws;184.108.40.2065[06.04.013.445].
Or am I still misunderstanding?
We're totally going in the right direction. Except I think in this case, it would be 3 levels.
This is what I typed in originally (and this example sent it to the "Numerics" section after Z):
Child labor laws:Massachusetts:6.4.13[06.04.13 445]
So, if I"m understanding you correctly, it would have to be:
Child labor laws:Massachusetts:6.4.13[Child labor laws:Massachusetts:06.04.13 445]
By doing it this way, it will generate as what's before the brackets, but it will read what's inside of the brackets. i.e. your example with Tony Blair and George Bush.
Does that sound right?
Yes, that looks right. I mistakenly typed semi-colons in-between the levels, but you are right: they should be colons. And if your third numeric grouping (13) ever gets to three figures – in other contexts, of course – you should write it as 013.
What I am not sure of, and can’t check now because I don’t have FrameMaker here at home, is whether the square brackets “special sort order” applies to the whole entry, or only to the level in which they are used. In other words, does Child labor laws:Massachusetts:6.4.13[06.04.13 445] sort first by C, then by M and only then by 06 in the square brackets? If so, it might save you a bit of typing.
hmm. That's a good question. I want to say Yes to the sorting question. Because if it's not in there just perfectly, it will move it out of where it should be and put it at the end as a Numeric, which is not good.
Okay, so I put this "Child labor laws:Massachusetts:6.4.13[Child labor laws:Massachusetts:06.04.013 445]" into the index marker and it worked! However since 6.4.13 has 2 index markers attached, it's putting both of them in here, which is weird.
I'll try it for that whole section and get back to you. Thanks again for all of your help. I've defintely learned a lot from this and I still haven't figured out the main issue yet.
All right. That worked! The zeroes must be placed carefully.
6.4.8 should look like this (and any other single digit reference):
Child labor laws:Massachusetts:6.4.8[Child labor laws:Massachusetts:06.04.008 439]
6.4.15 should look like this (and any other 2-digit reference):
Child labor laws:Massachusetts:6.4.15[Child labor laws:Massachusetts:06.04.015 446]
Now is there some sort of script that can be written to tell FrameMaker to automatically do this everytime this happens? Or do I have to manually change these?