ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* unequal framed's
@ 2006-06-29 21:05 Hans van der Meer
  2006-06-29 22:21 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Hans van der Meer @ 2006-06-29 21:05 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1828 bytes --]

This is a problem I am anxious to solve.
Run this program:

\starttext
\newbox\testbox
\hbox{%
% centered
\setbox\testbox=\vbox{\vskip5mm\framed 
[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,t 
op=\vss,bottom=\vss]{lp}\vskip5mm}
\the\ht\testbox \box\testbox
% bottom
\setbox\testbox=\vbox{\vskip5mm\framed 
[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,t 
op=\vss,bottom=\empty]{lp}\vskip5mm} % note leaveout bottom=, not good
\the\ht\testbox \box\testbox
% top
\setbox\testbox=\vbox{\vskip5mm\framed 
[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,t 
op=\empty,bottom=\vss]{lp}\vskip5mm} % note leaveout top=, not good
\the\ht\testbox \box\testbox
}
\stoptext

Now the middle box comes out higher than the other two, like this:
                ------------
------------   |          |   ------------
|          |   |          |   |lp        |
|          |   |          |   |          |
|          |   |          |   |          |
|lp        |   |          |   |          |
|          |   |          |   |          |
|          |   |          |   |          |
|          |   |lp        |   |          |
------------   ------------   ------------
The \ht's will tell the difference, the \dp's are 0 here.
Using \vtop gives analogous results, then the depth of middle box is  
greater.

Probing with [depth=0pt] makes no difference.
Setting [strut=yes/no] makes some difference but is not the cause of  
the difference.
Setting [align=no/line] makes no difference.
Omitting [align=..] or using [align=normal] makes all boxes the same  
height but puts every contents in the middle, which is not what I  
want: one at the top, one in the middle and one at the bottom.

How can I get the required result with all three the same height?

Hans van der Meer




[-- Attachment #1.2: Type: text/html, Size: 5384 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: unequal framed's
  2006-06-29 21:05 unequal framed's Hans van der Meer
@ 2006-06-29 22:21 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2006-06-29 22:21 UTC (permalink / raw)


Hans van der Meer wrote:
> This is a problem I am anxious to solve.
> Run this program:
>
> \starttext
> \newbox\testbox
> \hbox{%
> % centered
> \setbox\testbox=\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,top=\vss,bottom=\vss]{lp}\vskip5mm}
> \the\ht\testbox \box\testbox
> % bottom
> \setbox\testbox=\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,top=\vss,bottom=\empty]{lp}\vskip5mm} 
> % note leaveout bottom=, not good
> \the\ht\testbox \box\testbox
> % top
> \setbox\testbox=\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,top=\empty,bottom=\vss]{lp}\vskip5mm} 
> % note leaveout top=, not good
> \the\ht\testbox \box\testbox
> }
> \stoptext
>
> Now the middle box comes out higher than the other two, like this:
> � �� �� �� �� �------------
> ------------� �| � �� �� �|� �------------
> | � �� �� �|� �| � �� �� �|� �|lp� � �� �|
> | � �� �� �|� �| � �� �� �|� �| � �� �� �|
> | � �� �� �|� �| � �� �� �|� �| � �� �� �|
> |lp� � �� �|� �| � �� �� �|� �| � �� �� �|
> | � �� �� �|� �| � �� �� �|� �| � �� �� �|
> | � �� �� �|� �| � �� �� �|� �| � �� �� �|
> | � �� �� �|� �|lp� � �� �|� �| � �� �� �|
> ------------� �------------� �------------
> The \ht's will tell the difference, the \dp's are 0 here.
> Using \vtop gives analogous results, then the depth of middle box is 
> greater.
>
> Probing with [depth=0pt] makes no difference.
> Setting [strut=yes/no] makes some difference but is not the cause of 
> the difference.
> Setting [align=no/line] makes no difference.
> Omitting [align=..] or using [align=normal] makes all boxes the same 
> height but puts every contents in the middle, which is not what I 
> want: one at the top, one in the middle and one at the bottom.
>
> How can I get the required result with all three the same height?
\starttext

\hbox{%
\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,top=\vss,bottom=\obeydepth\vss]{lp}\vskip5mm}%
\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,top=\vss,bottom=\obeydepth]{lp}\vskip5mm}% \vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,top=\empty,bottom=\obeydepth]{lp}\vskip5mm}%
}

\hbox{%
\vbox{\vskip5mm\framed[frame=on,align={disable,high},width=1cm,height=2cm,offset=0pt]{lp}\vskip5mm}%
\vbox{\vskip5mm\framed[frame=on,align={disable,low},width=1cm,height=2cm,offset=0pt]{lp}\vskip5mm}% \vbox{\vskip5mm\framed[frame=on,align={disable,lohi},width=1cm,height=2cm,offset=0pt]{lp}\vskip5mm}% }

\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
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-29 22:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-29 21:05 unequal framed's Hans van der Meer
2006-06-29 22:21 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).