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
17       additional feature for handling readings of kanji words is also  avail‐
18       able.
19The  formats of the input and output files are specified in a style file.  The
20readings of kanji words can be specified in a dictionary file.
21The index can have up to three levels (0, 1, and 2) of subitem nesting.
22

OPTIONS

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

STYLE FILE

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

ABOUT JAPANESE PROCESSING

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

ABOUT SORTING PROCEDURE

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

ENVIRONMENT VARIABLES

388       mendex refers environment variables as follows.
389
390       INDEXSTYLE
391                 Directory where index style files exist.
392
393       INDEXDEFAULTSTYLE
394                 Index style file to be referred to as default.
395
396       INDEXDICTIONARY
397                 Directory where dictionary files exist.
398
399       INDEXDEFAULTDICTIONARY
400                 Dictionary file which is automatically read.
401

DETAIL

403       Detailed specification is compatible with makeindex.
404

KNOWN ISSUES

406       When plural page number expression is used, .idx files should be speci‐
407       fied along with the order of page numbers. Otherwise, wrong  page  num‐
408       bers might be output.
409

SEE ALSO

411       tex(1), latex(1), makeindex(1)
412

AUTHOR

414       This manual page was written by Japanese TeX Development Community.
415
416
417
418                                                                     MENDEX(1)
Impressum