0

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

Martin Scharrer
  • 262,582
Eraser
  • 1
  • 2
    welcome, can you provide a MWE, i.e., from \documentclass{..}... to \end{document}? – MadyYuvi Feb 12 '19 at 12:30
  • 1
    Maybe {\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
  • How this might be done very much depends on what \documentclass you 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 in documentclass{article}. I used: \usepackage[nonewpage]{imakeidx} – user4624500 Aug 19 '22 at 05:26

0 Answers0