[NTG-context] box'es do not spread out

Wolfgang Schuster schuster.wolfgang at gmail.com
Sat Feb 6 06:43:31 CET 2016


> Meer, Hans van der <mailto:H.vanderMeer at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20160206/64e3c65b/attachment-0001.html>


More information about the ntg-context mailing list