box'es do not spread out
![](https://secure.gravatar.com/avatar/29c7bbff49b1599eddb2ec73fd9ffa6e.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
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
participants (2)
-
Meer, Hans van der
-
Wolfgang Schuster