In the question Generate table with dynamic number of columns the OP posed a question to which my initial reaction was "No".
However, now I've run into something interesting which, if I'm reading it right, would fit the bill. From the TeX by topic by Victor Eijkhout (25.2.3):
\noalign{\penalty100}
for discouraging a page break (or line break) in between two rows (columns) of an\halign
(\valign
).
So if I understood the above correctly, for \valign
that would read:
\noalign{\penalty100}
for discouraging a line break in between two columns of an\valign
.
I thought: "That's exactly what was asked for", but couldn't figure out how.
\penalty1000
only discourages a line break; to inhibit it you have to say\penalty10000
\hsize
is reasonable. But if I typeset your alignment after\hsize=1pt
I don't get any line break, that would instead be present if the inserted penalties were less than 10000.