UPMENDEX(1)
๐ upmendex(1) โ General Commands Manual ๐
โจ NAME โจ
upmendex โ the multilingual index processor, bestie. Thatโs literally the whole name, and honestly? Iconic.
๐ SYNOPSIS ๐
upmendex [-ilqrcgf] [-s sty] [-d dic] [-o ind] [-t log] [-p no] [--] [
idx0 idx1 idx2 ...]
upmendex --help
upmendex --version
๐ฆ DESCRIPTION ๐ฆ
Okay so upmendex is a general purpose multilingual hierarchical index generator, and it works with upLaTeX, XeLaTeX, and LuaLaTeX. It accepts one or more input files (.idx; often produced by a text formatter such as LaTeX families), sorts the entries, and produces an output file which can be formatted. Main character energy, fr fr.
It supports Latin (including non-English), Greek, Cyrillic, Korean Hangul, and Han (Hanzi ideographs) scripts, as well as Japanese Kana. Sheโs multilingual and she ate.
It also experimentally supports Brahmic scripts โ Bengali, Devanagari, Gurmukhi, Gujarati, Kannada, Lao, Malayalam, Oriya, Sinhala, Tamil, Telugu, Thai โ plus Arabic and Hebrew scripts. Experimental means experimental, bestie; donโt act surprised if itโs giving โweโre still testing.โ
It is almost compatible with makeindex and mendex, and an additional feature for handling readings of kanji words is also available. The formats of the input and output files are specified in a style file. The readings of kanji words can be specified in a dictionary file. The index can have up to five levels (0, 1, 2, 3, and 4) of subitem nesting. Five levels. Thatโs not a drill.
๐ OPTIONS ๐
-iโ take input fromstdin, even when index files are specified. Yes, she can read from the group chat directly.-lโ setsort by character order. By default,sort by word orderis used. Details are described below. Iykyk.-qโ quiet mode: send no message tostderr, except error messages and warnings. Lowkey the โplease stop yellingโ flag.-rโ disable implicit page range formation. By default, three or more successive pages are automatically abbreviated as a range (e.g.1โ5). So-ris the โleave my pages aloneโ option.-cโ compress sequence of intermediate blanks (space(s) and/or tab(s)) into a space, and ignore leading and trailing blank(s). By default, blanks in the index key are retained. Tiny cleanup, huge slay.-gโ make Japanese index head A-line (A,Ka,Sa, ...; 10 characters) of thegojuontable (Japanese syllabary). By default, all48characters in thegojuontable are used. Periodt.-fโ force to output characters even if the scripts are not supported byupmendex. Bold. Chaotic. Use with intention.-sstyโ employstyas the style file.-ddicโ employdicas the dictionary file. The dictionary file is composed of lists of<index_word reading>.-oindโ employindas the output index file. By default, the file name is created by appending the extensionindto the base name of the first input file.-tlogโ employlogas the transcript file. By default, the file name is created by appending the extensionilgto the base name of the first input file.-pnoโ set the starting page number of the output index list to beno. The argumentnomay be numerical or one of the following:any(the next page to the end of contents),odd(the next odd page to the end of contents),even(the next even page to the end of contents).--helpโ show summary of options and exit.--versionโ show version information and exit.--โ arguments after--are not taken as options. This is useful when the input file name starts with-.
๐ STYLE FILE ๐
The style file informs upmendex about the format of the idx input files and the intended format of the final output file. The format is upper compatible with the one for makeindex and mendex. The style file contains a list of <specifier attribute> pairs. There are two types of specifiers: input and output. Pairs do not have to appear in any particular order. A line begun by % is a comment.
๐ธ Input file style parameter ๐ธ
keyword<string>โ default:"\\indexentry". Command with an argument of index entry which is going to be processed.arg_open<char>โ default:{. Opening delimiter which shows the beginning of index entry.arg_close<char>โ default:}. Closing delimiter which shows the end of index entry.range_open<char>โ default:(. Opening delimiter which shows the beginning of page range.range_close<char>โ default:). Closing delimiter which shows the end of page range.level<char>โ default:!. Delimiter which shows lower level.actual<char>โ default:@. Symbol which shows the next sequence is to appear as index strings in the output file.encap<char>โ default:|. Symbol which shows the next sequence is to be used as command name attached to the page number.page_compositor<string>โ default:"-". Separator between page levels for a style with multi-levels of page numbers.page_precedence<string>โ default:"rnaRA". Priority of expression for page number.Randrcorrespond to Roman.ncorresponds to arabic numeral.Aandacorrespond to Latin alphabet.quote<char>โ default:". Escape character forupmendexparameters.escape<char>โ default:\\. Escape character for general scripts.
๐ Output file style parameter ๐
preamble<string>โ default:"\\begin{theindex}\n". Preamble of output file.postamble<string>โ default:"\n\n\\end{theindex}\n". Postamble of output file.setpage_prefix<string>โ default:"\n \\setcounter{page}{". Prefix of page number if start page is designated.setpage_suffix<string>โ default:"}\n". Suffix of page number if start page is designated.group_skip<string>โ default:"\n\n \\indexspace\n". Strings to insert vertical space before new section of index.lethead_prefix<string>โ default:"". Prefix of heading for newly appeared heading letter.heading_prefix<string>โ default:"". Same aslethead_prefix. (compatible withmakeindex)lethead_suffix<string>โ default:"". Suffix of heading for newly appeared heading letter.heading_suffix<string>โ default:"". Same aslethead_suffix. (compatible withmakeindex)lethead_flag<number>โ default:0. Flag to control output of heading letters in Latin, Greek and Cyrillic scripts.0,1,-1and2respectively denotes no output, uppercase, lowercase and titlecase.heading_flag<number>โ default:0. Same aslethead_flag. (Note:makeindexuses a different nameheadings_flag)headings_flag<number>โ default:0. Same aslethead_flag. (compatible withmakeindex)script_head<string 1><string 2>โ default:"(standard heading characters)". Heading characters of script specified bystring 2. One of script names must be specified instring 1:kana,hangul,hanzi,devanagari,bengali,gurmukhi,gujarati,oriya,tamil,telugu,kannada,malayalam,sinhala,thai, orlao. (Extended byupmendex)kana_head<string>โ default:"". Heading characters of Kana specified by a string. By default, it is controlled byletter_headand command line option-g. (Extended byupmendex)hangul_head<string>โ default:"ใฑใดใทในใ ใ ใ ใ ใ ใ ใ ใ ใ ใ ". Heading characters of Hangul specified by a string. (Extended byupmendex)hanzi_head<string>โ default:"". Heading strings of hanzi (Kanji, Hanja) specified by a string, which is concatenated of items with a separator;. (Extended byupmendex)devanagari_head<string>โ default:"เคเค เคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเคเค เคกเคขเคฃเคคเคฅเคฆเคงเคจเคชเคซเคฌเคญเคฎเคฏเคฐเคฒเคณเคตเคถเคทเคธเคน". Heading characters of Devanagari specified by a string. (Experimental, Extended byupmendex)thai_head<string>โ default:"เธเธเธเธเธ เธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธเธ เธกเธขเธฃเธคเธฅเธฆเธงเธจเธฉเธชเธซเธฌเธญเธฎ". Heading characters of Thai script specified by a string. (Experimental, Extended byupmendex)item_0<string>โ default:"\n \\item ". Command sequence inserted between two primary, two secondary, etc. level entries.item_1<string>โ default:"\n \\subitem ". Command sequence inserted between two primary, two secondary, etc. level entries.item_2<string>โ default:"\n \\subsubitem ". Command sequence inserted between two primary, two secondary, etc. level entries.item_3<string>โ default:"\n \\subsubsubitem ". Command sequence inserted between two primary, two secondary, etc. level entries.item_4<string>โ default:"\n \\subsubsubsubitem ". Command sequence inserted between two primary, two secondary, etc. level entries.item_01<string>โ default:"\n \\subitem ".item_12<string>โ default:"\n \\subsubitem ".item_23<string>โ default:"\n \\subsubsubitem ".item_34<string>โ default"\n \\subsubsubsubitem "๐ธ this is the command sequence that gets slipped in between primary and secondary level entries, secondary and tertiary, etc. Bestie, it goes between the levels, not before them, okay?item_x1<string>โ default"\n \\subitem "item_x2<string>โ default"\n \\subsubitem "item_x3<string>โ default"\n \\subsubsubitem "item_x4<string>โ default"\n \\subsubsubsubitem "
So like, item_x1 through item_x4 are also command sequences inserted between primary and secondary, secondary and tertiary, etc. level entries โ but only when the higher level entry has no page number. That's the whole difference, iykyk ๐
delim_0<string>โ default", "delim_1<string>โ default", "delim_2<string>โ default", "delim_3<string>โ default", "delim_4<string>โ default", "
These cuties are the delimiter string that sits between the primary, secondary, etc. level entry and the first page number โจ (delim_0 for level 0, delim_1 for level 1 โ you get the vibe).
delim_n<string>โ default", "โ the delimiter string between page numbers, commonly used for any entry level. One setting, all the levels, highkey efficient ๐ซถdelim_r<string>โ default"--"โ the delimiter string between pages when you're showing a page range. Dash dash, iconic.delim_t<string>โ default""โ the delimiter string output at the end of the page number list. The little send-off ๐suffix_2p<string>โ default""โ string inserted in place ofdelim_nand the next page number when the two pages are contiguous. Works only when the parameter is defined โ define it or it does nothing, no cap ๐suffix_3p<string>โ default""โ string inserted in place ofdelim_rand the third page number when the three pages are contiguous. Heads up: this parameter is prior tosuffix_mp(it takes priority, bestie). And again โ works only when the parameter is defined.suffix_mp<string>โ default""โ string inserted in place ofdelim_rand the last page number when three or more pages are contiguous. Also only works when defined, fr fr.encap_prefix<string>โ default"\\"โ the prefix for an encapsulating command, used when that encapsulating command gets added to the page number.encap_infix<string>โ default"{"โ sits just before the page number when the encapsulating command is added to the page number.encap_suffix<string>โ default"}"โ comes after the page number when the encapsulating command is added to the page number.
okay the next batch is all the layout + heading behavior, stay with me ๐
line_max<number>โ default72โ maximum number of one line. If you exceed the number, the lines get folded. Respect the limit ๐indent_space<string>โ default""โ the space for indent that gets inserted to the top of a folded line.indent_length<number>โ default16โ the length of space for indent inserted to the top of a folded line.symhead_positive<string>โ default"Symbols"โ string output as the heading letter for symbols whenlethead_flagorheading_flagorheadings_flagis a positive number.symhead_negative<string>โ default"symbols"โ string output as the heading letter for symbols whenlethead_flagorheading_flagorheadings_flagis a negative number.symbol<string>โ default""โ strings to output as heading letter for symbols whensymbol_flagis non zero. If specified, this option is prior tosymhead_positiveandsymhead_negative. (Extended by (up)mendex) โจnumhead_positive<string>โ default"Numbers"โ string output as heading letter for numbers whenlethead_flagorheading_flagorheadings_flagis a positive number andsymbol_flagis2.numhead_negative<string>โ default"numbers"โ string output as heading letter for numbers whenlethead_flagorheading_flagorheadings_flagis a negative number andsymbol_flagis2.symbol_flag<number>โ default1โ flag for symbol output, and babes there are three modes:0โ do not output headings for symbols and numbers1โ output symbols and numbers as a group of symbols2โ output symbols and numbers separately
(Extended by (up)mendex)
letter_head<number>โ default1โ flag of heading letter for Japanese Kana. If1, Katakana is used; if2, Hiragana is used. (Extended by (up)mendex) ๐ฆpriority<number>โ default0โ flag for the sorting method for index words composed of Japanese and non-Japanese (ex. Latin scripts). If non zero, one space (U+0020) is inserted between the Japanese sequence and the non-Japanese sequence in the sorting procedure. (Extended by (up)mendex)character_order<string>โ default"SNLGCJKHDbpgotukmsTlah"โ this is the order of scripts and symbols, and each letter means something, so let me lay it out for you ๐:Sโ symbolNโ numberLโ LatinGโ GreekCโ CyrillicJโ Japanese KanaKโ Korean HangulHโ HanziDโ Devanagaribโ Bengalipโ Gurmukhigโ Gujaratioโ Oriyatโ Tamiluโ Telugukโ Kannadamโ Malayalamsโ SinhalaTโ Thailโ Laoaโ Arabichโ Hebrew script
And @ denotes scripts which are not explicitly designated โ those get their order configured by icu_rules or icu_locale. โ ๏ธ Please make sure that S and N are next to each other if symbol_flag=1, since numbers are classified as a part of symbol. (Extended by upmendex)
script_preamble<string 1><string 2>โ default""โ the preamble of a script block in the output file, specified by string 2. One of the script names must be specified in string 1:latin,cyrillic,greek,kana,hangul,hanzi,devanagari,bengali,gurmukhi,gujarati,oriya,tamil,telugu,kannada,malayalam,sinhala,thai,lao,arabic, orhebrew. (Extended by upmendex) ๐งscript_postamble<string 1><string 2>โ default""โ the postamble of a script block in the output file, specified by string 2. Same deal, one of these script names has to go in string 1:latin,cyrillic,greek,kana,hangul,hanzi,devanagari,bengali,gurmukhi,gujarati,oriya,tamil,telugu,kannada,malayalam,sinhala,thai,lao,arabic, orhebrew. (Extended by upmendex) ๐งicu_locale<string>โ default""โ the locale in the ICU collator. By default,"root sort order"is set. (Extended by upmendex)icu_rules<string>โ default""โ customized collation rules in the ICU collator. It accepts Unicode characters in UTF-8 encoding plus these escape sequences, bestie, memorize the list ๐:\Uhhhhhhhhโ 8-digit hexadecimal[0-9A-Fa-f]\uhhhhโ 4-digit hexadecimal\xhhโ 2-digit hexadecimal\x{h...}โ 1..8-digit hexadecimal\oooโ 3-digit octal[0-7]
If icu_rules and icu_locale are simultaneously specified, the collation rules specified by icu_rules are added on the collation rules specified by icu_locale. By default, locale is used. (Extended by upmendex)
Ref. https://unicode-org.github.io/icu/userguide/collation/customization/, http://www.unicode.org/reports/tr35/tr35-collation.html#Rules ๐ฆ
icu_attributes<string>โ defaults to"". These are the attributes for the ICU collator, and here's the whole menu of them, no gatekeeping:"alternate:shifted","alternate:non-ignorable","strength:primary","strength:secondary","strength:tertiary","strength:quaternary","strength:identical","french-collation:on","french-collation:off","case-first:off","case-first:upper-first","case-first:lower-first","case-level:on","case-level:off","normalization-mode:on","normalization-mode:off","numeric-ordering:on","numeric-ordering:off"โ and yeah, this one's Extended byupmendex๐
Refs if you wanna go deeper, bestie: <https://unicode-org.github.io/icu/userguide/collation/customization/#default-options> and <http://www.unicode.org/reports/tr35/tr35-collation.html#Setting_Options>
๐ธ ABOUT JAPANESE PROCESSING ๐ธ
okay so this is the part where upmendex is lowkey showing off, and honestly? deserved. Compared to makeindex, upmendex has an additional feature that simplifies the whole procedure of handling Japanese indexes. The serve here is that users can save the effort of manually specifying a reading for every single kanji word ๐ญ like, the tedium? gone.
Japanese kanji words are usually sorted by the syllables of their readings (Yomi), which can be represented by kana (Hiragana, Katakana) scripts. So upmendex accepts index words specified in kana expression directly on an input file โ and it also accepts conversion from index words in Kanji or symbols to phonogram scripts by referring to Japanese dictionaries. it's giving multilingual icon behavior โจ
Examples of internal simplification of syllables are shown below โ watch the glow-up:
ใใถใใใใใใ ใใตใใใใใใ
ใใใญใณใใใทใฅ ใพใคใใใจใคใใ
ใฏใผใใญ ใใใตใ
The dictionary file consists of list with <index_word reading>. The index word can be written in any scripts (kanji, kana, etc), and the reading can be in any phonograms such as Hiragana or Katakana scripts. The delimiter between the index word and its reading is one or more tab(s) or space(s). yes bestie, tabs OR spaces, the dictionary is not a hater ๐ซถ
An example of a Japanese dictionary is shown below:
ๆผขๅญ ใใใ
่ชญใฟ ใใฟ
็ฐๅข ใใใใใ
๏ผ ใใซ
Here, each index word is allowed to have only one Yomi. And I know what you're thinking, so let me say it plainly: though some kanji words (ex. ใ่กจใ) may have more than one Yomi's (ex. ใใฒใใใ and ใใใใฆใ), only one of them can be registered in the dictionary. When some different Yomi's are needed, they should be specified explicitly in kana expression (ex. \index{ใฒใใ@่กจ} or \index{ใใใฆ@่กจ}) on the input file. periodt ๐
Moreover, a dictionary file is automatically referred by setting the file name at an environment variable INDEXDEFAULTDICTIONARY. The dictionary set by the environment variable can be used together with file(s) specified by -d option. so they co-exist, they're not fighting, it's a collab ๐ค
โญ ABOUT SORTING PROCEDURE โญ
upmendex sorts indexes as is (sort by word order) by default. Setting -l option, spaces between words in an index are truncated prior to sorting procedure (sort by character order). And before you panic โ even when sort by character order, the index at output remains the original sequence without the truncation. the sort is just for ordering purposes, the output stays cute and untouched ๐
Follows show an example:
sort by word order sort by character order
X Window Xlib
Xlib XView
XView X Window
In addition, two sorting methods can be applied for indexes which contains both Japanese kana and other scripts (e.g. Latin script). By setting priority 0 (default) and 1 at a style file, a space between Japanese Kana and other scripts is inserted and not inserted respectively, prior to the sorting procedure.
Follows show an example:
priority=0 priority=1
index sort indใใกใคใซ
indใใกใคใซ index sort
see how they just swapped places? iconic. no cap ๐ฆ
๐ ENVIRONMENT VARIABLES ๐
upmendex refers environment variables as follows โ the whole guest list:
INDEXSTYLEโ Directory where index style files exist.INDEXDEFAULTSTYLEโ Index style file to be referred to as default.INDEXDICTIONARYโ Directory where dictionary files exist.INDEXDEFAULTDICTIONARYโ Dictionary file which is automatically read.
๐ DETAIL ๐
Detailed specification is compatible with makeindex. that's it, that's the whole vibe check โ if you know makeindex, you already know โจ
๐ KNOWN ISSUES ๐
When plural page number expression is used, .idx files should be specified along with the order of page numbers. Otherwise, wrong page numbers might be output.
fr fr, read that twice. the order of the .idx files actually matters here, and if you get it wrong the page numbers come out wrong. not a drill ๐ญ
๐ SEE ALSO ๐
tex(1), latex(1), makeindex(1), mendex(1).
International Components for Unicode (ICU): <http://icu.unicode.org/>, <https://unicode-org.github.io/icu/>
๐ AUTHOR ๐
This manual page was written by Takuji Tanaka based on the mendex manual page written by Japanese TeX Development Community. absolute legends, all of them ๐ซถ
and that's the whole page, bestie โ nothing skipped, nothing summarised, every last detail is in there ๐ the footer at the very bottom is just the page's own name-and-section doing its little cameo, UPMENDEX(1), hanging out in the version-and-date slot like the main character it is. go sort something. slay ๐
๐ฆ where this page comes from
- alpine 3.24: texmf-dist-binextra-doc 2026.0-r0 ยท LPPL-1.0 AND LPPL-1.1 AND LPPL-1.2 AND LPPL-1.3a AND LPPL-1.3c AND GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms