Am 07.12.2009 um 11:21 schrieb Hans Hagen:
detail ...
\def\ruby#1#2% {\dontleavehmode\bgroup \setbox\scratchboxone\hbox{#1}% \setbox\scratchboxtwo\hbox{#2}% \scratchdimen\wd\ifdim\wd\scratchboxone>\wd\scratchboxtwo\scratchboxone\else\scratchboxtwo\fi \setbox\scratchbox\vbox {\hbox to \scratchdimen{\hss\box\scratchboxtwo\hss} \hbox to \scratchdimen{\hss\box\scratchboxone\hss}}% \pdfactualtext{\box\scratchbox}{#1 (#2)}% \egroup}
\starttext text \ruby{lua text}{ruby or perl text which is more blabla} text \stoptext
this was just a simplified example, the real implementation is more complex by default ruby text overlaps the surrounding text (like in my example) and what you suggested can be activated but it's not so nice because you get unwanted whitespace in the text Wolfgang