Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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).

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

2 Answers

up vote 6 down vote accepted

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.

share|improve this answer
add comment

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}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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