[XeTeX] How to append text to a paragraph (in an existing vbox)?

Ron Aaron ron at ronware.org
Fri Jul 16 10:19:24 CEST 2010


Once again I am stumped by something which is probably trivial.  

What I wish to do is accumulate text into a paragraph "as I go".  My simple approach is to allocate a box, and then unbox and add the text.  But this doesn't work as I intend:

\newbox\textbox
\def\addbox#1{
	\setbox\textbox\vbox{
		\unvbox\textbox#1
	}
}

\addbox{Hello}
\addbox{there!}


What I get is each appended bit of text in a separate line.  I've tried to "\unskip" and "\unkern" etc. after the \unvbox, but whatever I do I get a list of lines rather than a paragraph as I would like.  So far I haven't found any answers in my searching, so if one of you would be kind enough to point me in the right direction I would be appreciative.

I know I can use an auxiliary file to do this, but that seems overkill.

Thank you!

-- 
Sending me something private?
Use my GPG public key: AD29415D


More information about the XeTeX mailing list