From 8149fd6ad2a77d8e404b3db858ec9b9361808052 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 30 Jul 2023 20:03:46 +0000 Subject: xindex (30jul23) git-svn-id: svn://tug.org/texlive/trunk@67771 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/lualatex/xindex/CHANGELOG | 1 + .../texmf-dist/doc/lualatex/xindex/xindex-doc.pdf | Bin 586805 -> 588580 bytes .../texmf-dist/doc/lualatex/xindex/xindex-doc.tex | 90 ++++++++++++++------- 3 files changed, 60 insertions(+), 31 deletions(-) (limited to 'Master/texmf-dist/doc/lualatex') diff --git a/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG b/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG index ad8eb4a5c75..df515fcbec3 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG +++ b/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG @@ -1,3 +1,4 @@ +0.55 2023-07-30 - fix for wrong presort -- disabled the use of \writeidx 0.54 2023-07-28 - do not print control output for testing 0.53 2023-07-16 - added function literize to escape special lua characters for gsub and xindex's escape character diff --git a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf index 9bfb596be99..31143f6fe1e 100644 Binary files a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf and b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf differ diff --git a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex index f452980050e..df19098a873 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex +++ b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex @@ -81,7 +81,7 @@ \def\setVersion#1{\setVVersion#1!!} \def\setVVersion#1=#2!!{\def\xIndexVersion{#2}} -\setVersion{version = 0.54}% can be automatically changed by perl +\setVersion{version = 0.55}% can be automatically changed by perl @@ -364,11 +364,12 @@ For the German language the double quote is an active character and it makes lif if one chooses another character. The escape character can be changed easily by the optional argument \verb|-e ""| or \verb|--escapechar "|. The following example shows how -it works for the \Index{escape character} »>« (greater). By default the expression »>!">« will +it works for the \Index{escape character} »>« (greater). By default the expression »\verb|>>|«\index{>\kern0pt>} +will be a \TeX\ ligature with the output »>>«. %Internally the escape sequences are -With the beginning of \Lprog{xindex }the escaped chars -are converted into the internal strings and later back to the origin meaning. +With the beginning of \Lprog{xindex}the escaped chars +are converted into the internal strings and later back to the original meaning. The two characters \verb|{}| cannot be used as \verb|\{\}| inside the argument of \Lcs{index}. The package \Lpack{xindex} defines the two helper macros @@ -385,7 +386,7 @@ The following example shows how to use it: frame, compiler=lualatex, crop, - force=true, + force=false, xindex, xindexOptions=-e ">", runs=2,code,docType=latex, @@ -456,7 +457,7 @@ The following example was run with \verb|xindex -l it .idx|: frame, compiler=lualatex, crop, - force=true, + force=false, xindex, xindexOptions=-l it -e ">", runs=2,code,docType=latex, @@ -503,7 +504,7 @@ package \Lpack{babel} or \Lpack{polyglossia} are used. frame, compiler=lualatex, crop, - force=true, + force=false, xindex, xindexOptions=-k -e "?", runs=2,code,docType=latex, @@ -604,7 +605,7 @@ This allows to have different indexes with different language. - +\clearpage \section{Sorting} @@ -883,7 +884,7 @@ by Michal Hoftich's Lua package \texttt{LUA-UCA}, which should be part of any \T 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 don't in the file \Lfile{xindex-cfg-uca.lua}, which will automatically be read +UCA should be done in the file \Lfile{xindex-cfg-uca.lua}, which will automatically be read by \Lprog{xindex}. \iffalse @@ -908,7 +909,7 @@ where you define your own sorting scheme, you should not use the \verb|-u| optio frame=false, compiler=lualatex, crop, - force=true, + force=false, xindex, xindexOptions=-u -l cs, runs=2,code,docType=latex, @@ -1174,6 +1175,7 @@ folium = { pages={6}, frame=false, compiler=lualatex, + force=false, crop, xindex, xindexOptions=-l fr, @@ -1193,6 +1195,7 @@ folium = { \let\item\@idxitem} \makeatother %StartVisiblePreamble +\usepackage[french]{babel} \usepackage{makeidx}\makeindex %StopVisiblePreamble \pagestyle{empty} @@ -1231,7 +1234,7 @@ of the same type, so we get \texttt{1f} in the output. frame=false, compiler=lualatex, crop, - force=true, + force=false, xindex, xindexOptions=-l de, runs=2,code,docType=latex, @@ -1298,7 +1301,7 @@ envStop = "\\end{description}" % xindexOptions=-c description -g, runs=2, code,docType=latex, - force=true, + 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}, @@ -1399,8 +1402,9 @@ composed of an equal number of quarks and antiquarks: $S=0$.}pion. \section{The config file} -The main config file is \Lfile{xindex-cfg.lua} is used by default and loading it by the -optional parameter -c makes no sense. A new config file must have the prefix \texttt{xindex-} +The main config file is \Lfile{xindex-cfg.lua} and used by default. % and loading it by the +%optional parameter -c makes no sense. +A new config file must have the prefix \texttt{xindex-} and the file extension \Lext{lua}, for example: \Lfile{xindex-HAdW-eKO.lua} which can be used with \verb|--config HAdW-eKO|. The file must be saved in the documents directory or in one which is known to \Lprog{kpsewhich}, for example\footnote{The directory \texttt{xindex} must be created @@ -1415,7 +1419,7 @@ itemPageDelimiter = "," -- Hello, 14 compressPages = true -- something like 12--15, instead of 12,13,14,15. the |( ... |) syntax is still valid fCompress = true -- 3f -> page 3, 4 and 3ff -> page 3, 4, 5 -minCompress = 3 -- 14--17 or +minCompress = 3 -- 14--17 rangeSymbol = "--" numericPage = true -- for non numerical pagenumbers, like "VI-17" sublabels = {"", "-\\-", "--\\-", "---\\-"} @@ -1468,9 +1472,10 @@ function specialCompressPageList(pages) end \end{verbatim} +The above code is a special function which can handle \Index{page number}s like VII-17, VIII/2/1-186. Internally exists a function \verb|compressPageList| which is used if no -\verb|specialCompressPageList| is defined. +\verb|specialCompressPageList| is defined. \begin{externalDocument}[ grfOptions={scale=0.9},% width=\dimexpr\linewidth-2\fboxsep-2\fboxrule}, @@ -1563,6 +1568,15 @@ Internally exists a function \verb|compressPageList| which is used if no \end{document} \end{externalDocument} +The \Lext{idx} file of the above example looks like + +\begin{verbatim} +\indexentry{Karl!V., Kaiser}{VI/2-1210} +\indexentry{Braunschweig-Wolfenbüttel!Karl Viktor von, Herzog}{VI/1-83} +\indexentry{Schleswig-Holstein!Rudolf von, Herzog}{VII/2/1-758} +\indexentry{Schleswig-Holstein!Rudolf von, Herzog}{VII/2/1-759} +[...] +\end{verbatim} @@ -1590,11 +1604,17 @@ end \end{verbatim} -The following example runs \verb|xindex -c dtk -l de -n | +The following example runs \verb|xindex -c dtk -l de -n | and the \Lext{idx} file looks like + +\begin{verbatim} +\indexentry{BährendtsenElke@Elke Bährendtsen!\Email {elke"@xyz.de}}{14} +\indexentry{JacekJonasson Jared@Jonasson Jared Jazek!\Email {mail"@jones.net}}{20} +[...] +\end{verbatim} \begin{externalDocument}[ grfOptions={scale=0.9},% width=\dimexpr\linewidth-2\fboxsep-2\fboxrule}, - mpwidth=0.25\linewidth, +% mpwidth=0.25\linewidth, pages={1}, frame=false, compiler=lualatex, @@ -1708,7 +1728,7 @@ baz\index{foo!bar!baz} foobar% -\clearpage +%\clearpage \section{\texttt{hyperref}} @@ -1779,7 +1799,7 @@ problem. frame=false, compiler=lualatex, crop, - force=true, + force=false, shellesc, % xindex, % xindexOptions=-, @@ -1828,7 +1848,7 @@ problem. The command \Lcs{addtocontents} doesn't work for the index file. With the \LaTeX\ package \Lpack{xindex} (same name as the Lua program \Lprog{xindex}) defines a macro \Lcs{writeidx} which writes its argument into the \Lext{idx} file. This can be useful to insert a -\Index{pagebreak}/""\Index{columnbreak} +\Index{pagebreak}\slash\Index{columnbreak} before a new letter in the output of the index file: @@ -1853,10 +1873,11 @@ such commands are ignored. In the following example we put an horizontal line af \begin{externalDocument}[ % grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule}, - mpwidth=0.55\linewidth, +% mpwidth=0.55\linewidth, pages={2}, frame=false, compiler=lualatex, + force=false, crop, xindex, xindexOptions=-l de, @@ -1945,14 +1966,22 @@ an own config file \Lfile{xindex-header.lua} which has the line \verb|idxnewletter = "\\idxnewletter"| + +\clearpage + + In the documents preamble there is the definition: \verb|\newcommand\idxnewletter[1]{\textbf{\textit{#1}}}| + + + \begin{externalDocument}[ % grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule}, - mpwidth=0.55\linewidth, + mpwidth=0.6\linewidth, pages={2}, + force=false, frame=false, compiler=lualatex, crop, @@ -2063,11 +2092,11 @@ alphabet_upper = { -- for sorting \parskip\z@ \@plus .3\p@\relax \parindent\z@ \let\item\@idxitem} \makeatother +\pagestyle{empty} %StartVisiblePreamble \usepackage{makeidx}\makeindex \newcommand\idxnewletter[1]{\textbf{\textit{#1}}} %StopVisiblePreamble -\pagestyle{empty} \begin{document} \section{Escaping characters} \begin{itemize} @@ -2078,15 +2107,14 @@ alphabet_upper = { -- for sorting \item At character @ \index{At ("@)} \end{itemize} run \verb|xindex -c header | -\index{@\texttt{}} +\index{@\texttt{}} \index{123} -\newpage -\printindex +\newpage \printindex \end{document} \end{externalDocument} -\clearpage +%\clearpage \section{Automatic index creation} @@ -2099,10 +2127,10 @@ and adds the program \Lprog{xindex} as the default program to \Lpack{imakeidx}. mpwidth=0.55\linewidth, pages={6}, frame=false, - force=true, + force=false, compiler=lualatex, crop, - force=true, + force=false, % xindex, % xindexOptions=-l de, runs=2,code,docType=latex, @@ -2284,7 +2312,7 @@ Test \index{A!Test} oder auch \index{B!Test} \end{externalDocument} -%\clearpage +\clearpage \begin{externalDocument}[ -- cgit v1.2.3