6

By default, where I insert an index, it automatically does so on a new page. Is there a way to suppress this page break, so that my Index begins wherever I inserted it?

In the following MWE, I get a two-page document. I want a one-page document.

\documentclass{article}
\usepackage{imakeidx}
\makeindex
\begin{document}
\index{a}a

\printindex{}

\end{document}
0

1 Answer 1

4

From the imakeidx documentation (section 2 Page usage), it describes the following package option:

nonewpage
inhibits the new page command to be issued when using an article type document class and multiple indices are being typeset. We don't see why someone would use multiple indices in an article (except possibly for package documentations, which usually provide a macro index and a list of changes).

enter image description here

\documentclass{article}

\usepackage[nonewpage]{imakeidx}

\makeindex

\begin{document}

\index{a}a

\printindex

\end{document}

You must log in to answer this question.