von Thomas D » Di 19. Feb 2019, 14:27
Hallo
Ich habe mit
imakeidx ein Stichwortverzeichnis erstellt. Es klappt soweit auch alles, wie es soll. Einzig der erste Eintrag im Stichwortverzeichnis ist nicht bündig mit dem Eintrag in der zweiten Spalte (auf den Folgeseiten passt wieder alles). Die Ausgabe siehe Anhang.
Das Minimalbeispiel schaut wie folgt aus:
\documentclass[11pt,ngerman,hyphens]{scrbook}
\usepackage{fontspec}
\usepackage{babel}
\makeatletter
\usepackage{imakeidx}
\usepackage{filecontents}
\usepackage{multicol}
\begin{filecontents*}{index.ist}
headings_flag 1
heading_prefix "\\indexheading{"
heading_suffix "}"
delim_0 " "
delim_1 " "
group_skip "\n"
preamble "\\begin{theindex}\\starttheindex"
postamble "\n\\stoptheindex\\end{theindex}"
\end{filecontents*}
\newcommand{\indextitle}{Index}
\indexsetup{level=\section*}
\makeindex[
columns=2,
intoc,
title=\indextitle,
options=-s index
]
\newcommand*{\indexheading}[1]{
\indexrule
\textbf{#1}
\par
\nopagebreak
\vskip-\baselineskip
}
\newcommand*{\indexrule}{
\par\nopagebreak
\vskip-\ht\strutbox
\hfill
\par\pagebreak[3]
\vskip -\baselineskip
\hfill
\par\nobreak
}
\newcommand*{\starttheindex}{\raggedcolumns\begin{footnotesize}}
\newcommand*{\stoptheindex}{\indexrule\end{footnotesize}}
\makeatletter
\renewcommand*{\@idxitem}
{\par\hangindent 1.5em\hskip 1.5em}
\renewcommand{\subitem}{\par\hskip 2.5em}
\makeatother
\AtBeginDocument{
\def\labelitemi{ }
}
\makeatother
\begin{document}
\index{Affe!Anton} \index{Baum!Bernhard} \index{Baum!Carbara}
\index{Affe!Bnton} \index{Baum!Cernhard} \index{Baum!Darbara}
\index{Affe!Cnton} \index{Baum!Dernhard} \index{Baum!Earbara}
\index{Affe!Dnton} \index{Baum!Eernhard} \index{Baum!Farbara}
\index{Affe!Enton} \index{Baum!Fernhard} \index{Baum!Garbara}
\index{Affe!Fnton} \index{Baum!Gernhard} \index{Baum!Harbara}
\index{Affe!Gnton} \index{Baum!Hernhard} \index{Baum!Iarbara}
\index{Affe!Hnton} \index{Baum!Iernhard} \index{Baum!Jarbara}
\index{Affe!Inton} \index{Baum!Jernhard} \index{Baum!Karbara}
\index{Affe!Jnton} \index{Baum!Kernhard} \index{Baum!Larbara}
\index{Affe!Knton} \index{Baum!Lernhard} \index{Baum!Marbara}
\begin{flushleft}
\printindex
\par\end{flushleft}
\end{document}
- Dateianhänge
-
- Latex Index Number2.png (77.08 KiB) 2197 mal betrachtet
Hallo
Ich habe mit [i]imakeidx[/i] ein Stichwortverzeichnis erstellt. Es klappt soweit auch alles, wie es soll. Einzig der erste Eintrag im Stichwortverzeichnis ist nicht bündig mit dem Eintrag in der zweiten Spalte (auf den Folgeseiten passt wieder alles). Die Ausgabe siehe Anhang.
Das Minimalbeispiel schaut wie folgt aus:
[code]
\documentclass[11pt,ngerman,hyphens]{scrbook}
\usepackage{fontspec}
\usepackage{babel}
\makeatletter
\usepackage{imakeidx}
\usepackage{filecontents}
\usepackage{multicol}
\begin{filecontents*}{index.ist}
headings_flag 1
heading_prefix "\\indexheading{"
heading_suffix "}"
delim_0 " "
delim_1 " "
group_skip "\n"
preamble "\\begin{theindex}\\starttheindex"
postamble "\n\\stoptheindex\\end{theindex}"
\end{filecontents*}
\newcommand{\indextitle}{Index}
\indexsetup{level=\section*}
\makeindex[
columns=2,
intoc,
title=\indextitle,
options=-s index
]
\newcommand*{\indexheading}[1]{
\indexrule
\textbf{#1}
\par
\nopagebreak
\vskip-\baselineskip
}
\newcommand*{\indexrule}{
\par\nopagebreak
\vskip-\ht\strutbox
\hfill
\par\pagebreak[3]
\vskip -\baselineskip
\hfill
\par\nobreak
}
\newcommand*{\starttheindex}{\raggedcolumns\begin{footnotesize}}
\newcommand*{\stoptheindex}{\indexrule\end{footnotesize}}
\makeatletter
\renewcommand*{\@idxitem}
{\par\hangindent 1.5em\hskip 1.5em}
\renewcommand{\subitem}{\par\hskip 2.5em}
\makeatother
\AtBeginDocument{
\def\labelitemi{ }
}
\makeatother
\begin{document}
\index{Affe!Anton} \index{Baum!Bernhard} \index{Baum!Carbara}
\index{Affe!Bnton} \index{Baum!Cernhard} \index{Baum!Darbara}
\index{Affe!Cnton} \index{Baum!Dernhard} \index{Baum!Earbara}
\index{Affe!Dnton} \index{Baum!Eernhard} \index{Baum!Farbara}
\index{Affe!Enton} \index{Baum!Fernhard} \index{Baum!Garbara}
\index{Affe!Fnton} \index{Baum!Gernhard} \index{Baum!Harbara}
\index{Affe!Gnton} \index{Baum!Hernhard} \index{Baum!Iarbara}
\index{Affe!Hnton} \index{Baum!Iernhard} \index{Baum!Jarbara}
\index{Affe!Inton} \index{Baum!Jernhard} \index{Baum!Karbara}
\index{Affe!Jnton} \index{Baum!Kernhard} \index{Baum!Larbara}
\index{Affe!Knton} \index{Baum!Lernhard} \index{Baum!Marbara}
\begin{flushleft}
\printindex
\par\end{flushleft}
\end{document}
[/code]