1MENDEX(1)                   General Commands Manual                  MENDEX(1)
2
3
4

NAME

6       mendex - Japanese index processor
7

SYNOPSIS

9       mendex  [-ilqrcgfEJSU]  [-s sty] [-d dic] [-o ind] [-t log] [-p no] [-I
10       enc] [--help] [--] [ idx0 idx1 idx2 ...]
11

DESCRIPTION

13       The program mendex is a general purpose hierarchical  index  generator;
14       it accepts one or more input files (.idx; often produced by a text for‐
15       matter such as LaTeX), sorts the entries, and produces an  output  file
16       which can be formatted. It is almost compatible with makeindex, and ad‐
17       ditional feature for handling readings of kanji words  is  also  avail‐
18       able.
19       The  formats  of  the  input  and output files are specified in a style
20       file.  The readings of kanji words can be  specified  in  a  dictionary
21       file.
22       The index can have up to three levels (0, 1, and 2) of subitem nesting.
23

OPTIONS

25       -i        Take input from stdin, even when index files are specified.
26
27       -l        Set  ´sort by character order´. By default, ´sort by word or‐
28                 der´ is used.  Details are described below.
29
30       -q        Quiet mode; send no message to stderr, except error  messages
31                 and warnings.
32
33       -r        Disable  implicit  page range formation. By default, three or
34                 more successive pages  are  automatically  abbreviated  as  a
35                 range (e.g. 1–5).
36
37       -c        Compress  sequence  of  intermediate  blanks (space(s) and/or
38                 tab(s))  into  a  space  and  ignore  leading  and   trailing
39                 blank(s).  By default, blanks in the index key are retained.
40
41       -g        Make  Japanese  index head A-line (A, Ka, Sa, ...; 10 charac‐
42                 ters) of the gojuon table (Japanese syllabary).  By  default,
43                 all 48 characters in the gojuon table are used.
44
45       -f        Force to output Kanji characters even non-existent in dictio‐
46                 naries.
47
48       -s sty    Employ sty as the style file.
49
50       -d dic    Employ dic as the dictionary file.  The  dictionary  file  is
51                 composed of lists of <index_word reading>.
52
53       -o ind    Employ  ind  as  the  output index file. By default, the file
54                 name is created by appending the extension ind  to  the  base
55                 name of the first input file.
56
57       -t log    Employ  log as the transcript file. By default, the file name
58                 is created by appending the extension ilg to the base name of
59                 the first input file.
60
61       -p no     Set  the  starting page number of the output index list to be
62                 no. The argument no may be numerical or one of the following:
63                 any (the next page to the end of contents), odd (the next odd
64                 page to the end of contents), even (the next even page to the
65                 end of contents).
66
67       -E        Set input/output character encoding to EUC-JP.
68
69       -J        Set input/output character encoding to JIS (ISO-2022-JP).
70
71       -S        Set input/output character encoding to Shift_JIS.
72
73       -U        Set input/output character encoding to UTF-8.
74
75       -I enc    Set  internal character encoding to enc. The argument enc may
76                 be euc (EUC-JP) or utf8 (UTF-8).  The default is set to utf8.
77
78       --help    Show summary of options.
79
80       --        Arguments after -- are not taken as options.  This is  useful
81                 when the input file name starts with '-'.
82
83

STYLE FILE

