15

I know I can change the index font size combining the imakeidx package with the idxlayout package like this:

\usepackage{imakeidx}
\usepackage[font=footnotesize]{idxlayout}

However I was wondering if it was possible to use just the imakeidx package (maybe with the othercode key of the \indexsetup command).

2
  • 1
    Yes, \indexsetup{othercode=\small} will do. Notice, however, that this setting applies to all indices.
    – egreg
    Jul 11, 2013 at 19:26
  • @egreg Thanks. Can you post the comment as an answer?
    – petobens
    Jul 11, 2013 at 19:28

2 Answers 2

16

One can modify the index formatting with \indexsetup, that takes as argument a list of key-value pairs; in your case the key is othercode:

\indexsetup{othercode=\small}

The code given as value to the key is inserted just before the index body is typeset, so this doesn't influence the header.

Note, however, that the effect is global and will affect all indices.

9

While it is possible to reduce the index fontsize using only imakeidx, the space between index heading and first entry will be somewhat larger than that produced by a fontsize switch after a "normal" heading. If you use idxlayout, the spacing will be the same. The following MWE contains both variants; comment/uncomment the respective lines and compare.

\documentclass{article}

\usepackage{imakeidx}
\makeindex

% Variant A 
\usepackage[font=footnotesize]{idxlayout}

% Variant B
% \indexsetup{othercode=\footnotesize}

\begin{document}

\section*{Unnumbered section}

\footnotesize

foo, 1\index{foo}

\clearpage

\normalsize

\printindex

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .