Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This issue has been answered many times for LaTeX, but I couldn't find any explanation for ConTeXt. Here is a sample that shows the alignment problem :

\starttable[|cB|p(4cm)|p(4cm)|]
    \DC\DL[2]\DR
    \NC \VL \REF[cB]{Foo}
        \VL \REF[cB]{Bar}
        \VL \AR
    \HL
    \VL Things
        \VL
            \startitemize[packed]
                \item Carrot
                \item Tomato
            \stopitemize
        \VL
            \startitemize[packed]
                \item Rice
                \item Superman
                \item Onion
                \item Chocolate
            \stopitemize
        \VL\AR
    \HL
\stoptable

And here is the result with mkiv:

enter image description here

As you can see, the list on the right-most cell is not aligned properly to the top. When compiling, I'm getting a few Underfull \vbox (badness 10000) detected but I have not clue how to resolve this.

Any suggestions ? Thanks :)

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The table mechanism is fairly old and is deprecated. For anything non-trivial table typesetting, it is better to use one of the modern table mechanisms like tabulate, natural tables, or xtables. See ConTeXt Wiki for comparision of these. For the above example, I'd use natural tables (and since you don't have rows and columns that span multiple cells, you can use the simpler syntax)

\startsetups table
  \setupTABLE[column][first][style=bold, align=middle]
  \setupTABLE[row][first][style=bold, align=middle]
  \setupTABLE[1][1][frame=off]
  \setupTABLE[column][2][width=4cm]
  \setupTABLE[column][3][width=4cm]
\stopsetups
\starttext
\startTABLE[setups=table]
  \NC \NC Foo \NC Bar \NC \NR
  \NC Things \NC
            \startitemize[packed]
                \item Carrot
                \item Tomato
            \stopitemize
        \NC
            \startitemize[packed]
                \item Rice
                \item Superman
                \item Onion
                \item Chocolate
            \stopitemize
        \NC \NR
\stopTABLE
\stoptext

which gives

enter image description here

share|improve this answer
    
Thanks a lot :) The TABLE mechanism is so much simpler to use ! –  Simon Aug 13 '13 at 14:34

Your Answer

 
discard

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.