85       The  style  file informs mendex about the format of the idx input files
86       and the intended format of the final output file. The format  is  upper
87       compatible  with  the one for makeindex. The style file contains a list
88       of <specifier attribute> pairs.  There are two types of specifiers: in‐
89       put  and  output.  Pairs do not have to appear in any particular order.
90       A line begun by ´%´ is a comment.
91
92
93       Input file style parameter
94
95       keyword  <string>             "\\indexentry"
96                                     Command with an argument of  index  entry
97                                     which is going to be processed.
98
99       arg_open  <char>              ´{´
100                                     Opening  delimiter which shows the begin‐
101                                     ning of index entry.
102
103       arg_close  <char>             ´}´
104                                     Closing delimiter which shows the end  of
105                                     index entry.
106
107       range_open  <char>            ´(´
108                                     Opening  delimiter which shows the begin‐
109                                     ning of page range.
110
111       range_close  <char>           ´)´
112                                     Closing delimiter which shows the end  of
113                                     page range.
114
115       level  <char>                 ´!´
116                                     Delimiter which shows lower level.
117
118       actual  <char>                ´@´
119                                     Symbol  which  shows the next sequence is
120                                     to appear as index strings in the  output
121                                     file.
122
123       encap  <char>                 ´|´
124                                     Symbol  which  shows the next sequence is
125                                     to be used as command  name  attached  to
126                                     the page number.
127
128       page_compositor  <string>     "-"
129                                     Separator between page levels for a style
130                                     with multi-levels of page numbers.
131
132       page_precedence  <string>     "rnaRA"
133                                     Priority of expression for  page  number.
134                                     ´R´ and ´r´ correspond to Roman. ´n´ cor‐
135                                     responds to arabic numeral.  ´A´ and  ´a´
136                                     correspond to Latin alphabet.
137
138       quote  <char>                 ´"´
139                                     Escape character for mendex parameters.
140
141       escape  <char>                ´\\´
142                                     Escape character for general scripts.
143
144       Output file style parameter
145
146       preamble  <string>            "\\begin{theindex}\n"
147                                     Preamble of output file.
148
149       postamble  <string>           "\n\n\\end{theindex}\n"
150                                     Postamble of output file.
151
152       setpage_prefix  <string>      "\n  \\setcounter{page}{"
153                                     Prefix  of  page  number if start page is
154                                     designated.
155
156       setpage_suffix  <string>      "}\n"
157                                     Suffix of page number if  start  page  is
158                                     designated.
159
160       group_skip  <string>          "\n\n  \\indexspace\n"
161                                     Strings  to  insert vertical space before
162                                     new section of index.
163
164       lethead_prefix  <string>      ""
165                                     Prefix  of  heading  for  newly  appeared
166                                     heading letter.
167
168       heading_prefix  <string>      ""
169                                     Same  as lethead_prefix. (compatible with
170                                     makeindex)
171
172       lethead_suffix  <string>      ""
173                                     Suffix  of  heading  for  newly  appeared
174                                     heading letter.
175
176       heading_suffix  <string>      ""
177                                     Same  as lethead_suffix. (compatible with
178                                     makeindex)
179
180       lethead_flag  <number>        0
181                                     Flag to control output  of  heading  let‐
182                                     ters.  ´0´, ´1´ and ´-1´ respectively de‐
183                                     notes no output, uppercase and lowercase.
184
185       heading_flag  <number>        0
186                                     Same as  lethead_flag.  (Note:  makeindex
187                                     uses a different name headings_flag)
188
189       item_0  <string>              "\n  \\item "
190                                     Command sequence inserted between primary
191                                     level entries.
192
193       item_1  <string>              "\n     \\subitem "
194                                     Command  sequence  inserted  between  sub
195                                     level entries.
196
197       item_2  <string>              "\n       \\subsubitem "
198                                     Command  sequence inserted between subsub
199                                     level entries.
200
201       item_01  <string>             "\n    \\subitem "
202                                     Command sequence inserted between primaly
203                                     and sub level entries.
204
205       item_x1  <string>             "\n    \\subitem "
206                                     Command sequence inserted between primary
207                                     and sub level  entries  when  main  entry
208                                     does not have page number.
209
210       item_12  <string>             "\n    \\subsubitem "
211                                     Command sequence inserted between sub and
212                                     subsub level entries.
213
214       item_x2  <string>             "\n    \\subsubitem "
215                                     Command sequence inserted between sub and
216                                     subsub level entries when sub level entry
217                                     does not have page number.
218
219       delim_0  <string>             ", "
220                                     Delimiter string  between  primary  level
221                                     entry and first page number.
222
223       delim_1  <string>             ", "
224                                     Delimiter  string between sub level entry
225                                     and first page number.
226
227       delim_2  <string>             ", "
228                                     Delimiter string between subsub level en‐
229                                     try and first page number.
230
231       delim_n  <string>             ", "
232                                     Delimiter  string  between  page  numbers
233                                     commonly used for any entry level.
234
235       delim_r  <string>             "--"
236                                     Delimiter string between  pages  to  show
237                                     page range.
238
239       delim_t  <string>             ""
240                                     Delimiter  string  output  at  the end of
241                                     page number list.
242
243       suffix_2p  <string>           ""
244                                     String to be inserted in place of delim_n
245                                     and  the  next  page  number when the two
246                                     pages are contiguous.
247       It works only when the parameter is defined.
248
249       suffix_3p  <string>           ""
250                                     String to be inserted in place of delim_r
251                                     and  the third page number when the three
252                                     pages are contiguous.  The  parameter  is
253                                     prior to suffix_mp.
254       It works only when the parameter is defined.
255
256       suffix_mp  <string>           ""
257                                     String to be inserted in place of delim_r
258                                     and the last page number when  the  three
259                                     or more pages are contiguous.
260       It works only when the parameter is defined.
261
262       encap_prefix  <string>        "\\"
263                                     Prefix  for an encapsulating command when
264                                     the encapsulating command is added to the
265                                     page number.
266
267       encap_infix  <string>         "{"
268                                     Prefix  just  before the page number when
269                                     the encapsulating command is added to the
270                                     page number.
271
272       encap_suffix  <string>        "}".
273                                     Suffix after the page number when the en‐
274                                     capsulating command is added to the  page
275                                     number.
276
277       line_max  <number>            72
278                                     Maximum  number  of  one line.  If exceed
279                                     the number, lines are folded.
280
281       indent_space  <string>        ""
282                                     Space for indent which inserted to top of
283                                     folded line.
284
285       indent_length  <number>       16
286                                     Length of space for indent which inserted
287                                     to top of folded line.
288
289       symhead_positive  <string>    "Symbols"
290                                     Strings to output as heading  letter  for
291                                     numbers  and symbols when lethead_flag or
292                                     heading_flag is positive number.
293
294       symhead_negative  <string>    "symbols"
295                                     Strings to output as heading  letter  for
296                                     numbers  and symbols when lethead_flag or
297                                     heading_flag is negative number.
298
299       symbol  <string>              ""
300                                     Strings to output as heading  letter  for
301                                     numbers  and  symbols when symbol_flag is
302                                     non zero.
303       If specified, the option is prior to symhead_positive and symhead_nega‐
304       tive.  (Extended by mendex)
305
306       symbol_flag  <number>         1
307                                     Flag  to output of symbol. If ´0´, do not
308                                     output.  (Extended by mendex)
309
310       letter_head  <number>         1
311                                     Flag of heading letter for Japanese Kana.
312                                     If  ´1´ and ´2´, Katakana and Hiragana is
313                                     used, respectively.  (Extended by mendex)
314
315       priority  <number>            0
316                                     Flag of sorting method  for  index  words
317                                     composed  of  Japanese  and  non-Japanese
318                                     (ex. Latin scripts).  If  non  zero,  one
319                                     space (U+20) is inserted between Japanese
320                                     sequence  and  non-Japanese  sequence  in
321                                     sorting procedure.  (Extended by mendex)
322
323       character_order  <string>     "SNEJ"
324                                     Order  of scripts and symbols.  ´S´, ´N´,
325                                     ´E´ and ´J´ respectively denotes  symbol,
326                                     numbers, English and Japanese.  (Extended
327                                     by mendex) Please make sure that ´S´  and
328                                     ´N´  are next to each other, since mendex
329                                     considers numbers as part of symbol.
330

