I want to remove the new page before \printindex
\phantomsection
\renewcommand{\indexSectionCount}{\myeval{\SectionCount-1}}
\renewcommand{\indexname}{B~Stichwortverzeichnis}
\addcontentsline{toc}{section}{B~Stichwortverzeichnis}
\preto\endtheindex{\par\nobreak\noindent}
\printindex
This is my code
{\let\newpage\relax\printindex}? It might be necessary to redefine a different page breaking macro. Compare e.g. https://tex.stackexchange.com/a/14511/2975 where this technique is used for other lists. – Martin Scharrer Feb 12 '19 at 12:37\documentclassyou are using, as well as the formatting of the index. A multi-column index isn't easy to graft onto any kind of document halfway down the page. – barbara beeton Feb 12 '19 at 17:21{\let\newpage\relax\printindex}does not work for me indocumentclass{article}. I used:\usepackage[nonewpage]{imakeidx}– user4624500 Aug 19 '22 at 05:26