I need to create a simple block showing recipe content. A tabulate seems as the easiest way to do that. Below is an example of what I mean
\starttext
\def\leaderfill{\leaders\hbox to 0.3em{\hss.\hss}\hfill}
\starttabulate[|p|l|Il|]
\NC Item 1 \leaderfill 200 \NC \NC g \NR
\NC Item Item 2 \leaderfill 60 \NC \NC ml \NR
\NC Item Item Item Item 3 \leaderfill 10 \NC \NC ml \NR
\NC Item Item 4 \leaderfill 0 \NC.5 \NC g \NR
\NC Item Item 5 \leaderfill 0 \NC.25 \NC g \NR
\NC Very very very long name of Item 6 \NC \NC \NR
\NC the rest of the name \leaderfill 10--15 \NC \NC pcs.\NR
\stoptabulate
\stoptext
The result is as follows:
To make fractions look correct, I need to remove the distance between the first and second columns (set zero width) and set the distance between the second and third ones equal to the width of a space character.
I've reviewed the Why are my tables running off the edge of the page in ConTeXt? topic, however, it hasn't helped me. Using o0
and s0
are break my table:
\starttabulate[o0|p|l|Il|]
\NC Item 1 \leaderfill 200 \NC \NC g \NR
\NC Item Item 2 \leaderfill 60 \NC \NC ml \NR
\NC Item Item Item Item 3 \leaderfill 10 \NC \NC ml \NR
\NC Item Item 4 \leaderfill 0 \NC.5 \NC g \NR
\NC Item Item 5 \leaderfill 0 \NC.25 \NC g \NR
\NC Very very very long name of Item 6 \NC \NC \NR
\NC the rest of the name \leaderfill 10--15 \NC \NC pcs.\NR
\stoptabulate
Using a fixed width for columns is undesirable since tables may be used in various width parent environments.
So, how can I set up a distance between columns in tabulate?