ABOUT JAPANESE PROCESSING

332       mendex has an additional feature to simplify the procedure of  handling
333       Japanese  indexes,  compared to makeindex. Users can save the effort of
334       manually specifying a reading for every kanji word.
335       Japanese kanji words are usually sorted by the syllables of their read‐
336       ings  (´Yomi´),  which  can be represented by kana (Hiragana, Katakana)
337       scripts.  mendex accepts index words specified in kana  expression  di‐
338       rectly  on  an input file, and also accepts conversion from index words
339       to kana scripts by referring to Japanese dictionaries.
340
341
342       Examples of internal simplification of syllables are shown below.
343
344              かぶしきがいしゃ         かふしきかいしや
345              マッキントッシュ         まつきんとつしゆ
346              ワープロ            わあふろ
347
348       The dictionary file consists of  list  with  <´index_word´  ´reading´>.
349       The  index  word  can be written in any scripts (kanji, kana, etc), and
350       the reading must be in Hiragana or Katakana scripts.  The delimiter be‐
351       tween the index word and its reading is one or more tab(s) or space(s).
352       An example of a Japanese dictionary is shown below.
353
354              漢字      かんじ
355              読み      よみ
356              環境      かんきょう
357              α         アルファ
358
359       Here,  each  index  word is allowed to have only one Yomi.  Though some
360       kanji words (ex. 「表」) may have more than one Yomi´s (ex.  「ひょう」
361       and  「おもて」), only one of them can be registered in the dictionary.
362       When some different Yomi´s are needed, they should be specified explic‐
363       itly in kana expression (ex. \index{ひょう@表} or \index{おもて@表}) on
364       the input file.
365       Moreover, a dictionary file is automatically referred  by  setting  the
366       file  name at an environment variable INDEXDEFAULTDICTIONARY.  The dic‐
367       tionary set by the environment  variable  can  be  used  together  with
368       file(s) specified by -d option.
369

