TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 4 down vote accepted

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}
share|improve this answer
Fantastic, egreg! I had no idea of this syntax. Thanks! – Paulo Cereda Jul 15 '11 at 10:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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