summaryrefslogtreecommitdiff
path: root/indexing/xindex/doc/xindex-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'indexing/xindex/doc/xindex-doc.tex')
-rw-r--r--indexing/xindex/doc/xindex-doc.tex197
1 files changed, 132 insertions, 65 deletions
diff --git a/indexing/xindex/doc/xindex-doc.tex b/indexing/xindex/doc/xindex-doc.tex
index 25058bc065..bf2dd746da 100644
--- a/indexing/xindex/doc/xindex-doc.tex
+++ b/indexing/xindex/doc/xindex-doc.tex
@@ -81,9 +81,8 @@
\def\setVersion#1{\setVVersion#1!!}
\def\setVVersion#1=#2!!{\def\xIndexVersion{#2}}
-\setVersion{version = 0.48}% can be automatically changed by perl
+\setVersion{version = 0.49}% can be automatically changed by perl
-\setkeys{hv}{cleanup=true,force=false,ExampleDir=Examples,moveToExampleDir}
\title{Program and package \texttt{xindex} \\--\\ \normalsize \xIndexVersion\ (\today)}
@@ -138,11 +137,11 @@ data = { Entry = <text>, -- like the input line without command \indexentry
special = <macro> }
},
sortChar = <unicode codepoint>, -- of the first character of Entry
- Macro = <TeX macro> -- only useful with LaTeX package \Lpack{xindex}
+ Macro = <TeX macro> -- only useful with LaTeX package xindex
}
\end{verbatim}
-After reading the input file the table \texttt{pages} has only one element for the number\index{page number}
+After reading the input file the Lua table \texttt{pages} has only one element for the number\index{page number}
and the so-called special command. When the pages are compressed the table will collect all pages which
refer to the same \Index{entry name}.
@@ -249,6 +248,9 @@ are alphabetized.
\fi
+\setkeys{hv}{moveToExampleDir=true,ExampleDir=Examples,cleanup={},verbose,force=false,shellesc}
+
+
\begin{externalDocument}[
% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
pages={1,2},
@@ -256,12 +258,13 @@ are alphabetized.
compiler=lualatex,
crop,
xindex,
+ xindexOptions=-u, % use unicode
runs=2,code,docType=latex,
showFilename,
align=\centering,
lstOptions={columns=fixed}]{xindex}
%! lualatex
-%! xindex
+%! xindex -u (use unicode)
\documentclass{scrartcl}
\makeatletter
\def\theindex{% only for demonstration
@@ -269,27 +272,83 @@ are alphabetized.
\parskip\z@ \@plus .3\p@\relax \parindent\z@
\let\item\@idxitem}
\makeatother
+%StartVisiblePreamble
+\usepackage{makeidx}\makeindex
+\usepackage{xindex}% for \left|\rightParen
+%StopVisiblePreamble
+\pagestyle{empty}
+\begin{document}
+\section{Escaping characters}
+\begin{itemize}
+\item Exclamation mark ! \index{Exclamation ("!)}\index{"!}
+\item Vertical bar | \index{Vertical bar ("|)}\index{"|}
+\item Doublequote \verb|"| \index{""}
+\item Double doublequote \verb|""| \index{""""}
+\item At character @ \index{At ("@)}\index{"@}
+\item Left paranthesis \{ \index{\parenLeft}
+\item Right paranthesis \} \index{\parenRight}
+\end{itemize}
+run \texttt{xindex -u <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
+\index{Etage} \index{Ètagé}
+\newpage
+\printindex
+\end{document}
+\end{externalDocument}
+
+It is by design that the parentheses \{ and \} cannot be used as index entry. The \emph{package}
+xindex defines the two commands \Lcs{parenLeft} and \Lcs{parenRight} which can be used instead
+(see examples above and and below).
+The same example without using unicode sorting (no option \Loption{-u}):
+
+
+\begin{externalDocument}[
+% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+ pages={1,2},
+ frame,
+ compiler=lualatex,
+ crop,
+ xindex,
+% xindexOptions=-u, % use unicode
+ runs=2,code,docType=latex,
+ showFilename,
+ align=\centering,
+ lstOptions={columns=fixed}]{xindex}
+%! lualatex
+%! xindex (no unicode sort -- simple ascii)
+\documentclass{scrartcl}
+\makeatletter
+\def\theindex{% only for demonstration
+ \section*{\indexname}
+ \parskip\z@ \@plus .3\p@\relax \parindent\z@
+ \let\item\@idxitem}
+\makeatother
%StartVisiblePreamble
\usepackage{makeidx}\makeindex
+\usepackage{xindex}% for \left|\rightParen
%StopVisiblePreamble
\pagestyle{empty}
\begin{document}
\section{Escaping characters}
\begin{itemize}
-\item Exclamation mark ! \index{exclaim ("!)}
-\item Vertical bar| \index{Vertical bar ("|)}
+\item Exclamation mark ! \index{Exclamation ("!)}\index{"!}
+\item Vertical bar | \index{Vertical bar ("|)}\index{"|}
\item Doublequote \verb|"| \index{""}
\item Double doublequote \verb|""| \index{""""}
-\item At character @ \index{At ("@)}
+\item At character @ \index{At ("@)}\index{"@}
+\item Left paranthesis \{ \index{\parenLeft}
+\item Right paranthesis \} \index{\parenRight}
\end{itemize}
-run \texttt{xindex <file.idx>}\index{<file.idx>}\index{123}
+run \texttt{xindex -u <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
+\index{Etage} \index{Ètagé}
\newpage
\printindex
\end{document}
\end{externalDocument}
+
+
For the German language the double quote is an active character and it makes life easier
if one chooses another character.
The escape character can be changed easily by the optional argument \verb|-e "<char>"| or
@@ -308,7 +367,15 @@ escape_chars = { -- by default " is the escape char
which is, of course, not of interest for the user. With the beginning the escaped chars
are converted into the internal strings and later back to the origin 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
+\begin{verbatim}
+\providecommand\parenLeft{\{}
+\providecommand\parenRight{\}}
+\end{verbatim}
+
+The following example shows how to use it:
\begin{externalDocument}[
% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
@@ -331,6 +398,7 @@ are converted into the internal strings and later back to the origin meaning.
\let\item\@idxitem}
\makeatother
%StartVisiblePreamble
+\usepackage{xindex}
\usepackage{makeidx}\makeindex
%StopVisiblePreamble
\pagestyle{empty}
@@ -342,6 +410,8 @@ are converted into the internal strings and later back to the origin meaning.
\item Doublequote \verb|"| \index{>"}
\item Double doublequote \verb|""| \index{>">"}
\item At character @ \index{At (>@)}
+\item Group start \{ \index{\parenLeft}
+\item Group end \{ \index{\parenRight}
\end{itemize}
Run \texttt{xindex} with \texttt{xindex -e ">"}\index{<file.idx>}\index{123}
\newpage
@@ -728,23 +798,24 @@ The following runs with \verb|xindex -l jp <file>|:
% {\perCent StopVisiblePreamble}% #5
\noindent
-\begin{minipage}[t]{0.45\linewidth}
-\vspace{0pt}
+%\begin{minipage}[t]{0.45\linewidth}
+%\vspace{0pt}
\setsansfont{SourceHanSans}\sffamily
\edef\FancyVerbStartString{\perCent StartVisiblePreamble}
\edef\FancyVerbStopString{\perCent StopVisiblePreamble}
\colorbox{black!20}{\parbox{\linewidth}{%
-\VerbatimInput[fontfamily=helvetica]{Examples/xindex-6.tex}
+\VerbatimInput[fontfamily=helvetica]{Examples/xindex-9.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-6.tex}
+\VerbatimInput[fontfamily=helvetica]{Examples/xindex-9.tex}
}}
-\end{minipage}\hfill
-\begin{minipage}[t]{0.54\linewidth}
-\vspace{0pt}
+
+%\end{minipage}\hfill
+%\begin{minipage}[t]{0.54\linewidth}
+%\vspace{0pt}
\begin{externalDocument}[
% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
% mpwidth=0.5\linewidth,
@@ -785,18 +856,14 @@ The following runs with \verb|xindex -l jp <file>|:
\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}
+日本\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}
+%\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
@@ -815,12 +882,15 @@ by \Lprog{xindex}.
frame=false,
compiler=lualatex,
crop,
+ force=true,
xindex,
xindexOptions=-u -l cs,
runs=2,code,docType=latex,
showFilename,
align=\centering,
- lstOptions={columns=fixed}]{xindex}
+ usefancyvrb,
+% lstOptions={columns=fixed}
+]{xindex}
%! lualatex
\documentclass[paper=a6]{scrartcl}
\makeatletter
@@ -840,7 +910,7 @@ 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ů}
+\Index{žába}, \Index{7 dubů}
\begin{multicols}{2} \printindex \end{multicols}
\end{document}
\end{externalDocument}
@@ -858,7 +928,7 @@ the \verb|xindex-???| series because uppercase letters are sorted before lowerca
mpwidth=0.55\linewidth,
pages={2},
frame=false,
- compiler=lualatex --shell-escape,
+ compiler=lualatex,
crop,
xindex,
% xindexOptions=,
@@ -903,6 +973,7 @@ 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.
@@ -913,7 +984,7 @@ The same example sorted with the \verb|-a| or \verb|--no_casesensitive| has anot
mpwidth=0.55\linewidth,
pages={2},
frame=false,
- compiler=lualatex --shell-escape,
+ compiler=lualatex,
crop,
xindex,
xindexOptions=-a,
@@ -963,14 +1034,14 @@ foo\newpage
\subsection{Ignore space for sorting}
-By default \textsf{alpha sort} will be sorted \emph{before} \textsf{alphaA}:
+By default »\textsf{alpha sort}« will be sorted \emph{before} »\textsf{alphaA}«:
\begin{externalDocument}[
% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
mpwidth=0.55\linewidth,
pages={2},
frame=false,
- compiler=lualatex --shell-escape,
+ compiler=lualatex,
crop,
xindex,
% xindexOptions=,
@@ -1008,7 +1079,7 @@ This can be changed with the optional argument \verb|-i| or \verb|--ignoreSpace|
mpwidth=0.55\linewidth,
pages={2},
frame=false,
- compiler=lualatex --shell-escape,
+ compiler=lualatex,
crop,
xindex,
xindexOptions=-i,
@@ -1191,11 +1262,15 @@ envStop = "\\end{description}"
pages={2,3},
frame=true,
compiler=lualatex,
- %crop,
- force=true,
+ verbose,
% xindex,
% xindexOptions=-c description -g,
- runs=2,code,docType=latex,
+ runs=2,
+ code,docType=latex,
+ force=true,
+ %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}
showFilename,
align=\centering,
grfOptions={width=0.45\linewidth},
@@ -1233,10 +1308,11 @@ envStop = "\\end{description}"
alphabet_lower = { { 'е', 'ё' } }
alphabet_upper = { { 'Е', 'Ё' } }
\end{filecontents}
+%xindex -c description -n --no_pagenumber gls.idx
%StartVisiblePreamble
\usepackage[english]{babel}
\usepackage[imakeidx]{xindex}% run xindex internally
-\makeindex[options= -c description -n -g ] % -g same as --no_pagenumber
+\makeindex
\makeindex[name=gls, options= -c description -n --no_pagenumber]
%StopVisiblePreamble
\pagestyle{empty}
@@ -1495,6 +1571,7 @@ The following example runs \verb|xindex -c dtk -l de -n <input>|
xindex,
xindexOptions=-c dtk -n -l de,
runs=2,code,docType=latex,
+ runsAfter=2,
showFilename,
align=\centering,
lstOptions={columns=fixed}]{xindex}
@@ -1689,7 +1766,7 @@ such commands are ignored. In the following example we put an horizontal line af
mpwidth=0.55\linewidth,
pages={2},
frame=false,
- compiler=lualatex --shell-escape,
+ compiler=lualatex,
crop,
xindex,
xindexOptions=-l de,
@@ -1932,11 +2009,17 @@ and adds the program \Lprog{xindex} as the default program to \Lpack{imakeidx}.
mpwidth=0.55\linewidth,
pages={6},
frame=false,
- compiler=lualatex --shell-escape,
+ force=true,
+ compiler=lualatex,
crop,
- xindex,
- xindexOptions=-l de,
+ force=true,
+% xindex,
+% xindexOptions=-l de,
runs=2,code,docType=latex,
+% runsAfter=2,
+% cleanup={},
+% moveToExampleDir=false,
+ shellesc,
showFilename,
align=\centering,
lstOptions={columns=fixed}]{xindex}
@@ -1949,7 +2032,7 @@ and adds the program \Lprog{xindex} as the default program to \Lpack{imakeidx}.
%StartVisiblePreamble
\usepackage[imakeidx]{xindex}
\makeindex[name=persons,title=Index of names,
- columns=1,options=--noheadings]
+ columns=1,options= --noheadings]
\def\ThanhVN{Hàn Thê\protect\llap{%
\raise 0.5ex\hbox{\'{}}}}
%StopVisiblePreamble
@@ -2033,10 +2116,10 @@ in the argument of \Lcs{indexentry}.
mpwidth=0.55\linewidth,
pages={2},
frame=false,
- compiler=lualatex --shell-escape,
+ compiler=lualatex,
crop,
- xindex,
- xindexOptions=-l de,
+% xindex,
+% xindexOptions=-l de,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -2082,10 +2165,10 @@ Duplicate alpha beta gamma.\index{alpha!beta!gamma}
mpwidth=0.55\linewidth,
pages={2},
frame=false,
- compiler=lualatex --shell-escape,
+ compiler=lualatex,
crop,
- xindex,
- xindexOptions=-l de,
+% xindex,
+% xindexOptions=-l de,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -2100,7 +2183,7 @@ Duplicate alpha beta gamma.\index{alpha!beta!gamma}
\makeatother
%StartVisiblePreamble
\usepackage[imakeidx]{xindex}
-\makeindex
+\makeindex[options=-l de]
% Martin Sievers
%StopVisiblePreamble
\begin{document}
@@ -2119,7 +2202,7 @@ Test \index{A!Test} oder auch \index{B!Test}
mpwidth=0.55\linewidth,
pages={2},
frame=false,
- compiler=lualatex --shell-escape,
+ compiler=lualatex,
crop,
xindex,
% xindexOptions=-l de,
@@ -2148,22 +2231,6 @@ Foo\index{foo!bar2!baz2}
\end{document}
\end{externalDocument}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\printindex
\end{document}