On 12/9/2008 2:01 PM, Lars Huttar wrote:
> On 12/9/2008 12:04 PM, Wolfgang Schuster wrote:

We applied your example to our document, and were able to get it working
with thick and thin lines. Thanks very much!

Now since you included double lines in your example, I've been aspiring
to use that instead of just thick lines...

>>
>> \startuseMPgraphic{table:frame:double}
>> draw OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ; % outer frame
>> draw OverlayBox enlarged -2pt ;                            % inner frame
>> setbounds currentpicture to OverlayBox ;
>> \stopuseMPgraphic

OK... the above results in triple lines between cells, so I modified the
draw OverlayBox lines as follows:

draw OverlayBox enlarged \the\dimexpr\linewidth*1\relax ; % outer frame
draw OverlayBox enlarged -\the\dimexpr\linewidth*2\relax ; % inner frame

This was mainly experimental, as I don't fully understand the model.
(I looked up some Metapost references but couldn't find a definition of
"enlarged".) But it seems to work: the double lines between two cells
overlap exactly, so you get a consistent look.

However, when I try to mix double frames with single frames, I'm having
trouble. Here is what I tried, in order to get a cell with double frame
on the left, and single frame everywhere else:

\startuseMPgraphic{table:frame:Lrtb} % left border is double
draw leftboundary OverlayBox enlarged \the\dimexpr\linewidth*1\relax ; %
outer frame
draw leftboundary OverlayBox enlarged -\the\dimexpr\linewidth*2\relax ;
% inner frame
draw rightboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ;
draw topboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ;
draw bottomboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic

Now the graphic has double line on the left and a single line elsewhere.
However, the lines are thicker than in the previous one... about twice
as thick, too heavy for our requirements. And I can't tell why. This is
true on all four sides.
See http://www.huttar.net/lars-kathy/tmp/test-mp-tableframe.pdf, second
table.

Also, on the side that has double lines, the double lines don't go all
the way to the top and bottom (see same pdf, second table), so that the
double line is not continuous across multiple rows.

Any suggestions?

The above graphic is used as follows...
\start
\setupTABLE[c][first][background={table:frame:Lrtb}]
\getbuffer
\stop


Thanks,
Lars


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to