lilypond-devel
[Top][All Lists]
Advanced

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

Re: ANN: Pygments support for LilyPond


From: James
Subject: Re: ANN: Pygments support for LilyPond
Date: Mon, 22 Nov 2021 18:52:01 +0000

Hello

On 22/11/2021 18:42, Jean Abou Samra wrote:
...

No, I'm trying to implement it in lilypond-book
as an internal option. That's much simpler because
all the infrastructure to run Python code is
already there, and we can just 'import pygments'
to access the API. It's also quite necessary to have
all snippets highlighted in a single run of the Python
interpreter because the time to fire up CPython is
something like 0.05s which would mean several minutes
spent just in Python startup time given the number
of snippets. In contrast, timeit tells me that
highlighting all snippets in one go should not take
more than 10 seconds in total.

Apart from the obvious 'how to use this option' in the documentation for the lilypond-book command itself, I fear slightly though (from personal experience) that this may encourage over zealous use in our core documentation. Although I am intrigued to see a 'large' (i.e. something substantial) example just to get an idea of what this adds to the lilypond-book command.

--
Regards

James

Attachment: OpenPGP_0x111CA298156CCB85.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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