summaryrefslogtreecommitdiff
path: root/indexing/xindex/doc
diff options
context:
space:
mode:
Diffstat (limited to 'indexing/xindex/doc')
-rw-r--r--indexing/xindex/doc/tests/HADW.tex2
-rw-r--r--indexing/xindex/doc/tests/french.idx46
-rw-r--r--indexing/xindex/doc/tests/french.ind76
-rw-r--r--indexing/xindex/doc/tests/french.pdfbin0 -> 14439 bytes
-rw-r--r--indexing/xindex/doc/tests/french.tex20
-rw-r--r--indexing/xindex/doc/xindex-doc.pdfbin588580 -> 625110 bytes
-rw-r--r--indexing/xindex/doc/xindex-doc.tex580
7 files changed, 577 insertions, 147 deletions
diff --git a/indexing/xindex/doc/tests/HADW.tex b/indexing/xindex/doc/tests/HADW.tex
index 0ce50d0b10..34feccc755 100644
--- a/indexing/xindex/doc/tests/HADW.tex
+++ b/indexing/xindex/doc/tests/HADW.tex
@@ -14,7 +14,7 @@
\makeatother
\begin{document}
-Run with \verb|xindex --config HAdW-eKO|
+Run with \verb|xindex --config HAdW-eKO -x| no UCA
\printindex
\end{document}
diff --git a/indexing/xindex/doc/tests/french.idx b/indexing/xindex/doc/tests/french.idx
new file mode 100644
index 0000000000..01b880e40f
--- /dev/null
+++ b/indexing/xindex/doc/tests/french.idx
@@ -0,0 +1,46 @@
+\indexentry{CÔTÉ}{1}
+\indexentry{cote}{1}
+\indexentry{Côté}{1}
+\indexentry{COTÉ}{1}
+\indexentry{côte}{1}
+\indexentry{COTE}{1}
+\indexentry{côté}{1}
+\indexentry{Coté}{1}
+\indexentry{coté}{1}
+\indexentry{Cote}{1}
+\indexentry{CÔTE}{1}
+\indexentry{Côte}{1}
+\indexentry{lésé}{1}
+\indexentry{péché}{1}
+\indexentry{bohème}{1}
+\indexentry{gêné}{1}
+\indexentry{pêche}{1}
+\indexentry{cæsium}{1}
+\indexentry{pêcher}{1}
+\indexentry{révèle}{1}
+\indexentry{pécher}{1}
+\indexentry{révélé}{1}
+\indexentry{Bohême}{1}
+\indexentry{relève}{1}
+\indexentry{PÉCHÉ}{1}
+\indexentry{maçon}{1}
+\indexentry{relevé}{1}
+\indexentry{Élève}{1}
+\indexentry{gêne}{1}
+\indexentry{élevé}{1}
+\indexentry{MÂCON}{1}
+\indexentry{gène}{1}
+\indexentry{Bohémien}{1}
+\indexentry{caennais}{1}
+\indexentry{lèse}{1}
+\indexentry{coexistence}{1}
+\indexentry{cœur}{1}
+\indexentry{coefficient}{1}
+\indexentry{cafard}{1}
+\indexentry{CŒUR}{1}
+\indexentry{CÆSIUM}{1}
+\indexentry{coté}{1}
+\indexentry{cœur}{1}
+\indexentry{péché}{1}
+\indexentry{coté}{2}
+\indexentry{coefficient}{2}
diff --git a/indexing/xindex/doc/tests/french.ind b/indexing/xindex/doc/tests/french.ind
new file mode 100644
index 0000000000..01b62fc86d
--- /dev/null
+++ b/indexing/xindex/doc/tests/french.ind
@@ -0,0 +1,76 @@
+
+\begin{theindex}
+
+\indexspace
+\textbf{B}\label{L-xindex-B}
+\nopagebreak[4]
+ \item bohème, {1}
+ \item Bohême, {1}
+ \item Bohémien, {1}
+
+\indexspace
+\textbf{C}\label{L-xindex-C}
+\nopagebreak[4]
+ \item caennais, {1}
+ \item cæsium, {1}
+ \item CÆSIUM, {1}
+ \item cafard, {1}
+ \item coefficient, {1\,sq.}
+ \item cœur, {1}
+ \item CŒUR, {1}
+ \item coexistence, {1}
+ \item cote, {1}
+ \item Cote, {1}
+ \item COTE, {1}
+ \item côte, {1}
+ \item Côte, {1}
+ \item CÔTE, {1}
+ \item coté, {1\,sq.}
+ \item Coté, {1}
+ \item COTÉ, {1}
+ \item côté, {1}
+ \item Côté, {1}
+ \item CÔTÉ, {1}
+
+\indexspace
+\textbf{E}\label{L-xindex-E}
+\nopagebreak[4]
+ \item Élève, {1}
+ \item élevé, {1}
+
+\indexspace
+\textbf{G}\label{L-xindex-G}
+\nopagebreak[4]
+ \item gène, {1}
+ \item gêne, {1}
+ \item gêné, {1}
+
+\indexspace
+\textbf{L}\label{L-xindex-L}
+\nopagebreak[4]
+ \item lèse, {1}
+ \item lésé, {1}
+
+\indexspace
+\textbf{M}\label{L-xindex-M}
+\nopagebreak[4]
+ \item MÂCON, {1}
+ \item maçon, {1}
+
+\indexspace
+\textbf{P}\label{L-xindex-P}
+\nopagebreak[4]
+ \item pêche, {1}
+ \item péché, {1}
+ \item PÉCHÉ, {1}
+ \item pécher, {1}
+ \item pêcher, {1}
+
+\indexspace
+\textbf{R}\label{L-xindex-R}
+\nopagebreak[4]
+ \item relève, {1}
+ \item relevé, {1}
+ \item révèle, {1}
+ \item révélé, {1}
+\end{theindex}
diff --git a/indexing/xindex/doc/tests/french.pdf b/indexing/xindex/doc/tests/french.pdf
new file mode 100644
index 0000000000..b7acdcb220
--- /dev/null
+++ b/indexing/xindex/doc/tests/french.pdf
Binary files differ
diff --git a/indexing/xindex/doc/tests/french.tex b/indexing/xindex/doc/tests/french.tex
new file mode 100644
index 0000000000..8f2191c0dd
--- /dev/null
+++ b/indexing/xindex/doc/tests/french.tex
@@ -0,0 +1,20 @@
+\documentclass[paper=a4,twocolumn]{scrartcl}
+\usepackage{libertinus-otf}
+\usepackage[french]{babel}
+\usepackage{makeidx} \makeindex
+\newcommand*{\IND}[1]{\index{#1}#1\par}
+\begin{document}
+%%% xindex -l fr <file>
+\IND{CÔTÉ} \IND{cote} \IND{Côté} \IND{COTÉ} \IND{côte}
+\IND{COTE} \IND{côté} \IND{Coté} \IND{coté} \IND{Cote}
+\IND{CÔTE} \IND{Côte} \IND{lésé} \IND{péché}
+\IND{bohème} \IND{gêné} \IND{pêche} \IND{cæsium}
+\IND{pêcher} \IND{révèle} \IND{pécher} \IND{révélé}
+\IND{Bohême} \IND{relève} \IND{PÉCHÉ} \IND{maçon}
+\IND{relevé} \IND{Élève} \IND{gêne} \IND{élevé}
+\IND{MÂCON} \IND{gène} \IND{Bohémien} \IND{caennais}
+\IND{lèse} \IND{coexistence} \IND{cœur}
+\IND{coefficient} \IND{cafard} \IND{CŒUR} \IND{CÆSIUM}
+\newpage \IND{coté} \IND{cœur} \IND{péché} \newpage
+\IND{coté}\IND{coefficient} \printindex
+\end{document}
diff --git a/indexing/xindex/doc/xindex-doc.pdf b/indexing/xindex/doc/xindex-doc.pdf
index 31143f6fe1..6615903e34 100644
--- a/indexing/xindex/doc/xindex-doc.pdf
+++ b/indexing/xindex/doc/xindex-doc.pdf
Binary files differ
diff --git a/indexing/xindex/doc/xindex-doc.tex b/indexing/xindex/doc/xindex-doc.tex
index df19098a87..9af878cdd7 100644
--- a/indexing/xindex/doc/xindex-doc.tex
+++ b/indexing/xindex/doc/xindex-doc.tex
@@ -81,7 +81,7 @@
\def\setVersion#1{\setVVersion#1!!}
\def\setVVersion#1=#2!!{\def\xIndexVersion{#2}}
-\setVersion{version = 0.55}% can be automatically changed by perl
+\setVersion{version = 0.59}% can be automatically changed by perl
@@ -102,7 +102,7 @@ Mark Baudoin;
Denis Bitouzé;
Andreas Deininger;
Brian Dunn;
-Gonzalo Pesquero Serrano;
+Daniel Flipo;
Michal Hoftich;
Mykel Kochenderfer;
Alexey Kuznetsov;
@@ -112,6 +112,7 @@ Heiko Oberdiek;
Matteo Paolini;
Stefan Pinnow;
Florent Rougon;
+Gonzalo Pesquero Serrano;
Martin Sievers;
Simon Spiegel;
Jürgen Spitzmüller;
@@ -167,7 +168,7 @@ EntryList[2] = {
\subsection{Syntax}
The \Index{syntax} is \verb|xindex [...] <file(s)>| where \verb|[...]| are optional \Index{argument}s, either in short or
-long form which, of course, can be mixed:
+long7 form which, of course, can be mixed:
\begin{verbatim}
xindex
@@ -188,7 +189,7 @@ xindex
[-o,--output ] default is <input>.ind
[-p,--prefix] default L
[-s,--use_stdin ] default is false
- [-u,--use_UCA ] default is false
+ [-x,--no_UCA ] default is false
<files...> (default stdin) file(s)[.idx] one or more files
\end{verbatim}
@@ -269,19 +270,19 @@ are alphabetized.
compiler=lualatex,
crop,
xindex,
- xindexOptions=-u, % use unicode
+ xindexOptions=-l fr,
runs=2,code,docType=latex,
showFilename,
align=\centering,
lstOptions={columns=fixed}]{xindex}
%! lualatex
-%! xindex -u (use unicode)
\documentclass{scrartcl}
+\usepackage{multicol}
\makeatletter
-\def\theindex{% only for demonstration
- \section*{\indexname}
+\renewenvironment{theindex}{% only for demonstration
+ \begin{multicols}{2}[\section*{\indexname}]
\parskip\z@ \@plus .3\p@\relax \parindent\z@
- \let\item\@idxitem}
+ \let\item\@idxitem}{\end{multicols}}
\makeatother
%StartVisiblePreamble
\usepackage{makeidx}\makeindex
@@ -299,9 +300,9 @@ are alphabetized.
\item Left paranthesis \{ \index{\braceLeft}
\item Right paranthesis \} \index{\braceRight}
\end{itemize}
-run \texttt{xindex -u <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
+run \texttt{xindex -l fr <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
\index{Etage} \index{Ètagé}
-\newpage
+\twocolumn
\printindex
\end{document}
\end{externalDocument}
@@ -310,7 +311,7 @@ It is by design that the braces \{ and \} cannot be used as index entry. The \em
xindex defines the two commands \Lcs{braceLeft} and \Lcs{braceRight} which can be used instead
(see examples above and and below).
-The same example without using unicode sorting (no option \Loption{-u}):
+The same example without using unicode sorting (option \Loption{-x}):
\begin{externalDocument}[
@@ -320,7 +321,7 @@ The same example without using unicode sorting (no option \Loption{-u}):
compiler=lualatex,
crop,
xindex,
-% xindexOptions=-u, % use unicode
+ xindexOptions=-x, % do not use unicode
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -328,11 +329,12 @@ The same example without using unicode sorting (no option \Loption{-u}):
%! lualatex
%! xindex (no unicode sort -- simple ascii)
\documentclass{scrartcl}
+\usepackage{multicol}
\makeatletter
-\def\theindex{% only for demonstration
- \section*{\indexname}
+\renewenvironment{theindex}{% only for demonstration
+ \begin{multicols}{2}[\section*{\indexname}]
\parskip\z@ \@plus .3\p@\relax \parindent\z@
- \let\item\@idxitem}
+ \let\item\@idxitem}{\end{multicols}}
\makeatother
%StartVisiblePreamble
\usepackage{makeidx}\makeindex
@@ -350,9 +352,9 @@ The same example without using unicode sorting (no option \Loption{-u}):
\item Left paranthesis \{ \index{\braceLeft}
\item Right paranthesis \} \index{\braceRight}
\end{itemize}
-run \texttt{xindex -u <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
+run \texttt{xindex -x <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
\index{Etage} \index{Ètagé}
-\newpage
+\twocolumn
\printindex
\end{document}
\end{externalDocument}
@@ -386,9 +388,8 @@ The following example shows how to use it:
frame,
compiler=lualatex,
crop,
- force=false,
xindex,
- xindexOptions=-e ">",
+ xindexOptions=-e ">" -n,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -417,7 +418,7 @@ The following example shows how to use it:
\item Group start \{ \index{\braceLeft}
\item Group end \{ \index{\braceRight}
\end{itemize}
-Run \texttt{xindex} with \texttt{xindex -e ">"}\index{<file.idx>}\index{123}
+Run \texttt{xindex} with \texttt{xindex -e ">" -n}\index{<file.idx>}\index{123}
\newpage
\printindex
\end{document}
@@ -457,7 +458,6 @@ The following example was run with \verb|xindex -l it <file>.idx|:
frame,
compiler=lualatex,
crop,
- force=false,
xindex,
xindexOptions=-l it -e ">",
runs=2,code,docType=latex,
@@ -467,11 +467,12 @@ The following example was run with \verb|xindex -l it <file>.idx|:
%! lualatex
\documentclass{scrartcl}
\usepackage[italian]{babel}
+\usepackage{multicol}
\makeatletter
-\def\theindex{% only for demonstration
- \section*{\indexname}
+\renewenvironment{theindex}{% only for demonstration
+ \begin{multicols}{2}[\section*{\indexname}]
\parskip\z@ \@plus .3\p@\relax \parindent\z@
- \let\item\@idxitem}
+ \let\item\@idxitem}{\end{multicols}}
\makeatother
%StartVisiblePreamble
\usepackage{makeidx}\makeindex
@@ -487,8 +488,7 @@ The following example was run with \verb|xindex -l it <file>.idx|:
\item At siboli @ \index{At (>@)}
\end{itemize}
Initio \texttt{xindex} con \texttt{xindex -l it -e ">"}\index{123}
-\newpage
-\printindex
+\twocolumn \printindex
\end{document}
\end{externalDocument}
@@ -504,7 +504,6 @@ package \Lpack{babel} or \Lpack{polyglossia} are used.
frame,
compiler=lualatex,
crop,
- force=false,
xindex,
xindexOptions=-k -e "?",
runs=2,code,docType=latex,
@@ -513,11 +512,12 @@ package \Lpack{babel} or \Lpack{polyglossia} are used.
lstOptions={columns=fixed}]{xindex}
%! lualatex
\documentclass{scrartcl}
+\usepackage{multicol}
\makeatletter
-\def\theindex{% only for demonstration
- \section*{\indexname}
+\renewenvironment{theindex}{% only for demonstration
+ \begin{multicols}{2}[\section*{\indexname}]
\parskip\z@ \@plus .3\p@\relax \parindent\z@
- \let\item\@idxitem}
+ \let\item\@idxitem}{\end{multicols}}
\makeatother
%StartVisiblePreamble
\usepackage[dutch]{babel} % !!!!
@@ -534,7 +534,7 @@ package \Lpack{babel} or \Lpack{polyglossia} are used.
\item At character @ \index{At (?@)}\index{?@}
\end{itemize}
Run \texttt{xindex} with \texttt{xindex -k -e "?"}\index{123}
-\newpage\index{xindex@\texttt{xindex}}
+\twocolumn\index{xindex@\texttt{xindex}}
\printindex
\end{document}
\end{externalDocument}
@@ -554,8 +554,9 @@ This allows to have different indexes with different language.
frame,
compiler=lualatex,
crop,
+ force,
xindex,
- xindexOptions=-u -l RU -c RU,
+ xindexOptions=-l RU -c RU -n,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -564,18 +565,19 @@ This allows to have different indexes with different language.
]{xindex}
%! lualatex
\documentclass{scrartcl}
+\usepackage{multicol}
\makeatletter
-\def\theindex{% only for demonstration
- \section*{\indexname}
+\renewenvironment{theindex}{% only for demonstration
+ \begin{multicols}{2}[\section*{\indexname}]
\parskip\z@ \@plus .3\p@\relax \parindent\z@
- \let\item\@idxitem}
+ \let\item\@idxitem}{\end{multicols}}
\makeatother
%StartVisiblePreamble
\usepackage[russian]{babel}
\usepackage{fontspec}
\usepackage[regular]{newcomputermodern}
\defaultfontfeatures{Ligatures=TeX}
-\usepackage{xindex}\makeindex % run with xindex -u -l RU -c RU <file>
+\usepackage{xindex}\makeindex % run with xindex -l RU -c RU <file>
%StopVisiblePreamble
\pagestyle{empty}
\begin{document}
@@ -599,7 +601,7 @@ This allows to have different indexes with different language.
\verb|\index{Ёж!ушастый (Hemiechinus auritus)}|%
\index{Ёж!ушастый (Hemiechinus auritus)}
\end{tabular}
-\printindex % xindex -u -l RU -c RU <file>
+\printindex % xindex -l RU -c RU -n <file>
\end{document}
\end{externalDocument}
@@ -609,8 +611,207 @@ This allows to have different indexes with different language.
\section{Sorting}
+
+
+
+\subsection{Default sorting by the UCA (Unicode Collection Algorithm)}
+This Lua library from Michal Hoftich is part of \TeXLive\ and is used by default
+for sorting. The supported languages and variants are listed in the file
+\Lfile{lua-uca-languages.lua}:
+
+\texttt{af,
+am,
+ar,
+as,
+az,
+be,
+bg,
+bn,
+bs,
+bs\_cyrl,
+ca,
+chr,
+cs,
+cy,
+da,
+de,
+de\_din2,
+dsb,
+dz,
+ee,
+el,
+en,
+eo,
+es,
+et,
+fa,
+fi,
+fil,
+fo,
+fr,
+fr\_backward\_accents,
+ga,
+gl,
+gu,
+ha,
+haw,
+he,
+hr,
+hi,
+hsb,
+hu,
+hy,
+id,
+ig,
+is,
+it,
+ja,
+ka,
+kk,
+kl,
+km,
+kn,
+ko,
+kok,
+ky,
+lb,
+lkt,
+ln,
+lo,
+lt,
+lv,
+mk,
+ml,
+mn,
+mr,
+ms,
+mt,
+my,
+nb,
+ne,
+nl,
+nn,
+no,
+om,
+pa,
+pl,
+ps,
+pt,
+ro,
+ru,
+se,
+si,
+sk,
+sl,
+smn,
+sq,
+sr,
+sr\_latn,
+sv,
+sw,
+ta,
+te,
+th,
+tk,
+to,
+tr,
+ug,
+uk,
+ur,
+uz,
+vi,
+vo,
+wae,
+wo,
+yi,
+yo,
+zh,
+zu}
+
+
+
+The sorting order can be easily modified. Read the documentation of the package \texttt{LUA-UCA}
+on how to do it and what languages are supported so far. Any additional code setting for
+UCA should be done in the file \Lfile{xindex-cfg-uca.lua}, which will automatically be read
+by \Lprog{xindex}.
+
+\begin{importantblock}
+If possible, you should use the Unicode sorting by default and only for some special cases
+where you define your own sorting scheme, you should use the \verb|-x| option.
+\end{importantblock}
+
+
+\begin{externalDocument}[
+% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+ mpwidth=0.55\linewidth,
+% pages={6},
+ frame=false,
+ compiler=lualatex,
+ crop,
+ xindex,
+ xindexOptions=-l cs,
+ runs=2,code,docType=latex,
+ showFilename,
+ align=\centering,
+ usefancyvrb,
+% lstOptions={columns=fixed}
+]{xindex}
+%! lualatex
+\documentclass[paper=a6]{scrartcl}
+\makeatletter
+\def\theindex{% only for demonstration
+ \section*{\indexname}
+ \parskip\z@ \@plus .3\p@\relax \parindent\z@
+ \let\item\@idxitem}
+\makeatother
+%StartVisiblePreamble
+\usepackage{multicol}
+\usepackage{makeidx}\makeindex
+\def\Index#1{#1\index{#1}}
+%StopVisiblePreamble
+\pagestyle{empty}
+\begin{document}
+Sorted with \verb|-l cs|
+\Index{ahoj} \Index{crha}, \Index{čaj}, \Index{chachar},
+\Index{rak}, \Index{řeka}, \Index{srp}, \Index{šutr},
+\Index{hudba}, \Index{linux}, \Index{zebra},
+\Index{žába}, \Index{7 dubů}
+\begin{multicols}{2} \printindex \end{multicols}
+\end{document}
+\end{externalDocument}
+
+
+
+
+Modifications can be done in a config file which is then loaded by the
+option \texttt{-c}. For example: the file \Lfile{xindex-cfg-uca.lua} has
+modification for french and norwegian. For french the standard sorting rules
+\texttt{fr\_backward\_accents}, are a bit
+special and should be the default also for the language \texttt{fr}:
+
+\begin{verbatim}
+languages.fr = function(collator_obj)
+ -- reverse search for accents in French (recommended):
+ collator_obj.accents_backward = true
+ local tailoring = function(s) collator_obj:tailor_string(s) end
+ tailoring("&æ=ae")
+ tailoring("&œ=oe")
+ tailoring("&th<þ<<<Þ") -- Canadian, see SGQRI004.pdf
+ return collator_obj
+end
+\end{verbatim}
+
+Add any additional modifications to this file or create an own
+config file and load it with \texttt{-c}.
+
+
\subsection{Default sorting by a character table}
-The default sorting is unicode aware and uses a translation table for accented characters:
+This sorting is not completely unicode aware. It uses a translation table for accented characters,
+which should only be used if the standard sorting method with UCA is not possible! This kind of sortierung
+has to be choosed by the option \texttt{-x} (don't use UCA). The option \texttt{-u} for
+using UCA is deprecated, because using UCA is the default.
+
+Again, if on wants to use an own transformation table, then use something like:
\begin{verbatim}
alphabet_lower = { -- for sorting
@@ -684,6 +885,8 @@ alphabet_upper = { -- for sorting
\end{verbatim}
+\subsection{Examples}
+\subsubsection{German language and no UCA}
\begin{externalDocument}[
grfOptions={scale=0.9},%width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
@@ -693,7 +896,7 @@ alphabet_upper = { -- for sorting
compiler=lualatex,
crop,
xindex,
- xindexOptions=-l de,
+ xindexOptions=-l de -x,
runs=2,code,docType=latex,
showFilename,
usefancyvrb,
@@ -719,8 +922,7 @@ alphabet_upper = { -- for sorting
\makeatother
\pagestyle{empty}
\begin{document}
-Sorted with \verb|-l DE|
-
+Sorted with \verb|-l DE -x|\par
\Index{Österreich} \Index{Öresund}
\Index{Ostern} \Index{Ober}
\Index{Oberin} \Index{Österreich}
@@ -740,10 +942,126 @@ Sorted with \verb|-l DE|
\end{externalDocument}
+\subsubsection{German language (DIN2) and no UCA}
+
+In this case a letter Ö, Ä, Ü, ö, ä, ü is converted to Oe, Ae, Ue, oe, ae, ue before sorting:
+
+\noindent
+\begin{externalDocument}[
+ grfOptions={scale=0.9},%width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+ mpwidth=0.4\linewidth,
+ pages={2},
+ frame=false,
+ compiler=lualatex,
+ crop,
+ xindex,
+ xindexOptions=-c DIN2 -l DE -x,
+ runs=2,code,docType=latex,
+ showFilename,
+ align=\centering,
+ lstOptions={columns=fixed}]{xindex}
+%! lualatex
+\documentclass[paper=a5]{scrartcl}
+\usepackage[ngerman]{babel}
+%StartVisiblePreamble
+\usepackage{makeidx}\makeindex
+\newcommand\Index[1]{\index{#1}#1}
+%StopVisiblePreamble
+\usepackage{multicol}
+\makeatletter
+\def\theindex{% only for demonstration
+ \newpage
+ \section*{\indexname}
+ \begin{multicols}{2}
+ \parskip\z@ \@plus .3\p@\relax \parindent\z@
+ \let\item\@idxitem}
+\def\endtheindex{\end{multicols}}
+\makeatother
+\pagestyle{empty}
+\begin{document}
+Sorted with
+\verb|--config DIN2 -l DE -x|
+
+\Index{Österreich} \Index{Öresund}
+\Index{Ostern} \Index{Ober}
+\Index{Oberin} \Index{Österreich}
+\Index{Öresund} \Index{Ostern}
+\Index{Ober} \Index{Oberin}
+\Index{Obstler} \Index{Öl}
+\Index{ölen} \Index{Ödem}
+\Index{Oligarch} \Index{Oder}
+\Index{oder} \index{Fluss!Oder}
+\index{Oder|seealso{Fluss}}
+\Index{Göbel} \Index{Goethe}
+\Index{Göthe} \Index{Götz}
+\Index{Goldmann}
+\printindex
+\end{document}
+\end{externalDocument}
+
+
+
+\subsubsection{German language with UCA}
+
+\begin{externalDocument}[
+ grfOptions={scale=0.9},%width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+ mpwidth=0.4\linewidth,
+ pages={2},
+ frame=false,
+ compiler=lualatex,
+ force,
+ crop,
+ xindex,
+ xindexOptions=-l de, % german and UCA
+ runs=2,code,docType=latex,
+ showFilename,
+ usefancyvrb,
+ align=\centering,
+% lstOptions={columns=fixed}
+]{xindex}
+%! lualatex
+\documentclass[paper=a5]{scrartcl}
+\usepackage[ngerman]{babel}
+%StartVisiblePreamble
+\usepackage{makeidx}\makeindex
+\newcommand\Index[1]{\index{#1}#1}
+%StopVisiblePreamble
+\usepackage{multicol}
+\makeatletter
+\def\theindex{% only for demonstration
+ \newpage
+ \section*{\indexname}
+ \begin{multicols}{2}
+ \parskip\z@ \@plus .3\p@\relax \parindent\z@
+ \let\item\@idxitem}
+\def\endtheindex{\end{multicols}}
+\makeatother
+\pagestyle{empty}
+\begin{document}
+Sorted with \verb|-l DE| and using UCA\par
+\Index{Österreich} \Index{Öresund}
+\Index{Ostern} \Index{Ober}
+\Index{Oberin} \Index{Österreich}
+\Index{Öresund} \Index{Ostern}
+\Index{Ober} \Index{Oberin}
+\Index{Obstler} \Index{Öl}
+\Index{ölen} \Index{Ödem}
+\Index{Oligarch} \Index{Oder}
+\Index{oder} \index{Fluss!Oder}
+\index{Oder|seealso{Fluss}}
+\Index{Göbel} \Index{Goethe}
+\Index{Göthe} \Index{Götz}
+\Index{Goldmann}
+\printindex
+\end{document}
+\end{externalDocument}
+
+\subsubsection{German language (DIN2) with UCA}
-The same sorted with the German DIN variant 2 with \verb|--config DIN2|, which
-is part of the \TeX\ distribution. In this case a letter Ö is converted to Oe before sorting
-the word beginning with the letter Ö:
+The same sorted with the German DIN variant 2. It uses also the config
+file
+with \verb|--config DIN2|, but sets the language internally to \verb|de_din2| for
+UCA and do not use the character tables:
\noindent
\begin{externalDocument}[
@@ -799,6 +1117,10 @@ Sorted with
\end{externalDocument}
+\clearpage
+
+\subsubsection{Japanese language with UCA}
+
The following runs with \verb|xindex -l jp <file>|:
@@ -814,13 +1136,13 @@ The following runs with \verb|xindex -l jp <file>|:
\edef\FancyVerbStartString{\perCent StartVisiblePreamble}
\edef\FancyVerbStopString{\perCent StopVisiblePreamble}
\colorbox{black!20}{\parbox{\linewidth}{%
-\VerbatimInput[fontfamily=helvetica]{Examples/xindex-9.tex}
+\VerbatimInput[fontfamily=helvetica]{Examples/xindex-12.tex}
}}
\edef\FancyVerbStartString{\string\begin\string{document\string}}
\edef\FancyVerbStopString{\string\end\string{document\string}}
\colorbox{black!10}{\parbox{\linewidth}{%
-\VerbatimInput[fontfamily=helvetica]{Examples/xindex-9.tex}
+\VerbatimInput[fontfamily=helvetica]{Examples/xindex-12.tex}
}}
%\end{minipage}\hfill
@@ -849,8 +1171,7 @@ The following runs with \verb|xindex -l jp <file>|:
\usepackage{fontspec}
\setmainfont{SourceHanSans}
\usepackage[japanese]{babel}
-\addto\captionsjapanese{%
- \def\indexname{指数}}
+\addto\captionsjapanese{\def\indexname{指数}}
\usepackage{hvindex}% for \Index
\usepackage{makeidx}\makeindex
%StopVisiblePreamble
@@ -865,12 +1186,10 @@ The following runs with \verb|xindex -l jp <file>|:
\makeatother
\pagestyle{empty}
\begin{document}
-\Index{車} \Index{車道}
-日本\index{日本|fbox} \Index{病院} \Index{コンピュータ}
-\Index{プリンタ} \Index{印刷} \Index{スイミングプール} \Index{天王}
-\Index{広島} \Index{ドイツ} \Index{日本} \Index{ワープロ}
-\Index{foo} und \Index{bar} \Index{//} \Index{4711}
-\newpage\printindex
+\Index{車} \Index{車道} 日本\index{日本|fbox} \Index{病院} \Index{コンピュータ}
+\Index{プリンタ} \Index{印刷} \Index{スイミングプール} \Index{天王} \Index{広島}
+\Index{ドイツ} \Index{日本} \Index{ワープロ}
+\Index{foo} und \Index{bar} \Index{//} \Index{4711} \newpage\printindex
\end{document}
\end{externalDocument}
%\end{minipage}
@@ -878,70 +1197,6 @@ The following runs with \verb|xindex -l jp <file>|:
\setsansfont{Libertinus Sans}\rmfamily
-\subsection{Sorting by using UCA (Unicode Collation Algorithm)}
-With the optional argument \verb|-u| or alternatively \verb|--use_UCA| the sorting will be done
-by Michal Hoftich's Lua package \texttt{LUA-UCA}, which should be part of any \TeX{} installation.
-
-The sorting order can be easily modified. Read the documentation of the package \texttt{LUA-UCA}
-on how to do it and what languages are supported so far. Any additional code setting for
-UCA should be done in the file \Lfile{xindex-cfg-uca.lua}, which will automatically be read
-by \Lprog{xindex}.
-
-\iffalse
-\begin{noteblock}
-This package can display, in a
-\begin{itemize}
- \item to change dimensions and colors ;
-\end{itemize}
-It's
-\end{noteblock}
-\fi
-\begin{importantblock}
-If possible, you should use the Unicode sorting by default and only for some special cases
-where you define your own sorting scheme, you should not use the \verb|-u| option.
-\end{importantblock}
-
-
-\begin{externalDocument}[
-% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
- mpwidth=0.55\linewidth,
-% pages={6},
- frame=false,
- compiler=lualatex,
- crop,
- force=false,
- xindex,
- xindexOptions=-u -l cs,
- runs=2,code,docType=latex,
- showFilename,
- align=\centering,
- usefancyvrb,
-% lstOptions={columns=fixed}
-]{xindex}
-%! lualatex
-\documentclass[paper=a6]{scrartcl}
-\makeatletter
-\def\theindex{% only for demonstration
- \section*{\indexname}
- \parskip\z@ \@plus .3\p@\relax \parindent\z@
- \let\item\@idxitem}
-\makeatother
-%StartVisiblePreamble
-\usepackage{multicol}
-\usepackage{makeidx}\makeindex
-\def\Index#1{#1\index{#1}}
-%StopVisiblePreamble
-\pagestyle{empty}
-\begin{document}
-Sorted with \verb|-u -l cs|
-\Index{ahoj} \Index{crha}, \Index{čaj}, \Index{chachar},
-\Index{rak}, \Index{řeka}, \Index{srp}, \Index{šutr},
-\Index{hudba}, \Index{linux}, \Index{zebra},
-\Index{žába}, \Index{7 dubů}
-\begin{multicols}{2} \printindex \end{multicols}
-\end{document}
-\end{externalDocument}
-
\subsection{Case sensitive index entries}
@@ -1000,7 +1255,6 @@ foo\newpage
\end{externalDocument}
-\clearpage
The same example sorted with the \verb|-a| or \verb|--no_casesensitive| has another output: now
\verb|xindex-cfg-common.lua| is the first one of the \verb|xindex-???| series.
@@ -1138,7 +1392,6 @@ Test
-\clearpage
\section{Pagenumbers}
\subsection{Compressing pagenumber series}\label{Compressing}
@@ -1175,7 +1428,6 @@ folium = {
pages={6},
frame=false,
compiler=lualatex,
- force=false,
crop,
xindex,
xindexOptions=-l fr,
@@ -1234,7 +1486,6 @@ of the same type, so we get \texttt{1f} in the output.
frame=false,
compiler=lualatex,
crop,
- force=false,
xindex,
xindexOptions=-l de,
runs=2,code,docType=latex,
@@ -1301,7 +1552,6 @@ envStop = "\\end{description}"
% xindexOptions=-c description -g,
runs=2,
code,docType=latex,
- force=false,
%xindex -c description -n -g xindex-17.idx
%xindex -c description -n --no_pagenumber gls.idx
% runsequence={lualatex,{xindex -c description -n -g},lualatex,lualatex},
@@ -1727,14 +1977,13 @@ baz\index{foo!bar!baz} foobar%
\end{externalDocument}
-
-%\clearpage
+\clearpage
\section{\texttt{hyperref}}
Using the package \Lpack{hyperref} is no problem:
-\enlargethispage{2.5\normalbaselineskip}
+%\enlargethispage{2.5\normalbaselineskip}
\begin{externalDocument}[
% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
@@ -1743,6 +1992,7 @@ Using the package \Lpack{hyperref} is no problem:
frame=false,
compiler=lualatex,
crop,
+ force,
xindex,
xindexOptions=-l de,
runs=2,code,docType=latex,
@@ -1767,23 +2017,19 @@ Using the package \Lpack{hyperref} is no problem:
%StopVisiblePreamble
\pagestyle{empty}
\begin{document}
-Sorted with \verb|-l DE|
-\Index{Österreich} \Index{Öresund}
-\Index{Ostern} \Index{Ober} \Index{Oberin}
-\Index{Österreich} \index{Öresund|textbf}
-\Index{Ostern} \Index{Ober} \Index{Oberin}
-\Index{Obstler} \Index{Öl} \Index{ölen}
-\Index{Ödem} \Index{Oligarch} \Index{Oder}
-\Index{oder} \index{Fluss!Oder|textit}
-\Index{Oder|seealso{Fluss}} \Index{Göbel}
-\Index{Goethe} \Index{Göthe} \Index{Götz}
-\newpage\Index{Goldmann} \Index{Goethe}
-\newpage \printindex
+Sorted with \verb|-l DE| \par
+\Index{Österreich} \Index{Öresund} \Index{Ostern}
+\Index{Ober} \Index{Oberin} \Index{Österreich}
+\index{Öresund|textbf} \Index{Ostern} \Index{Ober}
+\Index{Oberin} \Index{Obstler} \Index{Öl} \Index{ölen}
+\Index{Ödem} \Index{Oligarch} \Index{Oder} \Index{oder}
+\index{Fluss!Oder|textit} \Index{Oder|seealso{Fluss}}
+\Index{Göbel} \Index{Goethe} \Index{Göthe} \Index{Götz}
+\newpage\Index{Goldmann} \Index{Goethe} \newpage \printindex
\end{document}
\end{externalDocument}
-
The following example fixes a problem with \Lpack{hyperref} and escaping the | character,
e.g.\verb/"|/. In such a case \Lpack{hyperref} ignores the vertical bar.
With the optional parameter \verb/-f | --fix_hyperref/, which is still experimental,
@@ -1791,7 +2037,6 @@ With the optional parameter \verb/-f | --fix_hyperref/, which is still experimen
of using this problematic vertical character, you can use \Lcs{textbar}, which also solves the
problem.
-
\begin{externalDocument}[
% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
% mpwidth=0.55\linewidth,
@@ -1799,7 +2044,6 @@ problem.
frame=false,
compiler=lualatex,
crop,
- force=false,
shellesc,
% xindex,
% xindexOptions=-,
@@ -1877,7 +2121,6 @@ such commands are ignored. In the following example we put an horizontal line af
pages={2},
frame=false,
compiler=lualatex,
- force=false,
crop,
xindex,
xindexOptions=-l de,
@@ -1981,7 +2224,6 @@ In the documents preamble there is the definition:
% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
mpwidth=0.6\linewidth,
pages={2},
- force=false,
frame=false,
compiler=lualatex,
crop,
@@ -2127,10 +2369,8 @@ and adds the program \Lprog{xindex} as the default program to \Lpack{imakeidx}.
mpwidth=0.55\linewidth,
pages={6},
frame=false,
- force=false,
compiler=lualatex,
crop,
- force=false,
% xindex,
% xindexOptions=-l de,
runs=2,code,docType=latex,
@@ -2229,6 +2469,54 @@ in the argument of \Lcs{indexentry}.
\appendix
\section{Examples}
+Correct french sorting with UCA:
+
+\begin{externalDocument}[
+% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+ mpwidth=0.55\linewidth,
+ pages={3},
+ frame=false,
+ compiler=lualatex,
+ crop,
+ xindex,
+ xindexOptions=-l fr,
+ runs=2,code,docType=latex,
+ showFilename,
+ align=\centering,
+ grfOptions={width=\linewidth},
+ lstOptions={columns=fixed}]{xindex}
+%! lualatex --shell-escape
+\documentclass[paper=a4,twocolumn]{scrartcl}
+\usepackage{libertinus-otf}
+\let\NewPage\newpage% only for demo
+\makeatletter
+\renewcommand\newpage{\NewPage\let\ps@plain\ps@empty}
+\makeatother
+%StartVisiblePreamble
+\usepackage[french]{babel}
+\usepackage[imakeidx]{xindex} \makeindex
+\newcommand*{\IND}[1]{\index{#1}#1\par}
+%StopVisiblePreamble
+\begin{document}
+%%% xindex -l fr <file>
+\IND{CÔTÉ} \IND{cote} \IND{Côté} \IND{COTÉ} \IND{côte}
+\IND{COTE} \IND{côté} \IND{Coté} \IND{coté} \IND{Cote}
+\IND{CÔTE} \IND{Côte} \IND{lésé} \IND{péché}
+\IND{bohème} \IND{gêné} \IND{pêche} \IND{cæsium}
+\IND{pêcher} \IND{révèle} \IND{pécher} \IND{révélé}
+\IND{Bohême} \IND{relève} \IND{PÉCHÉ} \IND{maçon}
+\IND{relevé} \IND{Élève} \IND{gêne} \IND{élevé}
+\IND{MÂCON} \IND{gène} \IND{Bohémien} \IND{caennais}
+\IND{lèse} \IND{coexistence} \IND{cœur}
+\IND{coefficient} \IND{cafard} \IND{CŒUR} \IND{CÆSIUM}
+\newpage \IND{coté} \IND{cœur} \IND{péché} \newpage
+\IND{coté}\IND{coefficient} \printindex
+\end{document}
+\end{externalDocument}
+
+
+
+
\begin{externalDocument}[
% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
mpwidth=0.55\linewidth,