3

I am trying to place three columns of information after enumerations in ConTeXT, like this:

1 text  |   more text   |   yet more text
2 text  |   more text   |   yet more text
3 text  |   more text   |   yet more text
4 text  |   more text   |   yet more text
5 text  |   more text   |   this is a sample
        |               |   of what happens when
        |               |   there is too much text
        |               |   it wraps
6 text  |   more text   |   yet more text

I tried using this code, and spent a few hours trying alternative types of tables and column sets, but can't get the results. This code displays the text in three columns, but also unfortunately places a giant space after each bullet point. How do I get the columned text to appear on the same line as the bullet point (or in this case, the number)? I tried using \blank[overlay] but that didn't work.

\define[3]\tablewordsetis{
\starttabulate[|cp(.3\textwidth)|cp(.3\textwidth)|cp(.3\textwidth)|]
                    \NR
    \NC #1 \VL #2 \VL #3 \NC\NR
                    \NR
\stoptabulate
}

\starttext
    \startitemize[n]
        \item \tablewordsetis{text}{more text}{yet more text}
        \item \tablewordsetis{text}{more text}{yet more text}
        \item \tablewordsetis{text}{more text}{yet more text}
        \item \tablewordsetis{text}{more text}{yet more text}
        \item \tablewordsetis{text}{more text}{yet more text}
        \item \tablewordsetis{text}{more text}{yet more text}
        \item \tablewordsetis{text}{more text}{yet more text}v
    \stopitemize
\stoptext

1 Answer 1

6

You need a different approach to have the itemize counter for each table row, the easiest is to use the \itemtag commands which prints the current item value.

In addition to the command you need a new row in your table for the counter.

\starttext

\startitemize[n]
\starttabulate[|lp(.1\textwidth)|cp(.25\textwidth)|cp(.25\textwidth)|cp(.3\textwidth)|]
\NC \itemtag \NC text \VL more text \VL yet more text \NC\NR
\NC \itemtag \NC text \VL more text \VL yet more text \NC\NR
\NC \itemtag \NC text \VL more text \VL yet more text \NC\NR
\NC \itemtag \NC text \VL more text \VL yet more text \NC\NR
\NC \itemtag \NC text \VL more text \VL this is a sample of what
    happens when there is too much text it wraps \NC\NR
\NC \itemtag \NC text \VL more text \VL yet more text \NC\NR
\stoptabulate
\stopitemize

\stoptext

When you item counter appears in a separate column as above you can replace \NC and \itemtag combination with the \NI command.

\starttext

\startitemize[n]
\starttabulate[|lp(.1\textwidth)|cp(.25\textwidth)|cp(.25\textwidth)|cp(.3\textwidth)|]
\NI text \VL more text \VL yet more text \NC\NR
\NI text \VL more text \VL yet more text \NC\NR
\NI text \VL more text \VL yet more text \NC\NR
\NI text \VL more text \VL yet more text \NC\NR
\NI text \VL more text \VL this is a sample of what
    happens when there is too much text it wraps \NC\NR
\NI text \VL more text \VL yet more text \NC\NR
\stoptabulate
\stopitemize

\stoptext

You must log in to answer this question.

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