lilypond-devel
[Top][All Lists]
Advanced

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

Re: `@lilycode` for highlighting LilyPond code snippets,Re: `@lilycode`


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

>> 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).
> 
> OK (and I'll be happy if we can have this for normal @code too,
> #6275).
>
> In this case, shouln't the MR be on Patch::needs_work for now?

Yes.  I already have a working patch for the typographic details,
however, I've discovered a `texinfo.tex` bug that needs to be fixed
first.  It's not yet clear to me how to implement the meta variable
thing, but this can always be done later.

> Alternatively, as you mentioned on #6275, we can wait for having
> switched to LuaTeX and do that in Lua instead of doing it in
> lilypond-book.

This is not an alternative but an addition – I think it would be a bad
idea to make LuaTeX handle Pygments output because it would otherwise
mix up the order in the tool stack.

> The new highlighting capability won't be useful in the immediate
> future anyway, since we don't want sweeping changes due to
> backporting.

This 'backporting' phase ends after the 2.24 release, right?


    Werner

reply via email to

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