> Hi Malte,
> 
> > 1. The top left cell is divided in two by a diagonal line with
> > separate text into each triangle
> 
> This should get you started:
> http://article.gmane.org/gmane.comp.tex.context/67721

That solution is very hackish and the result ugly. Here is a more
clean solution. It has (at least ) one caveat: Because the first
tabulate column is set in paragraph mode, it will eat up as much
space as *possible*, in contrast to occupying as much space as
*necessary*. That is why the width of the column has to be set
explicitly.

\startuseMPgraphic{DiagonalRule}
  rulethickness := \frameddimension{rulethickness};

  drawoptions(
    withpen pencircle scaled rulethickness
    withcolor \MPcolor{\framedparameter{framecolor}});

  pair leftcorner, rightcorner;
  leftcorner  := (rulethickness, \overlayheight-rulethickness);
  rightcorner := (\overlaywidth-rulethickness, rulethickness);

  draw leftcorner -- rightcorner;
\stopuseMPgraphic

\defineoverlay
  [DiagonalRule]
  [\useMPgraphic{DiagonalRule}]

\define[2]\DiagonalLabel{%
  \setuptabulate [after={\blank[\frameddimension{offset}]}]
  \starttabulate [|p|r|]
    \NC    \NC #2 \NC\NR
    \NC #1 \NC    \NC\NR
  \stoptabulate
}

\starttext
  \setupTABLE [1] [width=2cm]
  \bTABLE
    \bTR
      \bTD [background=DiagonalRule]
        \DiagonalLabel{Foo}{Bar}
      \eTD
      \bTD Second \eTD
      \bTD Third \eTD
    \eTR
    \bTR
      \bTD Alpha \eTD
      \bTD Beta  \eTD
      \bTD Gamma \eTD
    \eTR
  \eTABLE
\stoptext


Marco

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to