summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/testidx/samples/sample-idx-utf8.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/testidx/samples/sample-idx-utf8.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/testidx/samples/sample-idx-utf8.tex')
-rw-r--r--macros/latex/contrib/testidx/samples/sample-idx-utf8.tex88
1 files changed, 88 insertions, 0 deletions
diff --git a/macros/latex/contrib/testidx/samples/sample-idx-utf8.tex b/macros/latex/contrib/testidx/samples/sample-idx-utf8.tex
new file mode 100644
index 0000000000..e4cbb529f3
--- /dev/null
+++ b/macros/latex/contrib/testidx/samples/sample-idx-utf8.tex
@@ -0,0 +1,88 @@
+% This file is public domain.
+%
+% This example document demonstrates the testidx package
+% with inputenc.sty and xindy. You can build this document using:
+%
+% pdflatex sample-idx-utf8
+% xindy -M sample-idx-utf8 -M texindy -C utf8 -L english -t sample-idx-utf8.ilg sample-idx-utf8.idx
+% pdflatex sample-idx-utf8
+%
+% If you are using arara, the directives are:
+%
+% arara: pdflatex
+% arara: xindy: {language: english, codepage: utf8,
+% arara: --> modules: [basename, texindy]}
+% arara: pdflatex
+\documentclass{article}
+
+\usepackage{filecontents}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage{amssymb}
+\usepackage{makeidx}
+\usepackage
+ [
+ %nosanitize,% don't sanitize characters in the dummy entries
+ sanitize,% sanitize characters in the dummy entries
+ showmarks,% show where the indexing command has been used
+ %hidemarks,% hide the visual effects
+ %verbose,% show the argument that's being passed to \index
+ % warning: will cause overfull lines!
+ noverbose% default
+ ]
+ {testidx}
+
+% Create the .xdy file for this example:
+\begin{filecontents*}{\jobname.xdy}
+; list of allowed attributes
+
+(define-attributes ((
+ "tstidxencapi"
+ "tstidxencapii"
+ "tstidxencapiii"
+)))
+
+; define format to use for locations
+
+(markup-locref :open "\tstidxencapi{"
+ :close "}"
+ :attr "tstidxencapi")
+
+(markup-locref :open "\tstidxencapii{"
+ :close "}"
+ :attr "tstidxencapii")
+
+(markup-locref :open "\tstidxencapiii{"
+ :close "}"
+ :attr "tstidxencapiii")
+
+(markup-locref-list :sep ",")
+(markup-range :sep "--")
+
+; define a numbers group
+
+(define-letter-group "Numbers"
+ :prefixes ("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")
+ :before "A")
+
+; define a "Maths" group for keys starting with ">"
+
+(define-letter-group "Maths"
+ :prefixes (">" )
+ :before "Numbers")
+
+; define a "Markers" group for keys starting with "<"
+
+(define-letter-group "Markers"
+ :prefixes ("<" )
+ :before "Maths")
+\end{filecontents*}
+
+\makeindex
+
+\begin{document}
+\testidx
+
+\printindex
+\end{document}
+