%% %% This is file `luaindex-example.ltx', %% generated with the docstrip utility. %% %% The original source files were: %% %% luaindex.dtx (with options: `example') %% %% Copyright (c) 2011 by Markus Kohm %% %% This file was generated from file(s) of luaindex distribution. %% -------------------------------------------------------------- %% %% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, version 1.3c of the license. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3c or later is part of all distributions of LaTeX %% version 2005/12/01 or later. %% %% This work has the LPPL maintenance status "maintained". %% %% The Current Maintainer and author of this work is Markus Kohm. %% %% This file may only be distributed together with the files listed in %% `luaindex.dtx'. You may however distribute the files listed in %% `luaindex.dtx' without this file. %% %% NOTE: THIS IS AN ALPHA-VERSION! %% \NeedsTeXFormat{LaTeX2e}[1995/06/01] \ProvidesFile{luaindex-example.ltx} \documentclass{article} \usepackage[ngerman]{babel} \usepackage{blindtext} \usepackage{fontspec} \usepackage[ locale=de_DE, singlepass % Wenn der Index ohnehin eine neue Seite produziert, % dann kann er direkt beim ersten Lauf ein korrektes % Ergebnis liefern. ]{luaindex} \makeindex \directlua{luaindex.presortreplace('general',0, '\luatexluaescapestring{\string\textbf}\space*\string\{([\string^\string\}]*)\string\}','\%1')} \begin{document} \blindtext[10] A\index{B ist der zweite Buchstabe} aber\index{aber ist ein Wort} D\index{D ist der vierte Buchstabe} A\index{A ist der erste Buchstabe} A\index{A ist der erste Buchstabe} C\index{C ist "`der"' dritte Buchstabe} X\index{X ist der drittletzte Buchstabe} D\index{\textbf{D} ist der Buchstabe nach C} Y\index{Y ist der \textbf{vorletzte} Buchstabe} Z\index{Z ist der letzte Buchstabe} A\index{Ä ist auch ein Buchstabe} Ä\index[sort={Ä ist aber auch ein Buchstabe},% pageformat=\emph]{Ä ist wirklich auch ein Buchstabe (und hier stimmt die Sortierung nicht -- \emph{aber eigentlich doch})} \clearpage A\index{A ist der erste Buchstabe} Ae\index{Ae ist kein Buchstabe, sondern zwei} Kompliziert\subindex{Diverses}{Untereintrag} Noch komplizierter\subindex{Diverses}{Obereintrag} Noch komplizierter\% subindex{Diverses}[sort=Obereintra,pageformat=\emph]{Untereintrag} Noch komplizierter% \subsubindex{Diverses}{Untereintrag}{Unteruntereintrag} \printindex \end{document} \endinput %% %% End of file `luaindex-example.ltx'.