0

Consider the code

\documentclass{book}
\usepackage{imakeidx}
\let\cleardoublepage\clearpage
\makeindex
\usepackage{idxlayout}
\usepackage{lipsum}

%\usepackage[font=footnotesize]{idxlayout}
\indexsetup{othercode=\footnotesize}
\begin{document}
\Large

A sentence.\index{HEADING@\textbf{HEADING}!\textbf{Subheading}!\lipsum[3]}

\idxlayout{columns=1}
\printindex
\end{document}

And the index generated by it:

enter image description here

As one can see, the Index fontsize is not footnotesize.

QUESTION: Can anyone point out what I may be doing wrong with this approach? it seems to me that the code as is should work.

Comment: I can get properly working code if I ignore the \indexsetup command and replace \usepackage{idxlayout} by \usepackage[font=footnotesize]{idxlayout}, but I would like to know why the \indexsetup{othercode=\footnotesize} command is not working in the above code?

Thank you.

1 Answer 1

1

If I remove idxlayout I get the expected result.

\documentclass{book}
\usepackage{imakeidx}
\usepackage{lipsum}

\makeindex[columns=1]
\indexsetup{othercode=\footnotesize}

\begin{document}
A sentence.\index{HEADING@\textbf{HEADING}!\textbf{Subheading}!\lipsum[3]}

\printindex

\end{document}

enter image description here

If you really need idxlayout you need the proper syntax:

\documentclass{book}
\usepackage{imakeidx}
\usepackage{idxlayout}
\usepackage{lipsum}

\makeindex
\idxlayout{columns=1,font=footnotesize}

\begin{document}
A sentence.\index{HEADING@\textbf{HEADING}!\textbf{Subheading}!\lipsum[3]}

\printindex

\end{document}
3
  • An observation: It seems that there is a limit to the size of the font in \idxlayout{columns=1,font=footnotesize}; if I change footnotesize to, say, large, I get an error. Do you know if this is supposed to happen?
    – DDS
    Nov 23, 2021 at 5:49
  • @SamuelBowditch Looking at the code of idxlayout style, I see that the only accepted options for font are current, normalsize, small or footnotesize. With the “only imakeidx approach you can set whatever font size you like.
    – egreg
    Nov 23, 2021 at 10:15
  • Thank you for your answer and for your comment.
    – DDS
    Nov 23, 2021 at 15:26

You must log in to answer this question.

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