[texhax] Reversing letter color

neville holmes holmeswn at yahoo.com.au
Wed May 9 06:15:09 CEST 2012


--- On Wed, 9/5/12, William Adams <will.adams at frycomm.com> wrote:

> From: William Adams <will.adams at frycomm.com>
> Subject: Re: [texhax] Reversing letter color
> To: "neville holmes" <holmeswn at yahoo.com.au>
> Cc: "TeXhax" <texhax at tug.org>
> Received: Wednesday, 9 May, 2012, 12:19 AM
> On May 8, 2012, at 8:05 AM, neville
> holmes wrote:
> 
> > I want to reverse occasional letters or words,
> reversion
> > in the sense of the letter or word being white on a
> black
> > (or dark gray) background.
> > 
> > If you could provide me with a macro to do this, that
> > would be wonderful.
> On May 8, 2012, at 8:05 AM, I wrote:
> 
>> I want to reverse occasional letters or words,
>> reversion in the sense of the letter or word 
>> being white on a black (or dark gray) background.
>> 
>> If you could provide me with a macro to do this,
>> that would be wonderful.
>
> On 9 May, 2012, 12:19 AM, Will Adams wrote:
> 
> Something like this?
> 
> \documentclass{minimal}
> \usepackage{xcolor}
> \newcommand{\reversedtext}[1]{\colorbox[gray]{0}{\textcolor[gray]{1}{#1}}}
> \begin{document}
> \reversedtext{reversed text}
> \end{document}
> 
> 0== black, 1 == white, values in-betwixt for grey tints.
> 
Will,

That's wonderful !!  Works like a charm.

And thanks for the sphinx.  Up till now I've been
using "Pack my box with five dozen liquor jugs"

Neville

Neville Holmes
P.O. Box 2412, Bakery Hill 3354, Victoria, Australia
tinyurl.com/wnhrkyv



More information about the texhax mailing list