Indexing with Word is pretty good. You go to places in text that you want in the index, enter the text you want to appear in the index, push a button and shazam, an index, all alphabetical and formatted and everything.
But I had a strange problem. I was creating an index and some entries were missing. I went looking and realized they were in the index, but completely out of place. This is what the faulty index looks like when it’s generated by Word. Note the out of order entries in bold.
Floutet, Aima, 294
Floutetta. Vr Monthouz, Aima (dite la Floutetta)
Maître, Louise (fl. d’Ami, 111, 164, 176, 515
Dentrue, Jeanne (fl. d’Emery, 357
Folliet, Pierre, 27
After tearing my hair out for a while I noticed a clue. See it? I finally noticed that the parentheses weren’t closed on the out of order items. When I looked, I realized that the markup in the actual text, that is the entry that is supposed to end up in the index in the first case was
Maître, Louise (fl. d’Ami; fm. de J.-Ja. Bonivard)
If you try to index text with a semicolon in it, it truncates everything from the semicolon on (the text in bold), but it isn’t entirely discarded. Note in particular what it’s done: it is now indexed alphabetically according to the truncated text that is now invisible.
In other words, I tell it to index Maitre, Louise (fl. d’Ami; fm. de J.-Ja. Bonivard), which I expect to appear like that under Mai, but instead it appears as Maitre, Louise (fl. d’Ami and gets filed under Fm.
Thanks to Andy, after a decade, I know the solution: you just escape the semi-colon with a backslash and everything works exactly as expected. So in the example I gave, it would look like this
Maître, Louise (fl. d’Ami\; fm. de J.-Ja. Bonivard)
I marked up one index entry without escaping the semi-colon and one with (and added few random historical figures to establish alphabetical order) and got exactly the right result:
Adams, John Quincy, 1
Maître, Louise (fl. d’Ami, 1 << not escaped
Hamilton, Al, 1
Maître, Louise (fl. d’Ami; fm. de J.-Ja. Bonivard), 1 << escaped
Mitterand, Francois, 1
Valjean, Jean, 1