groupiing index entries

16 views
Skip to first unread message

Andrea Cassioli

unread,
Jan 28, 2015, 4:34:45 AM1/28/15
to sphin...@googlegroups.com
Dear all,
I am struggling in setting up some index entries for the docs I am working on. My intention is to get an output like this:


Apple,
     Red,
     Green,
     Yellow,
     Rotten


Rotten,
     Apple



Note that I do not want mirror entries for Red, Green  and Yellow. I use 

.. index::
   pair: Apple, Red


and so on. What I get is of course 

Apple,
     Red,
     Green,
     Yellow,
     Rotten

Red,
    Apple

Rotten,
     Apple

and so on. Is there something I am missing?


Reagrds,
Andrea

Robert Lehmann

unread,
Feb 12, 2015, 7:33:38 PM2/12/15
to sphin...@googlegroups.com
[Please note that this mailing list is for the development of Sphinx;  if you have trouble using Sphinx refer to the sphinx-users list.]

I am afraid what you are asking for is not currently possible.  You could, however, use seealso type index entries:

.. index:: see: Apple; Green Apple
.. index:: pair: Rotten; Apple

This would render as:
 
Apple,
  Rotten
  see Green Apple

Rotten,
  Apple


The downside of the seealso type is that it's not hyperlinked.  I will handle that under #1351.

Cheers,
Robert
Reply all
Reply to author
Forward
0 new messages