아이슬란드어를 분류하는 Texindy

아이슬란드어를 분류하는 Texindy

나는 명령을 사용하여 texindy -L icelandic -M lang/icelandic/utf8 dict_main.idx사진 이름, 작성자 및 라이센스 목록을 만듭니다. 그러나 정렬이 올바르지 않습니다(예: 아이슬란드어 알파벳은 þ æ ö 문자 순서로 끝남).

MWE:

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

\printindex
\end{document}

다음 명령을 실행합니다.

  pdflatex test.tex
  texlua utftexindy.lua -L icelandic test.idx
  pdflatex test.tex

코드 세부정보이 답변에서.

답변1

으로 인덱스를 생성해 보았습니다 lualatex. 특히 여러 패키지를 껐습니다. babel단축형으로 하드 코딩된 문자 선언이 일부 있고 utf-8 코딩 문자에서는 제대로 작동하지 않았기 때문입니다. 아마도 조판을 위해 이러한 패키지가 필요할 수 있지만 어떤 경우에는 색인 생성을 위해서만 해당 패키지를 생략할 수도 있습니다.

확인해 보면규칙-알파벳 만들기(Perl로 작성되었습니다.) 파일에서 다음 줄을 발견했습니다 /alphabets/icelandic/utf8.pl.in.

['A', ['a','A'],['á','Á']@u{,['ϫ́','Ϫ́']}],

내가 이해하는 바에 따르면, 이 @u{}부분은 일부 정렬 단계에서 문자를 동일하게 만듭니다. 다른 줄에도 포함되어 있습니다.

['E', ['e','E']@u{,['ę','Ę']},['ë','Ë'],['é','É']],
['Æ', ['æ','Æ']@u{,['τ','ϼ'],['ę́','Ę́'],['Ͽ','Ͼ']},[ 'œ','Œ'],['ä','ä']],
['Ö', ['ö','Ö'],['ø','Ø']@u{,[' │','│']}],

우리는 동일한 동작을 기대할 수 있습니다. 그래서 A그리고 Á뿐만 아니라 Æ그리고 그리고 Ǽ어느 시점에서는 동일합니다. 원하는 정렬이 아닌 경우 xindy 커뮤니티에서 수정 중일 수 있습니다. 확실하지는 않지만 alphabets/general/utf8.pl.in정렬 목적의 발음 구별 부호가 매우 자주 무시되는 코드의 일부입니다.

그래도 작은 버그/잘못 입력이 있다고 생각합니다. 색인의 단어 그룹에는 대문자를 사용하는 것이 일반적이지만 다음과 같은 경우가 있습니다.

나는 이것이 틀렸다고 생각합니다: ['ð', ['ð','Ð']],
그리고 이것은 올바른 형식이어야 합니다: ['Ð', ['ð','Ð']],

다음 예에서도 대문자가 아닌 소문자 eth가 있다는 것을 알 수 있습니다. TeX 코드와 2페이지의 미리보기를 첨부합니다. 다음 줄을 실행합니다.

lualatex Mal-icelandic.tex
xindy -M texindy -L icelandic -C utf8 Mal-icelandic.idx
lualatex Mal-icelandic.tex

%! lualatex mal-icelandic.tex
%! xindy -M texindy -L icelandic -C utf8 mal-icelandic.idx
%! lualatex mal-icelandic.tex
% or with two changes: +xltxtra and -luatextra, we run xelatex
\documentclass{article}
%\usepackage[T1]{fontenc}
%\usepackage[utf8]{inputenc}
%\usepackage[icelandic,czech]{babel}
\usepackage{luatextra} % for lualatex run
%\usepackage{xltxtra} % for xelatex run
\usepackage[colorlinks]{hyperref}%hyperindex=false
\usepackage{makeidx}
\makeindex
\begin{document}
The first paragraph of text\ldots
\index{Þari - Franz Eugen Kohler, Public Domain}
\index{Þistill - ŠARŽÍK František, COPYRIGHT/PD}
\index{Önd - Karney, Lee, PD}
\index{Æðarkóngur - Whitehouse, Laura L., PD}
\index{Avókadó - Forest \& Kim [[p:2684;Starr]], CC-BY}
\index{Auðnutittlingur - Arnstein Rønning, CC BY-SA 3.0}
\index{Asni - Zicha Ondřej, COPYRIGHT/CC-BY-NC}
\index{Á - hvalur.org, CC Unported Licence}
\index{Álft - Bukovský Jiří, COPYRIGHT/CC-BY-NC}
\index{Álka - Jack Spellingbacon from Scotland, CC BY-SA 3.0}
\index{Å - a fake index entry}
% a bug? ['ð',  ['ð','Ð']],
\index{Ð - another fake index entry}
\index{E - a testing index entry}
\index{Ǽ a fake}
\begingroup
\pagestyle{empty}
\def\thispagestyle#1{}
\printindex
\endgroup
\end{document}

