mf schrieb am 11.04.2020 um 23:59:
Thanks Hans and Wolfgang.
@Wolfgang: your solution is clearer, but unfortunately it works only for this MWE. In the real case the triangle extends over 2 rows, but the table has more than 2 rows. I tried grouping the first two rows in a \bTABLEbody[background=triangle], but it doesn't work.
How about nested tables: \starttext \bTABLE[width=1cm,height=1cm] \bTR \bTD A \eTD \bTD B \eTD \bTD C \eTD \bTD E \eTD \eTR \bTR \bTD E \eTD \bTD[nc=2,nr=2,strut=no,align={middle,lohi}] {\bTABLE \bTR \bTD[nc=2] X \eTD \eTR \bTR \bTD Y \eTD \bTD Z \eTD \eTR \eTABLE} \eTD \bTD H \eTD \eTR \bTR \bTD I \eTD \bTD L \eTD \eTR \bTR \bTD M \eTD \bTD N \eTD \bTD O \eTD \bTD P \eTD \eTR \eTABLE \stoptext
@both: \setupoverlay[hoffset=...,voffset=...]? \setupframed[backgroundhoffset=...,backgroundvoffset=...] (\bTD inherits from \framed)? Or maybe a method in MP to set the bounding box of the resulting overlay?
setbounds in combination with leftenlarged, topenlarged etc.
\setupframed has already a backgroundoffset option, whose value can be:
- a DIMENSION (an offset that is both horizontal and vertical)
- a "frame": what does it mean? (I looked into pack-rul.mkiv, with no results)
ConTeXt uses the value from the frameoffset key for backgroundoffset. \startuseMPgraphic{frameborder} draw OverlayBox withcolor blue ; \stopuseMPgraphic \defineoverlay[frameborder][\useMPgraphic{frameborder}] \setupheader[state=high] \setupfooter[state=high] \starttext \setupframed [width=4cm, height=4cm, offset=1cm] \framed{} \framed[frame=off,background=frameborder]{} \framed[frameoffset=-5mm]{} \framed[frameoffset=-5mm,frame=off,background=frameborder]{} \framed[backgroundoffset=-5mm,frame=off,background=frameborder]{} \framed[frameoffset=-5mm,backgroundoffset=frame,frame=off,background=frameborder]{} \stoptext Wolfgang