ABOUT SORTING PROCEDURE

371       mendex  sorts indexes as is (´sort by word order´) by default.  Setting
372       -l option, spaces between words in an  index  are  truncated  prior  to
373       sorting procedure (´sort by character order´).
374       Even  when  sort  by  character  order, the index at output remains the
375       original sequence without the truncation.
376       Follows show an example.
377
378              sort by word order       sort by character order
379              X Window            Xlib
380              Xlib                XView
381              XView                    X Window
382
383       In addition, two sorting methods can be applied for indexes which  con‐
384       tains  both  Japanese  kana  and other scripts (e.g. Latin script).  By
385       setting priority 0 (default) and 1 at a style file, a space between Ja‐
386       panese  Kana  and  other  scripts  is inserted and not inserted respec‐
387       tively, prior to the sorting procedure.
388       Follows show an example.
389
390              priority=0               priority=1
391              index sort               indファイル
392              indファイル              index sort
393

ENVIRONMENT VARIABLES

395       mendex refers environment variables as follows.
396
397       INDEXSTYLE
398                 Directory where index style files exist.
399
400       INDEXDEFAULTSTYLE
401                 Index style file to be referred to as default.
402
403       INDEXDICTIONARY
404                 Directory where dictionary files exist.
405
406       INDEXDEFAULTDICTIONARY
407                 Dictionary file which is automatically read.
408

DETAIL

410       Detailed specification is compatible with makeindex.
411

KNOWN ISSUES

413       When plural page number expression is used, .idx files should be speci‐
414       fied  along  with the order of page numbers. Otherwise, wrong page num‐
415       bers might be output.
416

SEE ALSO

418       tex(1), latex(1), makeindex(1)
419

AUTHOR

421       This manual page was written by Japanese TeX Development Community.
422
423
424
425                                                                     MENDEX(1)
Impressum