ソートせずにインデックスを作成する

ソートせずにインデックスを作成する

ソートせずに使用できますかmakeindex? この質問は奇妙に思えますが、インデックスエントリ(たとえば\index{Peace}ドキュメント内)がすでにアイスランド語のアルファベットに従って正しくソートされている状態でインデックスを使用したいと考えています。 理由は、xindyアイスランド語のソートが(現時点では)正しくないためです(この回答によると

答え1

質問があまり明確ではありませんが、リンクされた質問から MWE を取得し、@その前に文字列に ASCII 近似値を追加すると、makeindex は必要に応じて並べ替えます。(並べ替え順序が間違っている可能性がありますが、順序が A Á B の場合、Á を A と B の間で並べ替えられるもの (たとえば A1) に変更し、マングルされた文字列を前に置いて、@並べ替えにのみ使用するという考え方です。

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[]{makeidx}
\usepackage[icelandic, czech]{babel}
\makeindex
\begin{document}
Hello
\index{z1ari@Þari - Franz Eugen Kohler, Public Domain}
\index{z1istill@Þistill - ŠARŽÍK František, COPYRIGHT/PD}
\index{O2nd@Önd - Karney, Lee, PD}
\index{a3d@Æðarkóngur - Whitehouse, Laura L., PD}
\index{Avo1@Avókadó - Forest \& Kim [[p:2684;Starr]], CC-BY}
\index{Aud1@Auðnutittlingur - Arnstein Rønning, CC BY-SA 3.0}
\index{Asni@Asni - Zicha Ondřej, COPYRIGHT/CC-BY-NC}
\index{A1@Á - hvalur.org, CC Unported Licence}
\index{A1lft@Álft - Bukovský Jiří, COPYRIGHT/CC-BY-NC}
\index{A1lka@Álka - Jack Spellingbacon from Scotland, CC BY-SA 3.0}

\printindex
\end{document}

ここに画像の説明を入力してください

答え2

推奨されません

念のため、ソートせずにインデックスを作成する必要がある場合に備えて、xindyカウンタからインデックス用語に数字を追加し、ソート プロセスの一部にします。いずれにしても、文字グループは失われます。

lualatex mal-xindy-nosorting.tex
xindy -M texindy -M makeindex mal-xindy-nosorting.idx
lualatex mal-xindy-nosorting.tex

生成されたものはidx次のようになります。

\indexentry{1 dog@dog|hyperpage}{1}
\indexentry{2 mouse@mouse|hyperpage}{1}
\indexentry{3 horse@horse|hyperpage}{1}
\indexentry{4 cat@cat|hyperpage}{1}
\indexentry{5 bird@bird|hyperpage}{1}
\indexentry{6 girafa@girafa|hyperpage}{1}
\indexentry{7 zebra@zebra|hyperpage}{1}
\indexentry{8 jellyfish@jellyfish|hyperpage}{1}
\indexentry{9 lion@lion|hyperpage}{1}
\indexentry{10 cow@cow|hyperpage}{1}
\indexentry{11 octopus@octopus|hyperpage}{1}
\indexentry{12 ant@ant|hyperpage}{1}
\indexentry{13 worm@worm|hyperpage}{1}
\indexentry{14 wolf@wolf|hyperpage}{1}
\indexentry{15 owl@owl|hyperpage}{1}

ファイルの内容はind次のとおりです。

\begin{theindex}
  \providecommand*\lettergroupDefault[1]{}
  \providecommand*\lettergroup[1]{%
      \par\textbf{#1}\par
      \nopagebreak
  }

  \lettergroupDefault{default}
  \item dog, \hyperpage{1}
  \item mouse, \hyperpage{1}
  \item horse, \hyperpage{1}
  \item cat, \hyperpage{1}
  \item bird, \hyperpage{1}
  \item girafa, \hyperpage{1}
  \item zebra, \hyperpage{1}
  \item jellyfish, \hyperpage{1}
  \item lion, \hyperpage{1}
  \item cow, \hyperpage{1}
  \item octopus, \hyperpage{1}
  \item ant, \hyperpage{1}
  \item worm, \hyperpage{1}
  \item wolf, \hyperpage{1}
  \item owl, \hyperpage{1}

\end{theindex} 

texファイルと 2 ページ目のプレビューも同封しますpdf:

%! *latex mal-xindy-nosorting.tex
%! xindy -M texindy -M makeindex mal-xindy-nosorting.idx
%! *latex mal-xindy-nosorting.tex
\documentclass{article}
\pagestyle{empty}
\usepackage[colorlinks]{hyperref}
\usepackage{makeidx}
\makeindex
\begin{document}
The first paragraph of text.
\let\oldindex=\index
\newcount\malcount \malcount=0
\def\index#1{\advance\malcount by 1%
  \oldindex{\the\malcount\space#1@#1}%
  }% End of \index redefinition...
\index{dog}\index{mouse}\index{horse}
\index{cat}\index{bird}\index{girafa}\index{zebra}
\index{jellyfish}\index{lion}\index{cow}\index{octopus}
\index{ant}\index{worm}\index{wolf}\index{owl}
\begingroup\def\thispagestyle#1{}\printindex\endgroup
\end{document}

ムウェ

関連情報