[Top][All Lists]

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

Re: `@lilycode` for highlighting LilyPond code snippets

From: Werner LEMBERG
Subject: Re: `@lilycode` for highlighting LilyPond code snippets
Date: Tue, 06 Dec 2022 06:47:43 +0000 (UTC)

>> I suggest to apply `@lilycode` only if highlighting has some useful
>> effects, which means that in most cases it should be rather *not*
>> used because inline code is very short.
> AFAICT, the argument to inline @lilycode will always be a longer
> code sample, which in the current scheme would need to contain @/
> commands, but @lilycode will interpret those literally.  What is the
> plan for this?

Since the whole LilyPond code string is under the control of
`lilypond-book`, I thought of inserting `@/` automatically.  I would
also insert `@tie{}` after `^[^ ] ` and before ` [^ ]$` to avoid a
single character at the beginning or end of a line in the output.

I've also thought of recognizing `@var{...}` to indicate a meta
variable, for example

\score = "@var{id}" ...

(and the stuff within `@var` would be not interpreted by Pygments).


reply via email to

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