
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}