Am 20.05.10 11:45, schrieb Vladimir Lomov:
Hi.

(Sorry for unclear question in topic.)

I want to put a brace (right or left isn't matter now) in a TABLE (may
be another table environment) like in below scheme

a11 a12| a13
a21 a22| a23
a31 a32  a33
a41 a42  a43
a51 a52| a53
a61 a62| a63

Here '|' marks place and elements which should be grouped by a brace.

Thanks in advance, Vladimir Lomov.

P.S. I'm new in context and don't have any idea how to achieve this. I
thought about graphics (metapost) to draw a brace or join two cells and
draw big brace. And, yes I use mkiv and latest beta (context minimal).

You can play with this:

\def\linkeklammer
{\setbox\scratchbox\hbox{$\left\{\vrule height .5\vsize depth .5\vsize width 0pt\relax\right.$}% \rightaligned{\hbox to .5\wd\scratchbox{\raise\dp\scratchbox\box\scratchbox\hss}}}

\def\rechteklammer
{\setbox\scratchbox\hbox{$\left.\vrule height .5\vsize depth .5\vsize width 0pt\relax\right\}$}% \leftaligned{\hbox to .5\wd\scratchbox{\hss\raise\dp\scratchbox\box\scratchbox}}}

\defineoverlay[linkeklammer] [\linkeklammer]
\defineoverlay[rechteklammer][\rechteklammer]

\starttext

\bTABLE
  \bTR[align={middle,middle},frame=off,offset=1ex]
    \bTD[background=linkeklammer] text \eTD
    \bTD text\\text\\text \eTD
    \bTD[background=rechteklammer] text \eTD
  \eTR
\eTABLE

\stoptext

and this:

\startuseMPgraphic{accolade}
z1  = (-233,0) ;
z2  = (-220,22) ;
z3  = (-155,211) ;
z4  = (-200,690) ;
z5  = (-142,1033) ;
z6  = (-97,1106) ;
z7  = (-71,1125) ;
z8  = (-61,1104) ;
z9  = (-80,1077) ;
z10 = (-108,1002) ;
z11 = (-129,666) ;
z12 = (-117,207) ;
z13 = (-197,19) ;
z14 = (-208,0) ;
z15 = (-197,-19) ;
z16 = (-117,-207) ;
z17 = (-129,-666) ;
z18 = (-108,-1026) ;
z19 = (-80,-1077) ;
z20 = (-61,-1104) ;
z21 = (-71,-1125) ;
z22 = (-97,-1106) ;
z23 = (-143,-1031) ;
z24 = (-199,-673) ;
z25 = (-155,-211) ;
z26 = (-220,-22) ;
fill z1 for i=2 upto 14: .. z[i] endfor & z14 for j=15 upto 26: .. z[j] endfor .. z1 & cycle ;
\stopuseMPgraphic

\defineoverlay[leftbrace] [\leftaligned {\scale[height=\overlayheight]{\useMPgraphic{accolade}}}] \defineoverlay[rightbrace][\rightaligned{\mirror{\scale[height=\overlayheight]{\useMPgraphic{accolade}}}}]

\starttext

\framedtext[frame=off,loffset=1em,roffset=1em,background={leftbrace,rightbrace}]{\input knuth\par}

\setupTABLE[frame=off,offset=1ex]
\setupTABLE[row][each][align={middle,lohi}]
\bTABLE
  \bTR
    \bTD[nr=3,background=leftbrace] drei \eTD
    \bTD[nr=2,background=leftbrace] zwei \eTD
    \bTD f \eTD
    \bTD o \eTD
    \bTD u \eTD
    \bTD r \eTD
    \bTD [nr=3,background=rightbrace] three \eTD
  \eTR
  \bTR
    \bTD [background=leftbrace] eins \eTD
    \bTD null \eTD
    \bTD [background=rightbrace] one \eTD
    \bTD [nr=2,background=rightbrace] two \eTD
  \eTR
  \bTR
    \bTD v \eTD
    \bTD i \eTD
    \bTD e \eTD
    \bTD r \eTD
  \eTR
\eTABLE

\stoptext

Wolfgang

___________________________________________________________________________________
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