[texhax] Changing font color of a saved box of text - is it possible?

Ivan Griffin ivan at skynet.ie
Tue Sep 4 13:53:14 CEST 2012



On Tue, 4 Sep 2012, Heiko Oberdiek wrote:

> If you need boxes, this can be done using the low level TeX interface:
>
> \setbox\boxFoo=\hbox{%
>  \begingroup
>    This is test 1.%
>  \endgroup
> }
>
> The group with \begingroup and \endgroup is a protection for the case that
> color commands are used inside the text. Color resetting is done outside
> the current group and would slip out of the box without the additional
> group.
>

This worked perfectly!

Many thanks,
Ivan.



More information about the texhax mailing list