Index sort order

Learn how you can work with index sort order, sort by letters and characters, and specify the sort order for Japanese in FrameMaker.

In this topic

Introduction

Indexes are sorted so that special symbols appear first, numbers appear second, and alphabetic characters appear last. By default, a few punctuation characters are ignored in sorting, and alphabetic characters appear in the correct sort order for the English language.

Note: When generating indexes in multilingual documents, symbols sort based on the Unicode Collation Algorithm (UCA) of the Unicode text encoding standard.

Specify sort order for an index entry

You can change where an entry appears in the index by specifying a sort order. For example, even though 486 would normally appear with other numbers in the index, you may want it to appear under F (as if it were spelled out as four eighty-six). Similarly, if you’re using a See also cross-reference in a subentry, you can ensure that it is the last one under the main entry.

Add text between brackets ([ and ]) at the end of the marker text, indicating exactly how you want the entry sorted.

Index marker text

Result in index

Explanation

1950s[Nineteen fifties]

Neap tides 47

1950s 10

North America 21

Sorts under N (for Nineteen fifties)

Erosion:of soil

[Erosion:soil]

Erosion

rate 32

 of soil 10

Ignores the word of

<$nopage>Erosion:

see also Wind

[Erosion:aaa]

Erosion

see also Wind

 rate  16

Sorts as the first entry under Erosion

<$nopage>Erosion:

See also Wind

[Erosion:zzz]

Erosion

 rate  16

See also Wind

Sorts as the last entry under Erosion

Note: The sorting information, in brackets, must be the last item in the marker text.

Specify sort order for an index

You change the sort order by specifying a sort order and by editing the contents of the IgnoreCharsIX and the SortOrderIX paragraphs in the IX text flow of the IX reference page.

The SortOrderIX paragraph in the special text flow contains building blocks that control how characters are sorted in an index.

Figure 1. SortOrderIX paragraph
Specifying sort order foranindex using SortOrderIX paragraph

Each sort order building block represents several characters in a particular order. The following table shows the order for U.S. English. The alphabetic sort order differs slightly for other languages.

Building block

Characters, in this order

<$numerics>

0 1 2 3 4 5 6 7 8 9

<$alphabetics>

A Á  À  Â  Ä  Ã  Å  a á  à  â  ä  ã  å  ª  B b C Ç  c ç  D d E É  È  Ê  Ë  e é  è  ê  ë  F f ƒ  Gg H h I Í  Ì  Î  Ï  i ì  í  î  ï  J j K k L l M m N Ñ  n ñ  O Ó  Ò  Ô  Ö  Õ  Ø  o ó  ò  ô  ö  õ  ø  º  P p Q q R r S s T t U Ú  Ù  Û  Ü  u ú  ù  û  ü  V v W w X x Y Ÿ  y ÿ  Z z

<$symbols>

All other characters in ASCII order

  1. Choose View > Reference Pages, and display the reference page that contains the special text flow for the index.

  2. Replace a building block in the SortOrderIX paragraph with the specific characters in the order you want them sorted.

Follow these rules when entering a new sort order:

Sort letter by letter instead of word by word

To sort an index letter by letter instead of word by word:

  1. Choose View > Reference Pages, and display the reference page that contains the IX text flow for the index.

  2. Add a space at the beginning of the IgnoreCharsIX paragraph in the IX text flow of the IX reference page.

    Sorted letter by letter

    Sorted word by word

    Seabed

    Sea level

    Seasonal change

    Sea walls

    Sea level

    Sea walls

    Seabed

    Seasonal change

Specify characters to ignore

By default, FrameMaker ignores hyphens, nonbreaking hyphens, en dashes, and em dashes when sorting index entries: -_–—

You can specify other characters to be ignored—for example, comma, period, bracket, braces, quotation and exclamation marks, currency symbols, and other characters:

-_–—,.()[]{}$?!"

To specify the characters to ignore while generating an index:

  1. Choose View > Reference Pages, and display the IX reference page that contains the IX text flow for the index.

  2. Edit the IgnoreCharsIX paragraph.

Note: If you’re working with Japanese fonts, you may want to include the Chouon character Chouoncharacter in the IgnoreCharsIX paragraph. The Chouon character is normally used in Japanese to lengthen the vowel sound that it follows, but you probably won’t want it to affect the sort order.

Sort symbols, numbers, or other characters in another location in an index

To sort symbols, numbers, or other characters in another location in an index:

  1. Choose View > Reference Pages, and display the reference page that contains the special text flow for the index.

  2. Rearrange the building blocks in the SortOrderIX paragraph in the special text flow. For example, to put symbols at the end of an English-language index instead of at the beginning, arrange the building blocks as follows: <$numerics><$alphabetics><$symbols>

Specify the sort order for Japanese

Kanji characters always need a special sort order defined.

A document that uses Japanese fonts includes the <$kana> building block, which controls sorting of Japanese kana (hiragana and katakana).

Building block

Characters, in this order

<$kana>


Specifyingthesort order for Japanese

Single-byte (half-width) katakana are converted to double-byte katakana in the generated file when sorted. The sort order of kanji is determined by its kana pronunciation (yomigana). Because of this, the <$kana> building block also controls how most kanji sort.

The sort order of kanji without yomigana and of Japanese symbols (double-byte numerics and Roman alphabetics) is not included by default in the <$kana> building block. Instead, kanji is sorted by code value and appended after characters sorted by <$kana>.

If you want to sort kanji without yomigana and Japanese symbols differently, add these characters to the <$numerics>, <$alphabetics>, or <$kana> building blocks. For example, double-byte Japanese characters could be added to the <$symbols> building block.

Enter its pronunciation (yomigana) in brackets in the marker text. (Double-byte bracket characters may be used.)

Figure 2. Sort order for kanji index entry
Sort order for kanji index entry