[Top][All Lists]

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

Re: ANN: Pygments support for LilyPond

From: Werner LEMBERG
Subject: Re: ANN: Pygments support for LilyPond
Date: Wed, 24 Nov 2021 04:47:57 +0000 (UTC)

>> Thanks.  Please apply the attached patch to `texinfo.tex` to make
>> `@setcolor` work in `@example` environments; it is necessary to
>> temporarily make a space character behave normally.
>> If my solution is sufficient I will submit it to texinfo upstream.
> It looks like the patch works with pdftex (and luatex), but not with
> xetex.  Any thoughts about that?

It works with my small tests, so please send an example that fails.

>> Note that the actual command to be used by 'pygments' shouldn't be
>> `@setcolor` but rather a texinfo macro, say, `@color`:
>> ```
>>    @color{<color>}{<colored text>}
>> ```
>> This macro would be a no-op for the info format, and both the TeX
>> and HTML implementations would put the `@setcolor` command into a
>> 'group' so that a previous colour would be restored after calling
>> `@color`.
> Why not.  Note, however, that the HTML will be generated by
> Pygments' built-in formatter directly (it uses CSS classes on <span>
> elements, without outputting the colors in the HTML).

OK, then it would be a no-op for HTML, too.


reply via email to

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