5

As ugly as this sounds, is it possible to produce a nested itemize list with different styles for each item number? E.g. with the below code:

\setupbodyfont[sansserif]
\starttext

\setupitemize[1][n,repeat,joinedup][width=1em]
\setupitemize[2][n,repeat,joinedup][style=bold,width=2em]
\setupitemize[3][n][width=3em]

\startitemize
\item Item 1
\item Item 2
  \startitemize
  \item Item 2.1
  \item Item 2.2
    \startitemize
    \item Item 2.2.1
    \item Item 2.2.2
    \stopitemize
  \stopitemize
\stopitemize

\stoptext

This produces:

Actual Result

But what I'm looking for is (manually produced):

Desired Result

Is this possible? Or might this require some serious ugly hacks? Furthermore, is it possible to not only bold item numbers, but instead also overstrike them as well?

1 Answer 1

6

It is possible. But I have no idea if this is the right way and if it has nasty side effect:

\setupbodyfont[sansserif]

\definebar[thickoverstrike][overstrike][offset=0.75,rulethickness=.25]
\def\boldovernumber#1{{\bf\thickoverstrike{#1}}}
\defineconversion[o][\boldovernumber]

\setupitemize[1][n,repeat,joinedup,][width=1em]
\setupitemize[2][o,repeat,joinedup] [width=2em]
\setupitemize[3][n][width=3em]

\starttext
\startitemize
\item Item 1
\item Item 2
  \startitemize
  \item Item 2.1
  \item Item 2.2
    \startitemize
    \item Item 2.2.1
    \item Item 2.2.2      
    \stopitemize
  \stopitemize
\stopitemize

\stoptext

enter image description here

4
  • That's how I would have done it as well, perhaps with a thicker overstrike.
    – Aditya
    Commented Apr 5, 2016 at 14:18
  • 3
    @Aditya: So not so bad for a latex user ;-). If you tell me how to do a thicker overstrike I will add it. Commented Apr 5, 2016 at 14:43
  • I edited the answer to include the thick overbar (and moved the setups to the preamble). I hope that you don't mind.
    – Aditya
    Commented Apr 5, 2016 at 15:17
  • Perfect! Works exactly as I need it to :)
    – dreamlax
    Commented Apr 6, 2016 at 2:20

You must log in to answer this question.

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