0

I use imakeidx which is great except for the fact that it is not clear enough what numbers are page numbers and what the rest.

Here is the example:

enter image description here

It is hard to distinguish that 88 is page number and 1 Kön 8, 12 index entry.

Is there a way to make all index entries bold by default and add colon after index entry? Like this:

1 Kön 8, 12: 88

I presume that this can be done with renewing \index command but I am not sure how.

Here is my MWE:

\documentclass[a4paper,11pt]{scrbook}
\usepackage[utf8]{inputenc}%
\usepackage[T1]{fontenc}%
\usepackage[ngerman]{babel}
\usepackage{blindtext}
\usepackage[nonewpage]{imakeidx}% MULTIPLE INDICES
\indexsetup{level=\section*,toclevel=section,headers={Stellenregister}{\indexname}}%
\makeindex[name=band1-bibelstellen,title=Bibelstellen, intoc, options= -s untitled.ist]
\makeindex[name=band1-themen,title=Themen, intoc, options= -s untitled.ist]
\makeindex[name=band1-personen,title=Personen, intoc, options= -s untitled.ist]
\begin{document}
\blindtext
\blindtext\index[band1-bibelstellen]{1 Kön 8,12}
\blindtext\index[band1-themen]{Epiph.!haer.!8, 16}
\blindtext\index[band1-personen]{Arius!Anhänger!Eusebius}
\addcontentsline{toc}{chapter}{Alex. Al.!ep. encycl.!1, 12}
\printindex[band1-bibelstellen]
\printindex[band1-themen]
\printindex[band1-personen]
\end{document}
  • Welcome to TeX.SX! Please provide a compilable document called MWE. – Bobyandbob Nov 22 '17 at 12:24
  • 1
    Sorry I knew I forgot something. I edited my question now to include MWE. Thanks! – eklisiarh Nov 22 '17 at 12:34
  • This isn't related to imakeidx itself -- you would get the same 'error' with makeidx -- it's caused by the way of information is given to \index or using a different .ist file for the index – user31729 Nov 22 '17 at 12:38
  • I don't get any error. The question is about customising index entries and I useimakeidx so that is why I mentioned it. – eklisiarh Nov 22 '17 at 12:41
  • @eklisiarh: That's why I wrote 'error' ;-) – user31729 Nov 22 '17 at 12:42
-1

Ok after 12 hours of trying, based on the solution suggested by Christian Hupfer (thank you!) and this page: https://linux.die.net/man/1/makeindex here is the solution:

Add this code to your .ist file

item_0 "\n\\bfseries\\item "
item_1 "\n\\bfseries\\item "
item_2 "\n\\bfseries\\item "
delim_0 ":\\quad\\normalfont "
delim_1 ":\\quad\\normalfont "
delim_2 ":\\quad\\normalfont "

and -c to the options parameter.

Also you have to remove nonewpage parameter because this doesnt work with .ist.

The solution for that is to add:

\let\clearpage\relax
\let\cleardoublepage\relax

in front of:

\printindex

That creates error \clearpage undefined so if you want you can put \batchmode in front of \printindex or you can use this solution: nonewpage option in imakeidx prevents me from using an .ist file

  • nonewpage is nonsensical with the scrbook class. – egreg Nov 23 '17 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.