diff options
author | Karl Berry <karl@freefriends.org> | 2020-06-03 21:22:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-06-03 21:22:07 +0000 |
commit | 51fd9695523eae3273b36259411d456341f02a64 (patch) | |
tree | 2ac7e8aa79b5d5860e339b4405d84fa255fa7967 /Master/texmf-dist/doc/lualatex/xindex | |
parent | ca46fdb68d0556867eabb3169853811b944c9d19 (diff) |
xindex (3jun20)
git-svn-id: svn://tug.org/texlive/trunk@55401 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/lualatex/xindex')
16 files changed, 114 insertions, 55 deletions
diff --git a/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG b/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG index 5278afea3bf..71e72113cb2 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG +++ b/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG @@ -1,3 +1,4 @@ +0.23 2020-06-02 - added support for the package LUA-UCA (Unicode Collation Algorithm) 0.22 2020-05-30 - added test for correct language with a fallback to english (en) and also allow de_DE, where only the first two letters are used 0.21 2020-05-29 - added support for italian language diff --git a/Master/texmf-dist/doc/lualatex/xindex/Makefile b/Master/texmf-dist/doc/lualatex/xindex/Makefile index d0e8fd6fd72..7e5529f499b 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/Makefile +++ b/Master/texmf-dist/doc/lualatex/xindex/Makefile @@ -1,8 +1,7 @@ -# `Makefile' for `pst-grad.pdf', hv, 2008/08/11 .SUFFIXES : .tex .ltx .dvi .ps .pdf .eps -PACKAGE = xhfill +PACKAGE = xindex MAIN = xindex-doc @@ -21,13 +20,13 @@ doc: # if ! test -f $(MAIN).glo ; then touch $(MAIN).glo; fi if ! test -f $(MAIN).idx ; then touch $(MAIN).idx; fi # makeindex -s gglo.ist -t $(MAIN).glg -o $(MAIN).gls $(MAIN).glo - xindex $(MAIN).idx + xindex -a $(MAIN).idx # bibtex $(MAIN) $(LATEX) --shell-escape $(MAIN) # $(LATEX) --shell-escape $(MAIN) clean : - $(RM) *.dvi *.aux *.log *.xml xindex-?.tex xindex-??.tex *.ind *.idx *.toc *.out *.ilg *.adx + $(RM) *.dvi *.aux *.log *.xml xindex-?.tex xindex-??.tex *.ind *.idx *.toc *.out *.ilg veryclean : clean $(RM) *.pdf diff --git a/Master/texmf-dist/doc/lualatex/xindex/README.md b/Master/texmf-dist/doc/lualatex/xindex/README.md index c4356291996..70f0bd970da 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/README.md +++ b/Master/texmf-dist/doc/lualatex/xindex/README.md @@ -7,6 +7,7 @@ will be included in at least LuaTeX 1.09 (TeXLive 2019) * xindex.lua -- main file * xindex-cfg.lua -- config module * xindex-cfg-common.lua -- main config module +* xindex-cfg-uca.lua -- config module for uca * xindex-base.lua -- base file * xindex-lib.lua -- functions module * xindex-lapp.lua -- read parameter @@ -17,15 +18,17 @@ The syntax of `xindex` xindex [options] <inputfile>[.idx] possible options are (short,long): - -q,--quiet -h,--help - -v + -v... Verbosity level; can be -v, -vv, -vvv -c,--config (default cfg) -e,--escapechar (default ") -n,--noheadings + -a,--no_casesensitive -o,--output (default "") -l,--language (default en) + -p,--prefix (default L) + -u,--use_UCA <input> (string) Testfiles: @@ -42,4 +45,3 @@ buch.tex: run ./xindex.lua buch.idx lualatex buch - diff --git a/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.pdf b/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.pdf Binary files differindex 2c52208cf43..239f431bc92 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.pdf +++ b/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.pdf diff --git a/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex b/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex index 99c2c177592..1a837fd93b5 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex +++ b/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex @@ -1,10 +1,11 @@ \documentclass[paper=a4,parskip=half-,ngerman,DIV=13]{scrartcl} \usepackage{eurosym} \usepackage[silent]{fontspec} -\usepackage[nomath]{libertinus-otf} +\usepackage{libertinus-otf} \usepackage{babel} \usepackage{makeidx} -\usepackage{dtk-logos,xcolor} +\usepackage{dtk-logos} +\usepackage[table]{xcolor} \makeatletter \def\theindex{% only for demonstration \section*{\indexname} @@ -13,7 +14,7 @@ \makeatother \begin{document} -Run with \verb|xindex --config HAdW| +Run with \verb|xindex --config HAdW-eKO| \printindex \end{document} diff --git a/Master/texmf-dist/doc/lualatex/xindex/tests/HADW2.ind b/Master/texmf-dist/doc/lualatex/xindex/tests/HADW2.ind index d5ba7965fb0..04ba01c38b7 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/tests/HADW2.ind +++ b/Master/texmf-dist/doc/lualatex/xindex/tests/HADW2.ind @@ -2,63 +2,67 @@ \begin{theindex} \indexspace -\textbf{A}\label{L-xindex-A} +\textbf{K} \nopagebreak[4] - \item Aachen, Johannes von \dotfill {\colorbox{black!15}{VII/1}:~215} - \item Aarones \dotfill {\colorbox{black!15}{VII/2/1}:~1003}, {1012} - \item Abrahamson \dotfill {\colorbox{black!15}{VII/2/1}:~864}, {991}, {1048}, {1067}, {1156} - \item Adamson \dotfill {\colorbox{black!15}{VII/2/1}:~1223}, {\colorbox{black!15}{IX/1}:~1228} + \item Karl II, {VII/1 147} + \item Karl III, {VII/1 149} + \item Karl IV, {VII/1 147}, {34} + \item Karl V, {VII/1 34} + \item Karl VI, {VII/1 296} + \item Karl IX, {VII/1 296} + \item Karl X, {VII/1 149} + +\indexspace +\textbf{A} +\nopagebreak[4] + \item Aachen, Johannes von, {VII/1 215} + \item Aarones, {VII/2/1 1003}, {1012} + \item Abrahamson, {VII/2/1 1048}, {1067}, {1156}, {864}, {991} + \item Adamson, {VII/2/1 1223}, {IX/1 1228} \item Adrian - \subitem -\,Hauster \dotfill {\colorbox{black!15}{VII/1}:~514}, {\colorbox{black!15}{XI/1}:~515} + \subitem -\,Hauster, {VII/1 514}, {XI/1 515} \item Alting - \subitem -\,Mensa \dotfill {\colorbox{black!15}{VII/1}:~426}, {434}, {453}, {455}, {466f.} + \subitem -\,Mensa, {VII/1 426}, {434}, {453}, {455}, {466f} \indexspace -\textbf{B}\label{L-xindex-B} +\textbf{B} \nopagebreak[4] \item Bremen - \subitem -\,Heinz von, Erzbischof \dotfill \see{Sachsen-Lauenburg}{ } + \subitem -\,Heinz von, Erzbischof, \see{Sachsen-Lauenburg}{} \indexspace -\textbf{J}\label{L-xindex-J} +\textbf{J} \nopagebreak[4] \item Julian - \subitem -\,Apostata, römischer Kaiser \dotfill {\colorbox{black!15}{VII/2/1}:~904} - \item Justinian I., byzantinischer Kaiser \dotfill {\colorbox{black!15}{VII/1}:~326}, {734}, {\colorbox{black!15}{VII/2/1}:~1011} + \subitem -\,Apostata, römischer Kaiser, {VII/2/1 904} + \item Justinian I., byzantinischer Kaiser, {VII/1 326}, {734}, {VII/2/1 1011} \indexspace -\textbf{K}\label{L-xindex-K} +\textbf{K} \nopagebreak[4] \item Karl - \subitem -\,II., Kaiser \dotfill {\colorbox{black!15}{VII/1}:~147} - \subitem -\,III., Kaiser \dotfill {\colorbox{black!15}{VII/1}:~149} - \subitem -\,IV., Kaiser \dotfill {\colorbox{black!15}{VII/1}:~147}, {147} - \subitem -\,V., Kaiser \dotfill {\colorbox{black!15}{VII/1}:~34} - \subitem -\,VI., Kaiser \dotfill {\colorbox{black!15}{VII/1}:~296} - \subitem -\,IX., Kaiser \dotfill {\colorbox{black!15}{VII/1}:~296} - \subitem -\,X., Kaiser \dotfill {\colorbox{black!15}{VII/1}:~149} - \item Karl II \dotfill {\colorbox{black!15}{VII/1}:~147} - \item Karl III \dotfill {\colorbox{black!15}{VII/1}:~149} - \item Karl IV \dotfill {\colorbox{black!15}{VII/1}:~147}, {147} - \item Karl V \dotfill {\colorbox{black!15}{VII/1}:~34} - \item Karl VI \dotfill {\colorbox{black!15}{VII/1}:~296} - \item Karl IX \dotfill {\colorbox{black!15}{VII/1}:~296} - \item Karl X \dotfill {\colorbox{black!15}{VII/1}:~149} + \subitem -\,II., Kaiser, {VII/1 147} + \subitem -\,III., Kaiser, {VII/1 149} + \subitem -\,IV., Kaiser, {VII/1 147}, {34} + \subitem -\,IX., Kaiser, {VII/1 296} + \subitem -\,V., Kaiser, {VII/1 34} + \subitem -\,VI., Kaiser, {VII/1 296} + \subitem -\,X., Kaiser, {VII/1 149} \indexspace -\textbf{O}\label{L-xindex-O} +\textbf{O} \nopagebreak[4] \item Osnabrück - \subitem -\,Heinz von, Bischof \dotfill \see{Sachsen-Lauenburg}{ } + \subitem -\,Heinz von, Bischof, \see{Sachsen-Lauenburg}{} \indexspace -\textbf{S}\label{L-xindex-S} +\textbf{S} \nopagebreak[4] \item Schleswig-Holstein - \subitem -\,Rudolf von, Herzog \dotfill {\colorbox{black!15}{VII/2/1}:~758--761}, {765} + \subitem -\,Rudolf von, Herzog, {VII/2/1 758--761}, {765} \indexspace -\textbf{Z}\label{L-xindex-Z} +\textbf{Z} \nopagebreak[4] - \item Zwingl, Haldrich \dotfill {\colorbox{black!15}{IX}:~479}, {692} + \item Zwingl, Haldrich, {IX 479}, {692} \end{theindex} diff --git a/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute.pdf b/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute.pdf Binary files differindex 1ec481723ea..d91d9f10ec6 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute.pdf +++ b/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute.pdf diff --git a/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute2.pdf b/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute2.pdf Binary files differindex eec56642650..c2b78f3f185 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute2.pdf +++ b/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute2.pdf diff --git a/Master/texmf-dist/doc/lualatex/xindex/tests/buch.ind b/Master/texmf-dist/doc/lualatex/xindex/tests/buch.ind index 0ce99318594..57a3d139cff 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/tests/buch.ind +++ b/Master/texmf-dist/doc/lualatex/xindex/tests/buch.ind @@ -473,10 +473,11 @@ \subitem -\,Stil, {378} \subitem -\,Tiefe, {64} \subitem -\,Warnung, {883} - \subitem -\,fett, {411}, {451} \item Schriftattribut, {660} \item Schrifteinbindung, {9} \item Schriftfamilie, {85}, {442}, {595} + \item Schrift + \subitem -\,fett, {411}, {451} \item Schriftgröße, {63}, {87}, {404} \item Schriftkodierung, {9}, {54}, {70} \item Schriftstärke, {87} diff --git a/Master/texmf-dist/doc/lualatex/xindex/tests/buch.pdf b/Master/texmf-dist/doc/lualatex/xindex/tests/buch.pdf Binary files differindex 9de350c28f2..5975dd18f7a 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/tests/buch.pdf +++ b/Master/texmf-dist/doc/lualatex/xindex/tests/buch.pdf diff --git a/Master/texmf-dist/doc/lualatex/xindex/tests/demo-hyperref.pdf b/Master/texmf-dist/doc/lualatex/xindex/tests/demo-hyperref.pdf Binary files differindex 77c6a61daac..dfe9b33aaa9 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/tests/demo-hyperref.pdf +++ b/Master/texmf-dist/doc/lualatex/xindex/tests/demo-hyperref.pdf diff --git a/Master/texmf-dist/doc/lualatex/xindex/tests/demo.pdf b/Master/texmf-dist/doc/lualatex/xindex/tests/demo.pdf Binary files differindex 5ef1b4633ae..0df70568641 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/tests/demo.pdf +++ b/Master/texmf-dist/doc/lualatex/xindex/tests/demo.pdf diff --git a/Master/texmf-dist/doc/lualatex/xindex/tests/demo3.pdf b/Master/texmf-dist/doc/lualatex/xindex/tests/demo3.pdf Binary files differindex 0d71e408732..b9718a4e31f 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/tests/demo3.pdf +++ b/Master/texmf-dist/doc/lualatex/xindex/tests/demo3.pdf diff --git a/Master/texmf-dist/doc/lualatex/xindex/tests/runTests.sh b/Master/texmf-dist/doc/lualatex/xindex/tests/runTests.sh index a762d96357c..678bfa40e78 100755 --- a/Master/texmf-dist/doc/lualatex/xindex/tests/runTests.sh +++ b/Master/texmf-dist/doc/lualatex/xindex/tests/runTests.sh @@ -23,10 +23,6 @@ lualatex demo-hyperref > /dev/null echo "HADW" xindex -l de -c HAdW-eKO HADW > /dev/null lualatex HADW > /dev/null -lualatex HADW > /dev/null - -echo "HADW2" -xindex -l de --config HAdW-eKO HADW2 > /dev/null echo "Umlaute" xindex -l de Umlaute > /dev/null diff --git a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf Binary files differindex a5ce61fc031..ccd6f2d3070 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf +++ b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf diff --git a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex index 6502c3deac3..050d21dca2c 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex +++ b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex @@ -80,7 +80,7 @@ \def\setVersion#1{\setVVersion#1!!} \def\setVVersion#1=#2!!{\def\xIndexVersion{#2}} -\setVersion{version = 0.22}% can be automatically changed by perl +\setVersion{version = 0.23}% can be automatically changed by perl \setkeys{dtk}{cleanup=true,force=false} @@ -94,6 +94,8 @@ \vfill Thanks to: \\ Mark Baudoin; +Denis Bitouzé; +Michal Hoftich; Heiko Oberdiek; Matteo Paolini @@ -162,6 +164,7 @@ xindex [-o,--output ] default is <input>.ind [-l,--language ] default is en [-p,--prefix] default L + [-u,--use_UCA ] default is false <input file> \end{verbatim} @@ -306,11 +309,13 @@ The predefined language is »en« and currently the following languages are poss {\Japanese \begin{Verbatim}[fontfamily=helvetica,commandchars=\\<>] indexheader = { + cs = {"Symboly", "Čísla"}, + da = {"Symboler", "Tal"}, de = {"Symbole", "Zahlen"}, en = {"Symbols", "Numbers"}, - fr = {"Symboles","Chiffre"}, + fr = {"Symboles","Nombres"}, it = {"Simboli", "Numeri"}, -\Japanese jp = {"シンボル","番号"}, + jp = {"シンボル","番号"}, } \end{Verbatim} } @@ -325,7 +330,7 @@ The following example was run with \verb|xindex -l it <file>.idx|: crop, xindex, xindexOptions=-l it -e ">", - force=true, + force=false, runs=2,code,docType=latex, showFilename, align=\centering, @@ -358,7 +363,7 @@ Run \texttt{xindex} with \texttt{xindex -l it -e ">"}\index{123} \section{Sorting} - +\subsection{Default sorting by a character table} The default sorting is unicode aware and uses a translation table for accented characters: \begin{verbatim} @@ -624,6 +629,54 @@ The following runs with \verb|xindex -l jp <file>|: \end{externalDocument} \end{minipage} +\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. + + +\begin{externalDocument}[ +% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule}, + mpwidth=0.55\linewidth, +% pages={6}, + frame=false, + compiler=lualatex, + crop, + xindex, + xindexOptions=-u -l cs, + force=true, + runs=2,code,docType=latex, + showFilename, + align=\centering, + lstOptions={columns=fixed}]{xindex} +\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} + +The sorting order can be easliy 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 dont in the file \Lfile{xindex-cfg-uca.lua}, which will automatically be read +by \Lprog{xindex}. + + %\clearpage @@ -643,12 +696,14 @@ file \Lfile{xindex-cfg-common.cfg}: \small \begin{Verbatim}[fontfamily=helvetica] folium = { + cs = {"f.", "ff."}, + da = {"f", "ff"}, de = {"f", "ff"}, en = {"f", "ff"}, - fr = {"\,sq","\,sqq"}, + fr = {"\\,sq","\\,sqq"}, it = {"f", "ff"}, - no = {"\\,f.","\\,ff."}, jp = {"シンボル","番号"}, + no = {"\\,f.","\\,ff."}, } \end{Verbatim} } |