음


편집 1: 개선된 일반 버전(아이슬란드어 정렬 + 발음 구별 부호가 있는 많은 문자가 포함된 유럽 서부 스타일)

이 두 파일을 작업 디렉터리에 다운로드하십시오. (첫 번째 파일에는 TeX.SX가 표시하지 않는 일부 특수 문자가 포함되어 있으므로 여기에 직접 게시할 수 없습니다.)

wgethttp://striz7.fame.utb.cz/tex-sx/is/icelandicmal.xdy
wgethttp://striz7.fame.utb.cz/tex-sx/is/icelandicmal-test.xdy

나는 서유럽에 대한 일반적인 정렬 규칙과 혼합된 아이슬란드어에 대한 새로운 정렬 규칙 세트를 만들었습니다. 따라서 아이슬란드어 알파벳이 아니더라도 C, Q, W, Z문자 그룹을 찾을 수 있습니다 . Å분음 부호가 추가된 문자가 많기 때문에 체코어, 슬로바키아어, 폴란드어, 독일어 및 더 많은 언어로 단어를 정렬하는 것이 고려됩니다( generalXindy의 정렬 참조).

문자 목록(문자 그룹, 문자 순서)을 얻으려면 다음을 사용합니다.

lualatex typesetme.tex

색인을 얻기 위해 다음 줄을 실행합니다.

lualatex Mal-icelandicmal.tex
xindy -M texindy -M icelandicmal-test -M Mal-style Mal-icelandicmal.idx
lualatex Mal-icelandicmal.tex

문자(코드, 미리보기) 목록과 색인(코드, 미리보기) 예시입니다. 귀하의 요구 사항에 맞는지 테스트해 보십시오.

%! lualatex typesetme.tex
\documentclass[a4paper]{article}
\pagestyle{empty}
\usepackage{luatextra}
\newenvironment{alphabet}{\begin{tabular}{*{16}{l}}%
   }{\end{tabular}}
\addtolength{\voffset}{-1in}
\addtolength{\textheight}{1in}

