1MENDEX(1) General Commands Manual MENDEX(1)
2
3
4
6 mendex - Japanese index processor
7
9 mendex [-ilqrcgfEJSU] [-s sty] [-d dic] [-o ind] [-t log] [-p no] [-I
10 enc] [--help] [--] [ idx0 idx1 idx2 ...]
11
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 ), sorts the entries, and produces an output file which
16 can be formatted. It is almost compatible with makeindex, and addi‐
17 tional feature for handling readings of kanji words is also available.
18The formats of the input and output files are specified in a style file. The
19readings of kanji words can be specified in a dictionary file.
20The index can have up to three levels (0, 1, and 2) of subitem nesting.
21
23 -i Take input from stdin, even when index files are specified.
24
25 -l Set ´sort by character order´. By default, ´sort by word
26 order´ is used. Details are described below.
27
28 -q Quiet mode; send no message to stderr, except error messages
29 and warnings.
30
31 -r Disable implicit page range formation. By default, three or
32 more successive pages are automatically abbreviated as a
33 range (e.g. 1–5).
34
35 -c Compress sequence of intermediate blanks (space(s) and/or
36 tab(s)) into a space and ignore leading and trailing
37 blank(s). By default, blanks in the index key are retained.
38
39 -g Make Japanese index head A-line (A, Ka, Sa, ...) of the
40 gojuon table (Japanese syllabary). By default, all the char‐
41 acters in the gojuon table are used.
42
43 -f Force to output Kanji characters even non-existent in dictio‐
44 naries.
45
46 -s sty Employ sty as the style file.
47
48 -d dic Employ dic as the dictionary file. The dictionary file is
49 composed of lists of <index_word reading>.
50
51 -o ind Employ ind as the output index file. By default, the file
52 name is created by appending the extension ind to the base
53 name of the first input file.
54
55 -t log Employ log as the transcript file. By default, the file name
56 is created by appending the extension ilg to the base name of
57 the first input file.
58
59 -p no Set the starting page number of the output index list to be
60 no. The argument no may be numerical or one of the following:
61 any (the next page to the end of contents), odd (the next odd
62 page to the end of contents), even (the next even page to the
63 end of contents).
64
65 -E Set input/output kanji encoding to EUC-JP.
66
67 -J Set input/output kanji encoding to JIS (ISO-2022-JP).
68
69 -S Set input/output kanji encoding to Shift_JIS.
70
71 -U Set input/output kanji encoding to UTF-8.
72
73 -I enc Set internal encoding to enc. The argument enc may be euc
74 (EUC-JP) or utf8 (UTF-8). The normal default is set to euc,
75 but the default is changed to utf8 when the option -U is
76 specified explicitly.
77
78 --help Show summary of options.
79
80 -- Arguments after -- are not taken as options.
81
82
84 The style file informs mendex about the format of the idx input files
85 and the intended format of the final output file. The format is upper
86 compatible with the one for makeindex. The style file contains a list
87 of <specifier attribute> pairs. There are two types of specifiers:
88 input and output. Pairs do not have to appear in any particular order.
89 A line begun by ´%´ is a comment.
90
91
92 Input file style parameter
93
94 keyword <string> "\\indexentry"
95 Command with an argument of index entry.
96
97 arg_open <char> ´{´
98 Opening delimiter which shows the begin‐
99 ning of index entry.
100
101 arg_close <char> ´}´
102 Closing delimiter which shows the end of
103 index entry.
104
105 range_open <char> ´(´
106 Opening delimiter which shows the begin‐
107 ning of page range.
108
109 range_close <char> ´)´
110 Closing delimiter which shows the end of
111 page range.
112
113 level <char> ´!´
114 Delimiter which shows lower level.
115
116 actual <char> ´@´
117 Symbol which shows the next sequence is
118 to appear as index strings in the output
119 file.
120
121 encap <char> ´|´
122 Symbol which shows the next sequence is
123 to be used as command name attached to
124 the page number.
125
126 page_compositor <string> "-"
127 Separator between page levels for a style
128 with multi-levels of page numbers.
129
130 page_precedence <string> "rnaRA"
131 Priority of expression for page number.
132 ´R´ and ´r´ correspond to Roman. ´n´ cor‐
133 responds to arabic numeral. ´A´ and ´a´
134 correspond to Latin alphabet.
135
136 quote <char> ´"´
137 Escape character for mendex parameters.
138
139 escape <char> ´\\´
140 Escape character for general scripts.
141
142 Output file style parameter
143
144 preamble <string> "\\begin{theindex}\n"
145 Preamble of output file.
146
147 postamble <string> "\n\n\\end{theindex}\n"
148 Postamble of output file.
149
150 setpage_prefix <string> "\n \\setcounter{page}{"
151 Prefix of page number if start page is
152 designated.
153
154 setpage_suffix <string> "}\n"
155 Suffix of page number if start page is
156 designated.
157
158 group_skip <string> "\n\n \\indexspace\n"
159 Strings to insert vertical space before
160 new section of index.
161
162 lethead_prefix <string> ""
163 Prefix of heading for newly appeared
164 heading letter.
165
166 heading_prefix <string> ""
167 Same as lethead_prefix.
168
169 lethead_suffix <string> ""
170 Suffix of heading for newly appeared
171 heading letter.
172
173 heading_suffix <string> ""
174 Same as lethead_suffix.
175
176 lethead_flag <string> 0
177 Flag to control output of heading let‐
178 ters. ´0´, ´1´ and ´-1´ respectively
179 denotes no output, uppercase and lower‐
180 case.
181
182 heading_flag <string> 0
183 Same as lethead_flag.
184
185 item_0 <string> "\n \\item "
186 Command sequence inserted between primary
187 level entries.
188
189 item_1 <string> "\n \\subitem "
190 Command sequence inserted between sub
191 level entries.
192
193 item_2 <string> "\n \\subsubitem "
194 Command sequence inserted between subsub
195 level entries.
196
197 item_01 <string> "\n \\subitem "
198 Command sequence inserted between primaly
199 and sub level entries.
200
201 item_x1 <string> "\n \\subitem "
202 Command sequence inserted between primary
203 and sub level entries when main entry
204 does not have page number.
205
206 item_12 <string> "\n \\subsubitem "
207 Command sequence inserted between sub and
208 subsub level entries.
209
210 item_x2 <string> "\n \\subsubitem "
211 Command sequence inserted between sub and
212 subsub level entries when sub level entry
213 does not have page number.
214
215 delim_0 <string> ", "
216 Delimiter string between primary level
217 entry and first page number.
218
219 delim_1 <string> ", "
220 Delimiter string between sub level entry
221 and first page number.
222
223 delim_2 <string> ", "
224 Delimiter string between subsub level
225 entry and first page number.
226
227 delim_n <string> ", "
228 Delimiter string between page numbers
229 commonly used for any entry level.
230
231 delim_r <string> "--"
232 Delimiter string between pages to show
233 page range.
234
235 delim_t <string> ""
236 Delimiter string output at the end of
237 page number list.
238
239 suffix_2p <string> ""
240 String to be inserted in place of delim_n
241 and the next page number when the two
242 pages are contiguous.
243 It works only when the parameter is defined.
244
245 suffix_3p <string> ""
246 String to be inserted in place of delim_r
247 and the last page number when the three
248 pages are contiguous. The parameter is
249 prior to suffix_mp.
250 It works only when the parameter is defined.
251
252 suffix_mp <string> ""
253 String to be inserted in place of delim_r
254 and the last page number when the three
255 or more pages are contiguous.
256 It works only when the parameter is defined.
257
258 encap_prefix <string> "\\"
259 Prefix for an encapsulating command when
260 the encapsulating command is added to the
261 page number.
262
263 encap_infix <string> "{"
264 Prefix just before the page number when
265 the encapsulating command is added to the
266 page number.
267
268 encap_suffix <string> "}".
269 Suffix after the page number when the
270 encapsulating command is added to the
271 page number.
272
273 line_max <number> 72
274 Maximum number of one line. If exceed
275 the number, lines are folded.
276
277 indent_space <string> ""
278 Space for indent which inserted to top of
279 folded line.
280
281 indent_length <number> 16
282 Length of space for indent which inserted
283 to top of folded line.
284
285 symhead_positive <string> "Symbols"
286 Strings to output as heading letter for
287 numbers and symbols when lethead_flag or
288 heading_flag is positive number.
289
290 symhead_negative <string> "symbols"
291 Strings to output as heading letter for
292 numbers and symbols when lethead_flag or
293 heading_flag is negative number.
294
295 symbol <string> ""
296 Strings to output as heading letter for
297 numbers and symbols when symbol_flag is
298 non zero.
299 If specified, the option is prior to symhead_positive and symhead_nega‐
300 tive. (Extended by mendex)
301
302 symbol_flag <number> 1
303 Flag to output of symbol. If ´0´, do not
304 output. (Extended by mendex)
305
306 letter_head <number> 1
307 Flag of heading letter for Japanese Kana.
308 If ´1´ and ´2´, Katakana and Hiragana is
309 used, respectively. (Extended by mendex)
310
311 priority <number> 0
312 Flag of sorting method for index words
313 composed of Japanese and non-Japanese
314 (ex. Latin scripts). If non zero, one
315 space (U+20) is inserted between Japanese
316 sequence and non-Japanese sequence in
317 sorting procedure. (Extended by mendex)
318
319 character_order <string> "SEJ"
320 Order of scripts and symbols. ´S´, ´E´
321 and ´J´ respectively denotes symbol, Eng‐
322 lish and Japanese. (Extended by mendex)
323
325 mendex has an additional feature to simplify the procedure of handling
326 Japanese indexes, compared to makeindex. Users can save the effort of
327 manually specifying a reading for every kanji word.
328 Japanese kanji words are usually sorted by the syllables of their read‐
329 ings (´Yomi´), which can be represented by kana (Hiragana, Katakana)
330 scripts. mendex accepts index words specified in kana expression
331 directly on an input file, and also accepts conversion from index words
332 to kana scripts by referring to Japanese dictionaries.
333
334
335 Examples of internal simplification of syllables are shown below.
336
337 かぶしきがいしゃ かふしきかいしや
338 マッキントッシュ まつきんとつしゆ
339 ワープロ わあふろ
340
341 The dictionary file consists of list with <´index_word´ ´reading´>.
342 The index word can be written in any scripts (kanji, kana, etc), and
343 the reading must be in Hiragana or Katakana scripts. The delimiter
344 between the index word and its reading is one or more tab(s) or
345 space(s).
346 An example of a Japanese dictionary is shown below.
347
348 漢字 かんじ
349 読み よみ
350 環境 かんきょう
351 α アルファ
352
353 Here, each index word is allowed to have only one Yomi. Though some
354 kanji words (ex. 「表」) may have more than one Yomi´s (ex. 「ひょう」
355 and 「おもて」), only one of them can be registered in the dictionary.
356 When some different Yomi´s are needed, they should be specified explic‐
357 itly in kana expression (ex. \index{ひょう@表} or \index{おもて@表}) on
358 the input file.
359 Moreover, a dictionary file is automatically referred by setting the
360 file name at an environment variable INDEXDEFAULTDICTIONARY. The dic‐
361 tionary set by the environment variable can be used together with
362 file(s) specified by -d option.
363
365 mendex sorts indexes as is (´sort by word order´) by default. Setting
366 -l option, spaces between words in an index are truncated prior to
367 sorting procedure (´sort by character order´).
368 Even when sort by character order, the index at output remains the
369 original sequence without the truncation.
370 Follows show an example.
371
372 sort by word order sort by character order
373 X Window Xlib
374 Xlib XView
375 XView X Window
376
377 In addition, two sorting methods can be applied for indexes which con‐
378 tains both Japanese kana and other scripts (e.g. Latin script). By
379 setting priority 0 (default) and 1 at a style file, a space between Ja‐
380 panese Kana and other scripts is inserted and not inserted respec‐
381 tively, prior to the sorting procedure.
382 Follows show an example.
383
384 priority=0 priority=1
385 index sort indファイル
386 indファイル index sort
387
389 mendex refers environment variables as follows.
390
391 INDEXSTYLE
392 Directory where index style files exist.
393
394 INDEXDEFAULTSTYLE
395 Index style file to be referred to as default.
396
397 INDEXDICTIONARY
398 Directory where dictionary files exist.
399
400 INDEXDEFAULTDICTIONARY
401 Dictionary file which is automatically read.
402
404 Detailed specification is compatible with makeindex.
405
407 When plural page number expression is used, .idx files should be speci‐
408 fied along with the order of page numbers. Otherwise, wrong page num‐
409 bers might be output.
410
412 tex(1), latex(1), makeindex(1)
413
415 This manual page was written by Japanese Development Community.
416
417
418
419 MENDEX(1)