Friends, as a follow up to Overlapping TikZ nodes to look as a tape strip, I added a TikZ code to an index entry using the splitidxpackage. Consider this code:



\newindex[Index of Foo]{iof}




    tape node/.style={
        on chain,
        inner sep=1pt,
        outer xsep=0pt,
        minimum height=0.2cm,
        minimum width=0.2cm

        tape node
    ] {\tiny\tt\raisebox{0pt}[\height][0pt]{#1}};

            tape node,
        ] {\color{gray!60}\tiny\tt\raisebox{0pt}[\height][0pt]{#1}};        \end{pgfonlayer}

        start chain=going right,
        node distance=0pt


\sindex[iof]{\drawboxes{AC} Oranges}
\sindex[iof]{\drawboxes{ANCQ} Grapes}
\sindex[iof]{\drawboxes{CP} Bananas}
\sindex[iof]{\drawboxes{Q} Avocado}
\sindex[iof]{\drawboxes{P} Strawberry}



It works like a charm, but unfortunately, due to the TikZ code added to the beginning of the entry, the alphabetical order is lost:

List of foo

I have a wild guess: by passing some regular expression pattern to the splitindex parser tool, I could somehow make the generated index ignore the TikZ code at the beginning of the entry.

If possible, I'd like to stick with the splitidx package, as it can handle several indices I have in the document. Any help is appreciated.

1 Answer 1


It's standard makeindex syntax:

\sindex[iof]{Oranges@\drawboxes{AC} Oranges}
\sindex[iof]{Grapes@\drawboxes{ANCQ} Grapes}
\sindex[iof]{Bananas@\drawboxes{CP} Bananas}
\sindex[iof]{Avocado@\drawboxes{Q} Avocado}
\sindex[iof]{Strawberry@\drawboxes{P} Strawberry}
  • Fantastic, egreg! I had no idea of this syntax. Thanks! Jul 15, 2011 at 10:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .