ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \parbox, \framed, ... (was: Strange behaviour of \bTABLE ... \eTABLE)
@ 2005-07-26 15:41 Mojca Miklavec
  2005-07-26 20:29 ` \parbox, \framed, Patrick Gundlach
  2005-07-26 22:16 ` \parbox, \framed, ... (was: Strange behaviour of \bTABLE ... \eTABLE) Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Mojca Miklavec @ 2005-07-26 15:41 UTC (permalink / raw)


Hans Hagen wrote:
> Mojca Miklavec wrote:
> > %%%%%%
> >
> > \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}
> >
> > %%%%%%
> >
> ^^^^ watch the \\ ! ! ! !

Actually, "\\" is a part of
    \fbox{\begin{tabular}[c]{l}1\\2\\3\end{tabular}}\par
while I was talking about typesetting
    a midaligned parbox: \parbox[c]{1em}{1 2 3}

So I have to say: no, there's no "\\" present in "\parbox[c]{1em}{1 2
3}". But please forget about different line-braking than in LaTeX
\parbox. It may be that different parameters for penalties are set
anyway. I mainly wrote this because of the problems in
live.contextgarden.net which is not fixed yet (see
http://contextgarden.net/Vertically_centred).

However, some other questions arised here:

1.) I saw \hbox, \vbox, \vtop, \lbox, \cbox, \rbox, \sbox, \tbox,
\bbox on page 106 of cont-eni.pdf. But if I understand it properly,
there's no alternative to LaTeX \parbox command.
1.1.) After grep-ing the LaTeX tree for "\parbox", my disk ran out of space
1.2.) \bTABLE ... \eTABLE seems too complicated to me to be used for
such a simple thing as asking for a paragraph of a certain width,
centered with regard to the current line.

So would it be possible to implement \parbox in ConTeXt (or if someone
can point me to an already existing command). The LaTeX definition is
in tex\latex\base\latex.ltx, line 4692 (at least in my version).

It does not have to have the same syntax, but at least the basic
functionality. I also often need some stuff to be centered vertically,
for example
    [big image] ----> some arrows and text ----> [big image]
I use \bTABLE ... \eTABLE or \vcenter for that, but it's not the most
perfect way of doing it.

2.) Is there any *neutral* version of a \framed command? To explain
what I want to achive, an example is probably most illustrative:

    \starttext
    Hasselt $\displaystyle{\rm is: \matrix{\rm nice\cr\rm sunny\cr\rm
domestic}}$,
    but the houses there \framed{$\displaystyle{\rm are: \matrix{\rm
too\ high\cr\rm too\ bricky}}$}
    \stoptext

Thank you,
    Mojca

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

* Re: \parbox, \framed, ...
  2005-07-26 15:41 \parbox, \framed, ... (was: Strange behaviour of \bTABLE ... \eTABLE) Mojca Miklavec
@ 2005-07-26 20:29 ` Patrick Gundlach
  2005-07-26 22:16 ` \parbox, \framed, ... (was: Strange behaviour of \bTABLE ... \eTABLE) Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Patrick Gundlach @ 2005-07-26 20:29 UTC (permalink / raw)


Hi Mojca,



[...]

