When the "word" in \index{WORD} is longer than columnwidth, one can use \hyphenation{} or local rule \- to have the part of word in several lines.
However this approach gives the unexpected new line before the page number.
Can anybody help me to remove this new line command when I use hyphenation?
The way of problem solving can be discussed only with imakeidx because of ist files that I need to use.
MWE (adopted from this example).
\documentclass{memoir}
\usepackage{imakeidx}
\usepackage{blindtext}
\makeindex[program=makeindex,
title={First},
name=first]
%global does not work %use local hyphenation instead
%\hyphenation{foofoofoo-foofoofoo-foofoofoo-foofoofoofoofo-ofoofoofoo-foo}
%\hyphenation{barbarbarbarbar-barbarbarbarbarb-arbarbarbarba-rbarbarbar}
\begin{document}
Einstein\index[first]{Einstein! NewLine\-NewLine\-NewLine\-NewLine\-NewLine\-}
Heisenberg\index[first]{Heisenberg}
\blindtext[4]
\blindtext[4]
Einstein\index[first]{Einstein! NewLine\-NewLine\-NewLine\-NewLine\-NewLine\-}
\index[first]{foofoofoofoo\-foofoofoofoofoofoo\-foofoofoofoofoo\-foofoofoo}
\index[first]{barbarbar\-barbarbarbar\-barbarbarbarbarbar\-barbarbarbarbar}
\blindtext
%there is also undesirable blank page after this Index
\printindex[first]
\end{document}
Useful link about MakeIndex commands. All my attempts to use settings commands from this instructions failed.



mstandistfiles is discussed here: https://tex.stackexchange.com/a/117205/44348 – Vladimir Parkhomenko Oct 03 '17 at 21:20hyphenation{}https://tex.stackexchange.com/q/394500/44348 – Vladimir Parkhomenko Oct 04 '17 at 08:42