summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/lualatex/luaindex/luaindex-example.ltx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/lualatex/luaindex/luaindex-example.ltx')
-rw-r--r--Master/texmf-dist/doc/lualatex/luaindex/luaindex-example.ltx80
1 files changed, 80 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/lualatex/luaindex/luaindex-example.ltx b/Master/texmf-dist/doc/lualatex/luaindex/luaindex-example.ltx
new file mode 100644
index 00000000000..810d50fe956
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/luaindex/luaindex-example.ltx
@@ -0,0 +1,80 @@
+%%
+%% 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 <komascript(at)gmx.info>
+%%
+%% 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 and of this work.
+%%
+%% 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{koma.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'.