Idris Samawi Hamid wrote:
Dear gang,
I need a way to overlay four framed boxes so that each inner box is exactly in the center of its respective outer box. So far I have the following, but careful inspection will show that the boxes are not precisely centered with respect to each other. I could go on by trial and error but I'm sure there is a direct way to do this.
The text should also be precisely centered between frames.
Thank you in advance! Idris ========================================================= \setupoutput[pdftex]%
\setuppagenumbering[state=stop] \starttext
\setupfloats[location=middle] \placefigure [here][tab:enclosure]{4 Stages.} { \midaligned{ \framed [width=12\baselineskip,height=12\baselineskip,strut=yes] {\midaligned{Stage 1} \midaligned% {\framed[width=9\baselineskip,height=9\baselineskip,strut=yes] {\midaligned{Stage 2} \midaligned% {\framed[width=6\baselineskip,height=6\baselineskip,strut=yes] {\midaligned{Stage 3} \midaligned% {\framed[width=3\baselineskip,height=3\baselineskip,strut=yes] {\midaligned{Stage 4}} } \midaligned{\null}}% } \midaligned{\null}}% } \midaligned{\null}} } }
\stoptext \starttext
\definelayer[test][width=12\bodyfontsize,height=12\bodyfontsize] \setlayerframed[test][preset=middle][width=12\bodyfontsize,height=12\bodyfontsize]{one} \setlayerframed[test][preset=middle][width= 9\bodyfontsize,height= 9\bodyfontsize]{two} \setlayerframed[test][preset=middle][width= 6\bodyfontsize,height= 6\bodyfontsize]{three} \setlayerframed[test][preset=middle][width= 3\bodyfontsize,height= 3\bodyfontsize]{four} \tightlayer[test] \stoptext -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------