ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \framed[height=broad] vs \framed[height=fit]
@ 2010-04-21  3:34 Aditya Mahajan
  2010-04-21 12:37 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Aditya Mahajan @ 2010-04-21  3:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I was updating the wiki page on \framed and realized that I do not know 
the difference between height=broad|fit in \framed. Reading pack-rul 
suggests that both should behave similarly. The following example from 
pack-rul also shows no difference.

\starttext
\bgroup
\showstruts
\dontcomplain
\startlinecorrection
\halign{#\enskip&#\enskip&#\enskip&#\enskip&#\enskip&#\cr
   \framed[width=.2\hsize, height=.2\hsize, align=]      {a\par b\par c}&
   \framed[width=.2\hsize, height=broad,    align=]      {a\par b\par c}&
   \framed[width=.2\hsize, height=fit,      align=]      {a\par b\par c}&
   \framed[width=fit,      height=.2\hsize, align=]      {a\par b\par c}&
   \framed[width=fit,      height=broad,    align=]      {a\par b\par c}&
   \framed[width=fit,      height=fit,      align=]      {a\par b\par c}\cr
   \noalign{\vskip1em}
   \framed[width=.2\hsize, height=.2\hsize, align=yes]   {a\par b\par c}&
   \framed[width=.2\hsize, height=broad,    align=yes]   {a\par b\par c}&
   \framed[width=.2\hsize, height=fit,      align=yes]   {a\par b\par c}&
   \framed[width=fit,      height=.2\hsize, align=yes]   {a\par b\par c}&
   \framed[width=fit,      height=broad,    align=yes]   {a\par b\par c}&
   \framed[width=fit,      height=fit,      align=yes]   {a\par b\par c}\cr
   \noalign{\vskip1em}
   \framed[width=.2\hsize, height=.2\hsize, align=right] {a\par b\par c}&
   \framed[width=.2\hsize, height=broad,    align=right] {a\par b\par c}&
   \framed[width=.2\hsize, height=fit,      align=right] {a\par b\par c}&
   \framed[width=fit,      height=.2\hsize, align=right] {a\par b\par c}&
   \framed[width=fit,      height=broad,    align=right] {a\par b\par c}&
   \framed[width=fit,      height=fit,      align=right] {a\par b\par c}\cr
   \noalign{\vskip1em}
   \framed[width=.2\hsize, height=.2\hsize, align=left]  {a\par b\par c}&
   \framed[width=.2\hsize, height=broad,    align=left]  {a\par b\par c}&
   \framed[width=.2\hsize, height=fit,      align=left]  {a\par b\par c}&
   \framed[width=fit,      height=.2\hsize, align=left]  {a\par b\par c}&
   \framed[width=fit,      height=broad,    align=left]  {a\par b\par c}&
   \framed[width=fit,      height=fit,      align=left]  {a\par b\par c}\cr
   \noalign{\vskip1em}
   \framed[width=.2\hsize, height=.2\hsize, align=middle] {a\par b\par c}&
   \framed[width=.2\hsize, height=broad,    align=middle] {a\par b\par c}&
   \framed[width=.2\hsize, height=fit,      align=middle] {a\par b\par c}&
   \framed[width=fit,      height=.2\hsize, align=middle] {a\par b\par c}&
   \framed[width=fit,      height=broad,    align=middle] {a\par b\par c}&
   \framed[width=fit,      height=fit,      align=middle] {a\par b\par 
c}\cr}
\stoplinecorrection
\blank[2*big]
\egroup
\stoptext

Is there a difference between the two? If not, why do we have two values 
then?

Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: \framed[height=broad] vs \framed[height=fit]
  2010-04-21  3:34 \framed[height=broad] vs \framed[height=fit] Aditya Mahajan
@ 2010-04-21 12:37 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2010-04-21 12:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 21.04.10 05:34, schrieb Aditya Mahajan:
> Hi,
>
> I was updating the wiki page on \framed and realized that I do not 
> know the difference between height=broad|fit in \framed. Reading 
> pack-rul suggests that both should behave similarly. The following 
> example from pack-rul also shows no difference.

as you can see here (pack-rul.mkiv) both values result in \boxhasheightfalse
    \ifx\localheight\v!fit
      \boxhasheightfalse % no longer: \boxhasstrutfalse
    \else\ifx\localheight\v!broad
      \boxhasheightfalse

> Is there a difference between the two? If not, why do we have two 
> values then?
I think we have both because you can 'fit' and 'broad' for width but when
width and height should follow the same rules i say 'width=broad' should
result in 'height=\vsize' because 'width=broad' is equal to 'width=\hsize'.

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
___________________________________________________________________________________


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

end of thread, other threads:[~2010-04-21 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-21  3:34 \framed[height=broad] vs \framed[height=fit] Aditya Mahajan
2010-04-21 12:37 ` Wolfgang Schuster

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).