3

I am using a normal English index with xindy, but I would like to get rid of the Lettergroups at the beginnings of the each group. I was able to work with .ist before, but it does not work with xindy, and searching online I have not found the way to sort it out.

I understand that I have to write a simple .xdy file, but what sort of macro should I put in?

I have not done any change to the Index, and the index is simply in English. This is the reason for the absence of a MWE.

  • There might be a much easier method. The letter groups are typeset using a macro (you can look in the .ind file for the name. If I remember correctly it is defined using providecommand in the index. Thus if that same macro is redefined in the preamble to do nothing except taking an argument, then the letter groups disappear. – daleif Dec 29 '16 at 7:42
  • @daleif, thanks, you directed on the right path, I believe, I am now trying to see if I am able to work with it. – Roberto Gozzoli Dec 29 '16 at 8:36
6

A little MWE:

\documentclass[a4paper]{memoir}
\makeindex
\begin{document}

B\index{Bbb}
X\index{Xxx}

\printindex
\end{document}

Xindy then generates the following .ind file:

\begin{theindex}
  \providecommand*\lettergroupDefault[1]{}
  \providecommand*\lettergroup[1]{%
      \par\textbf{#1}\par
      \nopagebreak
  }

  \lettergroup{B}
  \item Bbb, 1

  \indexspace

  \lettergroup{X}
  \item Xxx, 1

\end{theindex}

Thus if we add the following to the preamble, the letter groups disappear:

\providecommand*\lettergroup[1]{}

(because \providecommand only defines a macro if it does not already exist)

  • 1
    I just put into my file, just before the \makeindex command, and it works perfectly – Roberto Gozzoli Dec 29 '16 at 9:12
  • Is it posible to do this running xindy with a suitable style file .xdy? texindy -M nolettergroupstyle ... – skpblack Jun 21 '17 at 12:15
  • @skpblack sure, the syntax is just vastly different than a normal .ist file for makeindex. Try running xindy --help, texindy is just a call to xindy with a special xdy – daleif Jun 21 '17 at 12:41
2

You can make a simple no-lg.xdy:

(define-letter-groups (""))

and run

xindy -M no-lg ...

This will make just one

\lettergroup{}

in the beginning of you .ind file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.