ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* box'es do not spread out
@ 2016-02-05 19:34 Meer, Hans van der
  2016-02-06  5:43 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Meer, Hans van der @ 2016-02-05 19:34 UTC (permalink / raw)
  To: NTG ConTeXt


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

I am struggling with the following problem:

Collect a number of boxes with:
\global\setbox\placexcontent=\hbox{%
\box\placexcontent % collection of previous boxes
\box\placexbox % next box affixed to previous onse
\hskip\placexdistanceskip % spearation, replacing by \hfill does not solve problem
}%
Thus the incoming \placexbox'es are strung together separated by a skip.
Later they are typeset centered as a whole with:
\hbox to\textwidth{% % will be wider than the sum of the original box collection
\hss
\box\placexcontent % or \unhbox, doesn't look different
\unskip % unskip removes the last (extra) \hskip
\hss % should succumb to \hskip 0pt plus1fill
}%

The problem is the following:
(1) \placexdistanceskip=10pt boxes are separated neatly
(2) \placexdistanceskip=0pt plus1fill BOXES DO NOT SPREAD OUT AS I EXPECTED THEM TO DO
The flexible component does sadly not carry over to the final box, apparently.

Clearly my misunderstanding of working with boxes.
Can this be solved easily?

Hans van der Meer





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

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

___________________________________________________________________________________
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: box'es do not spread out
  2016-02-05 19:34 box'es do not spread out Meer, Hans van der
@ 2016-02-06  5:43 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2016-02-06  5:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Meer, Hans van der <mailto:H.vanderMeer@uva.nl>
> 5. Februar 2016 um 20:34
> I am struggling with the following problem:
>
> Collect a number of boxes with:
> \global\setbox\placexcontent=\hbox{%
> \box\placexcontent% collection of previous boxes
> \box\placexbox% next box affixed to previous onse
> \hskip\placexdistanceskip% spearation, replacing by \hfill does not 
> solve problem
> }%
> Thus the incoming \placexbox'es are strung together separated by a skip.
> Later they are typeset centered as a whole with:
> \hbox to\textwidth{%% will be wider than the sum of the original box 
> collection
> \hss
> \box\placexcontent% or \unhbox, doesn't look different
> \unskip% unskip removes the last (extra) \hskip
> \hss% should succumb to \hskip 0pt plus1fill
> }%
>
> The problem is the following:
> (1) \placexdistanceskip=10ptboxes are separated neatly
> (2) \placexdistanceskip=0pt plus1fillBOXES DO NOT SPREAD OUT AS I 
> EXPECTED THEM TO DO
> The flexible component does sadly not carry over to the final box, 
> apparently.
>
> Clearly my misunderstanding of working with boxes.
> Can this be solved easily?
It will really help when you send complete working examples and not only 
code snippets.

Maybe you're looking for the \spreadhbox command.

\starttext

\setbox\scratchbox\emptyhbox

\setbox\scratchbox\hbox{First box}
\setbox\scratchbox\hbox{\box\scratchbox\hbox{Second box}}
\setbox\scratchbox\hbox{\box\scratchbox\hbox{Third box}}

\maxaligned{\spreadhbox\scratchbox}

\stoptext

Wolfgang

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

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

___________________________________________________________________________________
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:[~2016-02-06  5:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-05 19:34 box'es do not spread out Meer, Hans van der
2016-02-06  5:43 ` 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).