Hi everybody!

I had some problems with backgrounds in a table. I wanted just a
horizontal line, but in different heights. The problem is that the line
will always be in the middle of the cell if I don't add more graphics.
See the example file below.

Regards, Micke P


\setupoutput[pdftex]
\enableregime[utf]
\setupbodyfont[7pt]

% This works, but is not nice.

\startuniqueMPgraphic{splittop}
draw (0,0)--(OverlayWidth,OverlayHeight) withcolor white;%should not be
necessary
draw (0,0.725*OverlayHeight)--(OverlayWidth,0.725*OverlayHeight);
\stopuniqueMPgraphic
\defineoverlay[splittop][\uniqueMPgraphic{splittop}]

\startuniqueMPgraphic{splitmid}
draw (0,0)--(OverlayWidth,OverlayHeight) withcolor white;%should not be
necessary
draw (0,0.5*OverlayHeight)--(OverlayWidth,0.5*OverlayHeight);
\stopuniqueMPgraphic
\defineoverlay[splitmid][\uniqueMPgraphic{splitmid}]

% This does not work, but I think it should

\startuniqueMPgraphic{topsplit}
draw (0,0.725*OverlayHeight)--(OverlayWidth,0.725*OverlayHeight);
\stopuniqueMPgraphic
\defineoverlay[topsplit][\uniqueMPgraphic{topsplit}]

\startuniqueMPgraphic{midsplit}
draw (0,0.5*OverlayHeight)--(OverlayWidth,0.5*OverlayHeight);
\stopuniqueMPgraphic
\defineoverlay[midsplit][\uniqueMPgraphic{midsplit}]

\starttext

% A working table
\setupTABLE[width=2cm,height=2cm]
\bTABLE[align={middle,lohi}]
\bTR\bTD[background=splittop] Some text\par And some more text that will
apear below the other text\eTD\bTD[background=splitmid] Some text
above\par Some text below \eTD\eTR
\eTABLE

% A non-working table
\setupTABLE[width=2cm,height=2cm]
\bTABLE[align={middle,lohi}]
\bTR\bTD[background=topsplit] Some text\par And some more text that will
apear below the other text\eTD\bTD[background=midsplit] Some text
above\par Some text below \eTD\eTR
\eTABLE

\stoptext
_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to