For reviewing purposes, I'd like to generate a "reverse" index, that would list all the keys per page, instead of the pages per key.

That is, in addition to generating the normal index:

key1.......... 1, 3, 5

key2.......... 2, 4, 5

I'd like:

1: key1

2: key2

3: key1

4: key2

5: key1, key2

Is that possible?

  • 1
    are you using the regular \index{...} entry method? if so, it should be possible to do something "sensible" with the .idx file(s) that are generated automatically -- they're already in page number order. i don't know that anyone has done such a thing, but i look into such files all the time to check the input when problems arise. Jun 12 '13 at 17:50
  • 2
    Do you use xindy? Please add a mwe. Jun 12 '13 at 19:43

enter image description here

It isn't really a reverse as it is the order the items are collected, it is makeindex that does the reversal to make the normal index.




aaa\index{ho} bbb\index{foo}  cc\index{grrr}


aaa\index{ho} bbb\index{foo}  cc\index{grrr}

aaa\index{zho} bbb\index{zfoo}  cc\index{zgrrr}


aaa\index{bho} bbb\index{foo}  cc\index{grrr}

\unskip, %
\item[#2: ]%


  • Interesting. It doesn't support entries like \index{abc@abd|see{abx}} though.
    – raphink
    Jun 12 '13 at 22:03
  • 4
    well it does something . Define "support" Jun 12 '13 at 22:06
  • Yes, that's hard to support and I guess it does what I described in the question :-)
    – raphink
    Jun 12 '13 at 22:11
  • @ℝaphink you could typest #1 in tt or pseudo-verbatim if you wanted to show the markup, or you could add some macro parsing to dicard the |see bit or do something with @ but it isn't clear in general what is best (and doing nothing is easiest) Jun 12 '13 at 22:19

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.