[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: generic color support for `texinfo.tex`

From: Gavin Smith
Subject: Re: generic color support for `texinfo.tex`
Date: Sat, 18 Dec 2021 14:57:27 +0000
User-agent: Mutt/1.9.4 (2018-02-28)

On Wed, Nov 24, 2021 at 10:21:53PM +0000, Werner LEMBERG wrote:
> Care to cook up such a possibly failing example?

With your patch, the following produces a malformed PDF file:

@setcolor{0.7 0.7 0.2}bbb
@setcolor{0 0 0}ccc
ddd @r{@setcolor{0.2 0.7 0.7}comment@setcolor{0 0 0}}
@end example

due to the nesting of @setcolor inside @r.

Admittedly, putting any commands inside @example is an unlikely case,
but still possible so I'd rather not risk it and have some obscure breakage
in the future when we have forgotten this conversation.

The following works with your patch:

\gdef\colorteal{0.2 0.7 0.7}
\gdef\colorblack{0 0 0}
@end tex
@setcolor{0.7 0.7 0.2}bbb
@setcolor{0 0 0}ccc
ddd @r{@setcolor{@colorteal}comment@setcolor{@colorblack}}
@end example 

This uses the work-around of defining the colour sequences as separate
definitions, outside of the @example environment.

I expect your colouring of the manual would use a finite number of preknown
colours so this approach would work.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]