# How to prevent tables from being wider than the text width in ConTeXt?

I have some tables like this:

``````\starttabulate[|l|l|]
\HL
\NC Title 1 \NC Title 2 \NC\NR
\HL
\NC This is a sentence. \NC This is another sentence. \NC\NR
\HL
\stoptabulate
``````

Sometimes, the sentences are too long, so then the table width becomes very wide.

• How can I make certain that the width of the table never exceeds the width of the available text width?
-
Use `p` columns, rather than `l` columns. – Aditya Jun 17 '12 at 7:40

The column types of ConTeXt and LaTeX are equal. The column type `l` doesn't allow any breaks and so the table runs out to the margin. To allow line breaks you can use the column type `p`, i.e.
``````\starttabulate[|p|p|]
By default, a certain width is used for `p` columns, but the column width can be specified by writing a length in parenthesis after `p`, e.g. `p(4cm)`. See http://wiki.contextgarden.net/Command/starttabulate for more information about column types.