How to change indentation/margin of table in Context?

This is the code I use to create a simple table in Context:

\starttable[|lw(43mm)|lw(43mm)|]

\NC {\em Mer uttalade} \NC {\em Mindre uttalade} \NC\AR
\NC {\em bearbetningsegenskaper} \NC {\em bearbetningsegenskaper} \NC\AR
\HL
\NC svetsad metall \NC gjuten metall \NC\AR
\NC handformad gips \NC gjuten gips \NC\AR

\stoptable


Please see this image of what it looks like!

Note the difference in the level of indentation of the table (or call it margin if you will) -- this is marked with red pencil.

How do I affect the size of this indentation? I would like it to be smaller.

I've been trying different things like \setupindenting, but can't affect this space in any way. Would be thankful for any suggestions!

-
What you see is not indentation, but the offset for each column. Use s0 as the first column specifier to get rid of it. See the last example on wiki.contextgarden.net/Table –  Aditya Dec 7 '12 at 14:56
For more control on the space, see Sec 7 of tug.org/TUGboat/Articles/tb29-1/tb91mahajan.pdf –  Aditya Dec 7 '12 at 14:59

1 Answer

From my TugBoat article on tables:

By default, there is a 0.5em (usually about half the current font size) space between the columns. We can change this using the o and the s keys. The o key changes the space on the right of the current column; the s key changes the space of all the following columns until the next o or s key.

There are two ways of specifying the parameters of the o and s keys. The ﬁrst is in integer multiples of 0.5em: s{n} makes the space equal to n times 0.5em. So, to get a space of 1.5em between columns we can use \starttable[s{3}|l|l|]. The second way is to specify the distance as an arbitrary TEX dimension. So, we could also have used \starttable[s(1.5em)|l|l|]. Notice that in the ﬁrst case, the argument is given in curly brackets; in the second, the argument is given in parentheses.

Thus, to remove the space from the beginning of the first column, add o0 in the first column specifier (one before the first |); to remove the space from the last column add s0 in the last column specifier (one before the last |).

\starttext
\starttable[o0|lw(43mm)|lw(43mm)s0|]
\NC {\em Mer uttalade} \NC {\em Mindre uttalade} \NC\AR
\NC {\em bearbetningsegenskaper} \NC {\em bearbetningsegenskaper} \NC\AR
\HL
\NC svetsad metall \NC gjuten metall \NC\AR
\NC handformad gips \NC gjuten gips \NC\AR
\stoptable
\stoptext


which gives

Note that the table mechanism is the oldest table mechanisms for ConTeXt. A more versatile table mechanism is TABLE (\bTABLE ...\eTABLEor for simple tables, its shortcut\startTABLE ... \stopTABLE). Using the TABLE mechanism you can get the same effect as follows:

\startsetups table:frames
\setupTABLE[frame=off]
\setupTABLE[row][2][bottomframe=on]
\stopsetups
\starttext
\startTEXpage
\startTABLE[setups={table:frames}]
\NC {\em Mer uttalade} \NC {\em Mindre uttalade} \NC\NR
\NC {\em bearbetningsegenskaper} \NC {\em bearbetningsegenskaper} \NC\NR
\NC svetsad metall \NC gjuten metall \NC\NR
\NC handformad gips \NC gjuten gips \NC\NR
\stopTABLE
\stopTEXpage
\stoptext


(The defaults are different for the two mechanisms, and therefore the tables look different visually).

-
Thank you very much for your informative answer + link to interesting article! I will try this now, and move my table to TABLE :) –  PetaspeedBeaver Dec 8 '12 at 12:49