bug-texinfo
[Top][All Lists]
Advanced

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

Re: generic color support for `texinfo.tex`


From: Werner LEMBERG
Subject: Re: generic color support for `texinfo.tex`
Date: Mon, 20 Dec 2021 06:58:45 +0000 (UTC)

> With your patch, the following produces a malformed PDF file:
>
> @example
> aaa
> @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}}
> eee
> @end example
>
> due to the nesting of @setcolor inside @r.

Thanks.

> 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.

OK.

> The following works with your patch:
>
> @tex
> \gdef\colorteal{0.2 0.7 0.7}
> \gdef\colorblack{0 0 0}
> @end tex
> @example
> aaa
> @setcolor{0.7 0.7 0.2}bbb
> @setcolor{0 0 0}ccc
> ddd @r{@setcolor{@colorteal}comment@setcolor{@colorblack}}
> eee
> @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.

Yes, it would.

Note, however, that after some discussion on the LilyPond development
mailing list we will most likely not use colours for highlighting in
PDFs, following the majority of responses, which find colours too
distracting.  Instead, we will concentrate on B/W highlighting, using
slanted, bold, and bold-slanted typewriter.  To make this happen we
will replace 'CM Typewriter' with the 'LMMonoLt10' family that comes
with the 'Latin Modern' font bundle.  I have already written the
necessary code for a `@tex` block; it's not rocket science but I
really wished that texinfo would finally support LaTeX's `.fd` files
(maybe similar to Han The Thanh's `plnfss` stuff) to select different
fonts on the user level.


    Werner



reply via email to

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