\begin{document}
\section{Icelandicmal}
\subsection{Alphabet}
\begin{alphabet}
a\,A\\
á\,Á & à\,À & ă\,Ă & â\, & ã\,à & ä\,Ä & ą\,Ą\\
b\,B\\
c\,C & č\,Č & ć\,Ć & ĉ\,Ĉ & ç\,Ç\\
d\,D & ď\,Ď\\
ð\,Ð & đ\,Đ\\
e\,E\\
é\,É & è\,È & ě\,Ě & ê\,Ê & ë\,Ë & ę\,Ę\\
f\,F\\
g\,G & ĝ\,Ĝ & ğ\,Ğ\\
h\,H & ĥ\,Ĥ & ı\,I\\
i\,I\\
í\,Í & ì\,Ì & î\,Î & ï\,Ï\\
j\,J & ĵ\,Ĵ\\
k\,K\\
l\,L & ĺ\,Ĺ & ľ\,Ľ & ł\,Ł\\
m\,M\\
n\,N & ń\,Ń & ň\,Ň & ñ\,Ñ\\
o\,O\\
ó\,Ó & ő\,Ő & ò\,Ò\\
p\,P\\
q\,Q\\
r\,R & ŕ\,Ŕ & ř\,Ř\\
s\,S & ś\,Ś & š\,Š & ŝ\,Ŝ & ş\,Ş\\
t\,T & ť\,Ť\\
u\,U\\
ú\,Ú & ù\,Ù & ŭ\,Ŭ & ů\,Ů & û\,Û & ü\,Ü & ű\,Ű\\
v\,V\\
w\,W\\
x\,X\\
y\,Y\\
ý\,Ý & ÿ\,Ÿ\\
z\,Z & ź\,Ź & ż\,Ż & ž\,Ž\\
þ\,Þ\\
æ\,Æ & ǽ\,Ǽ & œ\,Œ\\
ö\,Ö & ø\,Ø & ǿ\,Ǿ & ô\,Ô & õ\,Õ\\
å\,Å
\end{alphabet}
\subsection{Ligatures}
\begin{flushleft}
`ß' is sorted like `s\,s', but \emph{after} it in otherwise equal words.
\end{flushleft}
\subsection{Upper-/lowercase words}
Capitalized or uppercase words are sorted \emph{before} otherwise equal lowercase words.
\subsection{Special characters}
The order of special characters and letters is:
\begin{flushleft}
?\hspace{4mm}!\hspace{4mm}.\hspace{4mm}letters\hspace{4mm}-\hspace{4mm}'
\end{flushleft}
\end{document}

문자가 있는 세트 미리보기

%! lualatex mal-icelandicmal.tex
%! xindy -M texindy -M icelandicmal-test -M mal-style mal-icelandicmal.idx 
%! lualatex mal-icelandicmal.tex
% or with two changes: +xltxtra and -luatextra, we run xelatex
\documentclass{article}
%\usepackage[T1]{fontenc}
%\usepackage[utf8]{inputenc}
%\usepackage[icelandic,czech]{babel}
\usepackage{luatextra} % for lualatex run
%\usepackage{xltxtra} % for xelatex run
\usepackage[colorlinks]{hyperref}%hyperindex=false
\usepackage{makeidx}
\makeindex
\usepackage{filecontents}
\def\mygroup#1{\textbf{#1}}
\begin{filecontents*}{mal-style.xdy}
;; mal-style.xdy
(markup-letter-group :open-head "~n\mygroup{" :close-head "}")
\end{filecontents*}

\begin{document}
The first paragraph of text\ldots
\index{Þari -- Franz Eugen Kohler, Public Domain}
\index{Þistill -- Šaržík František, COPYRIGHT/PD}
\index{Önd -- Karney, Lee, PD}
\index{Æðarkóngur -- Whitehouse, Laura L., PD}
\index{Avókadó -- Forest \& Kim [[p:2684;Starr]], CC-BY}
\index{Auðnutittlingur -- Arnstein Rønning, CC BY-SA 3.0}
\index{Asni -- Zicha Ondřej, COPYRIGHT/CC-BY-NC}
\index{Á -- hvalur.org, CC Unported Licence}
\index{Álft -- Bukovský Jiří, COPYRIGHT/CC-BY-NC}
\index{Álka -- Jack Spellingbacon from Scotland, CC BY-SA 3.0}
\index{Å -- a fake index entry}
\index{Ð -- another fake index entry}
\index{E -- a testing index entry}
\index{Ǽ a fake}
\begingroup
\pagestyle{empty}
\def\thispagestyle#1{}
\printindex
\endgroup
\end{document}

음


편집 2: 최소한의 버전(아이슬란드어 정렬 및 32자만)

두 개의 새 파일을 다운로드하십시오:

wget http://striz7.fame.utb.cz/tex-sx/is-min/icelandicmalmin.xdy  
wget http://striz7.fame.utb.cz/tex-sx/is-min/icelandicmalmin-test.xdy  

다음 네 줄을 실행합니다.

pdflatex mal-icelandicmalmin.tex  
texlua iec2utf.lua <mal-icelandicmalmin.idx >mal-temp.idx  
xindy -M texindy -M icelandicmalmin-test -M mal-style -o mal-icelandicmalmin.ind mal-temp.idx  
pdflatex mal-icelandicmalmin.tex  