> anyway. I mainly wrote this because of the problems in
> live.contextgarden.net which is not fixed yet (see

They should be fixed now. Sorry for the delay. 

Patrick
-- 
ConTeXt wiki and more: http://contextgarden.net

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

* Re: \parbox, \framed, ... (was: Strange behaviour of \bTABLE ... \eTABLE)
  2005-07-26 15:41 \parbox, \framed, ... (was: Strange behaviour of \bTABLE ... \eTABLE) Mojca Miklavec
  2005-07-26 20:29 ` \parbox, \framed, Patrick Gundlach
@ 2005-07-26 22:16 ` Hans Hagen
  2005-07-29 11:25   ` Mojca Miklavec
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2005-07-26 22:16 UTC (permalink / raw)


Mojca Miklavec wrote:

>1.) I saw \hbox, \vbox, \vtop, \lbox, \cbox, \rbox, \sbox, \tbox,
>\bbox on page 106 of cont-eni.pdf. But if I understand it properly,
>there's no alternative to LaTeX \parbox command.
>1.1.) After grep-ing the LaTeX tree for "\parbox", my disk ran out of space
>1.2.) \bTABLE ... \eTABLE seems too complicated to me to be used for
>such a simple thing as asking for a paragraph of a certain width,
>centered with regard to the current line.
>  
>
as always, it's \framed that does the trick:

\input tufte  \framed[location=middle,align=center]{what\\is a\\parbox} 
\input tufte

Hans

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

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

* Re: \parbox, \framed, ... (was: Strange behaviour of \bTABLE ... \eTABLE)
  2005-07-26 22:16 ` \parbox, \framed, ... (was: Strange behaviour of \bTABLE ... \eTABLE) Hans Hagen
@ 2005-07-29 11:25   ` Mojca Miklavec
  2005-07-29 11:57     ` \parbox, \framed, Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Mojca Miklavec @ 2005-07-29 11:25 UTC (permalink / raw)


Hans Hagen wrote:
> Mojca Miklavec wrote:
> 
> >1.) I saw \hbox, \vbox, \vtop, \lbox, \cbox, \rbox, \sbox, \tbox,
> >\bbox on page 106 of cont-eni.pdf. But if I understand it properly,
> >there's no alternative to LaTeX \parbox command.
> >1.1.) After grep-ing the LaTeX tree for "\parbox", my disk ran out of space
> >1.2.) \bTABLE ... \eTABLE seems too complicated to me to be used for
> >such a simple thing as asking for a paragraph of a certain width,
> >centered with regard to the current line.
> >
> as always, it's \framed that does the trick:
> 
> \input tufte  \framed[location=middle,align=center]{what\\is a\\parbox}
> \input tufte

Thank you a lot. I didn't know the location=middle option (yupi, no
need for \vcenter any more :).

Without align=, \framed behaves pretty much like a \hbox. So once I
unsuccessfully tried \crlf and \\ inside \framed a couple of times, I
gave up, forgetting about some nice examples in the manual.

But how do I get rid of the blank line in this example:

\framed
	[align=flushleft]
	{\typefile{tufte.tex}}

Thank you,
    Mojca

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

* Re: \parbox, \framed, ...
  2005-07-29 11:25   ` Mojca Miklavec
@ 2005-07-29 11:57     ` Taco Hoekwater
  2005-07-29 14:16       ` Mojca Miklavec
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2005-07-29 11:57 UTC (permalink / raw)




Mojca Miklavec wrote:
> But how do I get rid of the blank line in this example:
> 

\framed [align=flushleft,
          strut=no]
  	{\typefile{tufte.tex}}

Cheers, Taco

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

* Re: \parbox, \framed, ...
  2005-07-29 11:57     ` \parbox, \framed, Taco Hoekwater
@ 2005-07-29 14:16       ` Mojca Miklavec
  0 siblings, 0 replies; 6+ messages in thread
From: Mojca Miklavec @ 2005-07-29 14:16 UTC (permalink / raw)


Taco Hoekwater wrote:
> Mojca Miklavec wrote:
> > But how do I get rid of the blank line in this example:
> 
> \framed [align=flushleft,
>           strut=no]
>         {\typefile{tufte.tex}}

OK, sure. I didn't think about this one.

Thank you Taco,
     Mojca

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

end of thread, other threads:[~2005-07-29 14:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-26 15:41 \parbox, \framed, ... (was: Strange behaviour of \bTABLE ... \eTABLE) Mojca Miklavec
2005-07-26 20:29 ` \parbox, \framed, Patrick Gundlach
2005-07-26 22:16 ` \parbox, \framed, ... (was: Strange behaviour of \bTABLE ... \eTABLE) Hans Hagen
2005-07-29 11:25   ` Mojca Miklavec
2005-07-29 11:57     ` \parbox, \framed, Taco Hoekwater
2005-07-29 14:16       ` Mojca Miklavec

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