Einführung in LaTeX / Introduction into LaTeX
10.7
Special sorting and depth=3
% !makeindex
\documentclass[paper=a6]{scrbook}
\usepackage[ngerman]{babel}
\usepackage{scrlayer-scrpage}
\begin{filecontents}[force,noheader]{stellenregister.xdy}
(markup-indexentry :open "~n \subIIIitem " :depth 3)
\end{filecontents}
\makeatletter
\def\subIIIitem{\@idxitem\hspace*{40\p@}}
\makeatother
\usepackage{index}
\newindex{ste}{raw}{ind}{Stellen}
\begin{document}
\index[ste]{Aristoteles!Politeia!V!2}
\index[ste]{Aristoteles!Organon!I!2}
\index[ste]{Herodot!01@I!80}% sort I as 01
\index[ste]{Herodot!01@I!81}
\index[ste]{Herodot!05@V!80}% sort V as 05 a.s.o.
\index[ste]{Herodot!04@IV!80}
\index[ste]{Herodot!07@VII!80}
\index[ste]{Herodot!10@X!80}
\index[ste]{Herodot!04@IV!79}
\index[ste]{Herodot!09@IX!80}
\index[ste]{Herodot!04@IV!81}
\index[ste]{Herodot!12@XII!80}
\index[ste]{Thukydides!01@I!20}
\index[ste]{Thukydides!01@I!20--22}
\index[ste]{Thukydides!01@I!21}
\index[ste]{Thukydides!02@II!1}
\printindex[ste]
\end{document}
Preamble after the index title
\documentclass{scrartcl}
\usepackage{makeidx}\makeindex
%\setindexpreamble{Here comes some text for the index preamble, which will
% be set in KOMA-Script in one column}%% for KOMA-Script
\def\IndexPreamble{Here comes some text for the index preamble, which will
be set over both columns. The index itself is set
in the twocolumn mode}%% the preamble
\makeatletter
\renewenvironment{theindex}%% redefine the environment
{ \twocolumn[\section*{\indexname}\IndexPreamble\par\medskip]%
\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}%
\thispagestyle{plain}\parindent\z@
\parskip\z@ \@plus .3\p@\relax
\columnseprule \z@
\columnsep 35\p@
\let\item\@idxitem}
{\if@restonecol\onecolumn\else\clearpage\fi}
\makeatother
\def\Index#1{#1\index{#1}}%% I am too lazy for typing it twice :-)
\begin{document}
\Index{foo}, \Index{bar} und \Index{baz}.
\printindex
\end{document}
New package imakeidx
. Run it with pdflatex --shell-escape <file>
\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[xindy]{imakeidx}
\makeindex[program=xindy]
\begin{document}
Österreich
\index{Österreich}
\index{ölen}
\index{obergärig}
\index{Oberösterreich}
\printindex
\end{document}
Zurück zur Hauptseite/Back to main page
Copyright $Id: chapter10.html 2 2022-12-28 16:38:18Z voss $