
Utilizo o comando texindy -L icelandic -M lang/icelandic/utf8 dict_main.idx
para criar uma lista com os nomes dos fotógrafos, seus autores e licenças. Mas a classificação não está correta (por exemplo, o alfabeto islandês termina nesta ordem de letras þ æ ö)
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}
Executando estes comandos:
pdflatex test.tex
texlua utftexindy.lua -L icelandic test.idx
pdflatex test.tex
Detalhes do códigonesta resposta.
Responder1
Tentei criar um índice com lualatex
. Desliguei vários pacotes, esp. babel
pois existem algumas declarações de caracteres codificadas como taquigrafias e não estava funcionando bem com caracteres codificados em utf-8. Você provavelmente precisará desses pacotes para composição tipográfica, mas em alguns casos podemos omiti-los apenas para geração de índice.
Se verificarmosfazer-regras-alfabetos(está escrito em Perl), localizamos esta linha no /alphabets/icelandic/utf8.pl.in
arquivo:
['A', ['a','A'],['á','Á']@u{,['ǫ́','Ǫ́']}],
Pelo que entendi, a @u{}
parte iguala as letras em algumas fases de classificação. Está incluído em algumas outras linhas:
['E', ['e','E']@u{,['ę','Ę']},['ë','Ë'],['é','É']],
['Æ', ['æ','Æ']@u{,['ǽ','Ǽ'],['ę́','Ę́'],['ǿ','Ǿ']},[ 'œ','Œ'],['ä','Ä']],
['Ö', ['ö','Ö'],['ø','Ø']@u{,[' ǫ','Ǫ']}],
Podemos esperar o mesmo comportamento. Então A
e Á
assim como Æ
e Ǽ
são iguais em algum ponto. Se não for uma classificação desejada, a comunidade xindy provavelmente está consertando. Não tenho certeza disso, mas é uma parte frequente do código em alphabets/general/utf8.pl.in
que os diacríticos para fins de classificação são ignorados com muita frequência.
Acredito que haja um pequeno bug/erro de digitação. É comum usar letras maiúsculas para grupos de palavras no índice, mas existe:
Acredito que isso esteja errado: ['ð', ['ð','Ð']],
E esta deve ser a forma correta: ['Ð', ['ð','Ð']],
Podemos perceber também no exemplo a seguir que há uma letra minúscula eth, não uma letra maiúscula. Incluo o código TeX e uma prévia da página 2. Executamos estas linhas:
lualatex mal-icelandic.tex
xindy -M texindy -L islandês -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}
Edição 1: Uma versão geral melhorada (classificação islandesa + estilo ocidental europeu com muitas letras com diacríticos)
Por favor, baixe esses dois arquivos para o seu diretório de trabalho (não posso postar o primeiro arquivo diretamente aqui, pois ele contém alguns caracteres especiais que o TeX.SX não exibe):
wgethttp://striz7.fame.utb.cz/tex-sx/is/icelandicmal.xdy
wgethttp://striz7.fame.utb.cz/tex-sx/is/icelandicmal-test.xdy
Criei um novo conjunto de regras de classificação para o idioma islandês misturado com regras gerais de classificação para a Europa Ocidental. Assim, você pode encontrar grupos de letras como C, Q, W, Z
e Å
mesmo que não estejam no alfabeto islandês. Existem muitas letras com diacríticos adicionados, portanto a classificação de palavras em tcheco, eslovaco, polonês, alemão e provavelmente em muitos outros idiomas é levada em consideração (consulte general
a classificação em Xindy).
Para obter uma lista de letras (grupos de letras, ordem das letras), eu uso:
lualatex typesetme.tex
Eu executo estas linhas para obter um índice:
lualatex mal-icelandicmal.tex
xindy -M texindy -M islandês-teste -M estilo mal mal-icelandicmal.idx
lualatex mal-icelandicmal.tex
Esta é uma lista de letras (código, visualização) e um exemplo de índice (código, visualização). Por favor, teste se ele atende às suas necessidades.
%! 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}
Edição 2: uma versão minimalista (classificação em islandês e apenas 32 letras)
Baixe dois novos arquivos:
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
Executamos as quatro linhas a seguir:
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
Oiec2utf.lua
biblioteca programada por michal.h21 está funcionando bem. Caso você queira revisar as cartas incluídas, execute:
pdflatex typesetme.tex
Incluo dois novos arquivos testados com pdflatex
, uma lista de letras no estilo de Xindy e uma prévia de um exemplo de índice islandês.
O typesetme.tex
arquivo:
%! 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}
O mal-icelandicmalmin.tex
arquivo:
%! 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}