그만큼iec2utf.luamichal.h21로 프로그래밍된 라이브러리가 잘 작동합니다. 포함된 편지를 검토하려면 다음을 실행하십시오.

pdflatex typesetme.tex

pdflatex로 테스트한 두 개의 새 파일 , Xindy 스타일의 문자 목록 및 샘플 아이슬란드어 색인 미리보기를 동봉합니다 .

파일 typesetme.tex:

%! pdflatex typesetme.tex
\documentclass[a4paper]{article}
\pagestyle{empty}
%\usepackage{luatextra}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\newenvironment{alphabet}{\begin{tabular}{*{16}{l}}%
   }{\end{tabular}}
\addtolength{\voffset}{-1in}
\addtolength{\textheight}{1in}

\begin{document}
\section{Icelandicmalmin}
\subsection{Alphabet}
\begin{alphabet}
a\,A\\
á\,Á\\
b\,B\\
d\,D\\
ð\,Ð\\
e\,E\\
é\,É\\
f\,F\\
g\,G\\
h\,H\\
i\,I\\
í\,Í\\
j\,J\\
k\,K\\
l\,L\\
m\,M\\
n\,N\\
o\,O\\
ó\,Ó\\
p\,P\\
r\,R\\
s\,S\\
t\,T\\
u\,U\\
ú\,Ú\\
v\,V\\
x\,X\\
y\,Y\\
ý\,Ý\\
þ\,Þ\\
æ\,Æ\\
ö\,Ö
\end{alphabet}
%\subsection{Ligatures}
%\begin{flushleft}
%`ß' is sorted like `s\,s', but \emph{after} it in otherwise equal words.
%\end{flushleft}
\subsection{Upper-/lowercase words}
Capitalized or uppercase words are sorted \emph{before} otherwise equal lowercase words.
\subsection{Special characters}
The order of special characters and letters is:
\begin{flushleft}
?\hspace{4mm}!\hspace{4mm}.\hspace{4mm}letters\hspace{4mm}-\hspace{4mm}'
\end{flushleft}
\end{document}

파일 mal-icelandicmalmin.tex:

%! pdflatex mal-icelandicmalmin.tex
%! texlua iec2utf.lua <mal-icelandicmalmin.idx >mal-temp.idx
%! xindy -M texindy -M icelandicmalmin-test -M mal-style -o mal-icelandicmalmin.ind mal-temp.idx
%! pdflatex mal-icelandicmalmin.tex
%
% iec2utf.lua <--- https://github.com/michal-h21/iec2utf
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[icelandic,czech,english]{babel}
%\usepackage{luatextra} % for lualatex run
%\usepackage{xltxtra} % for xelatex run
\usepackage[colorlinks]{hyperref}%hyperindex=false
\usepackage{makeidx}
\makeindex
\usepackage{filecontents}
\def\mygroup#1{\textbf{#1}}
\begin{filecontents*}{mal-style.xdy}
;; mal-style.xdy
(markup-letter-group :open-head "~n\mygroup{" :close-head "}")
\end{filecontents*}

\begin{document}
The first paragraph of text\ldots
\index{Þari -- Franz Eugen Kohler, Public Domain}
\index{Þistill -- Šaržík František, COPYRIGHT/PD}
\index{Önd -- Karney, Lee, PD}
\index{Æðarkóngur -- Whitehouse, Laura L., PD}
\index{Avókadó -- Forest \& Kim [[p:2684;Starr]], CC-BY}
\index{Auðnutittlingur -- Arnstein Rønning, CC BY-SA 3.0}
\index{Asni -- Zicha Ondřej, COPYRIGHT/CC-BY-NC}
\index{Á -- hvalur.org, CC Unported Licence}
\index{Álft -- Bukovský Jiří, COPYRIGHT/CC-BY-NC}
\index{Álka -- Jack Spellingbacon from Scotland, CC BY-SA 3.0}
\index{Ð -- another fake index entry}
\index{E -- a testing index entry}
\index{É -- a testing index entry}
\begingroup
\pagestyle{empty}
\def\thispagestyle#1{}
\printindex
\endgroup
\end{document}

음

관련 정보