ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Strange behaviour of \bTABLE ... \eTABLE
@ 2005-07-25 18:52 Elena Fraboschi
  2005-07-25 20:04 ` Mojca Miklavec
  2005-07-25 20:43 ` Hans Hagen
  0 siblings, 2 replies; 11+ messages in thread
From: Elena Fraboschi @ 2005-07-25 18:52 UTC (permalink / raw)


Dear Mojca:

I think I see what the problem is.  If, instead of typing

>\bTR\bTD
>	a midaligned parbox:
>\eTD\bTD[offset=0pt,width=1em] % 1em wide paragraph
>	1 2 3
>\eTD\eTR

you type
1\ 2\ 3\

you get what is wanted, namely,

  1
  2
  3
  
My guess is that there is a built-in bias not to split a line
but, rather, give you an overfull \hbox.  I "forced" the
issue by defining each column to be less than 1em (because "1"
is a very narrow char that surely takes less than 1 em), and
by adding a typescript space after each number.  It might
even be possible to eliminate the typescript space and simply
define each column to be 0.25em, say, but I did not try it.
Best, elena

P.S.  Let me know if I missed the boat entirely.  This is the
first issue I attempt to answer.

Here is what I ran in LiveContext:

\starttext
\setupTABLE[frame=on] % only for debugging reasons
\setupTABLE[c][each][align=lohi] % to center vertically (any better way?)
\bTABLE
\bTR\bTD[offset=0pt,width=0.5em] % 1em wide paragraph
	1\ 2\ 3\
\eTD\eTR
\eTABLE
\stoptext



>Hello,
>
>On the wiki (http://contextgarden.net/Vertically_centred) a while ago 
>someone asked how to do the following in ConTeXt:
>
>%%%%%%
>
>\documentclass{article}
>\begin{document}
>a box with a table:
>\fbox{\begin{tabular}[c]{l}1\\2\\3\end{tabular}}\par
>
>a midaligned parbox: \parbox[c]{1em}{1 2 3}
>\end{document}
>
>%%%%%%
>
>I don't know if this would be the proper solution, but for the second 
>case (\parbox[c]{1em}{...} which should make a paragraph 1 em wide and 
>center the paragraph box vertically) I tried the following:
>
>%%%%%%
>
>\setupTABLE[frame=on] % only for debugging reasons
>\setupTABLE[c][1,2][align=lohi] % to center vertically (any better way?)
>\bTABLE
>\bTR\bTD
>	a midaligned parbox:
>\eTD\bTD[offset=0pt,width=1em] % 1em wide paragraph
>	1 2 3
>\eTD\eTR
>\eTABLE
>
>%%%%%%
>
>My ConTeXt version is 2005.06.27.
>See the vcenter-context-old.png for the result.
>
>The strange thing is that the number 2 is still in the first line, 
>although it is too wide.
>
>Even more strange, I tried the same on live.contextgarden.net. See 
>vcenter-context-new.png for the result.
>
>vcenter-latex.tex is what the result should be.
>
>-------------------------------------------------------------------
>
>This also results in a mess on the live.contextgarden.net:
>
>\bTABLE
>\bTR\bTD
>     {\bTABLE
>        \bTR\bTD whatever \eTD\eTR
>     \eTABLE}
>\eTD\eTR
>\eTABLE
>
>Mojca

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

end of thread, other threads:[~2005-07-27  7:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-25 18:52 Strange behaviour of \bTABLE ... \eTABLE Elena Fraboschi
2005-07-25 20:04 ` Mojca Miklavec
2005-07-25 20:42   ` test suite in the garden (was: Strange behaviour of \bTABLE) Henning Hraban Ramm
2005-07-25 22:12     ` test suite in the garden Hans Hagen
2005-07-26 21:36     ` Patrick Gundlach
2005-07-26 22:23       ` Mojca Miklavec
2005-07-26 22:38         ` Patrick Gundlach
2005-07-27  7:33       ` Taco Hoekwater
2005-07-25 20:46   ` Strange behaviour of \bTABLE ... \eTABLE Hans Hagen
2005-07-26  8:22     ` Taco Hoekwater
2005-07-25 20:43 ` 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).