# \[email protected] undefined for xindy/texindy?

by Shahryar   Last Updated September 11, 2019 09:23 AM

I was getting "The control sequence at the end of the top line" referring to \leavevmodeifvmode for all my entries in an .ind file. Each entry of \indexentry in the idx file is translated to

 \item \emph  {{\textendash }\leavevmodeifvmode \kern .5em \textnormal  {something }, 11,22


in the .ind file.

Since I could not find any reference to leavevmodeifvmode I guess this relates to [email protected] which seems to be a new definition from 2018/12/01 Function and usage of \leavevmode.

The related lines in preamble are:

\RequirePackage[texindy]{imakeidx}

\makeindex[intoc,  name=title, title={Index: Titles}, columns=1, options=-M title  -C utf8 ]


I could fix the problem temporarily by doing something like this:

\begin{filecontents*}{title.xdy}
(require "tex/inputenc/utf8.xdy")
(require "texindy.xdy")

\begin{theindex}

\makeatletter
\providecommand*\leavevmodeifvmode{\[email protected]}
\makeatother
....
\end{filecontents*}


However, I guess there is a problem with in translating \indextermto the correct lines (whether by xindy or imakeidx ?). Is this a problem to wait for a bug fix or I wrote something wrong (sorry, not easy to make a MWE)

Tags :

## Related Questions

Updated March 29, 2019 12:23 PM

Updated February 18, 2016 02:10 AM

Updated February 23, 2016 04:10 AM

Updated February 14, 2019 19:23 PM