Re: `@lilycode` for highlighting LilyPond code snippets

2022-12-07 Thread Jean Abou Samra
> Another issue has come up in the discussion of MR 1753, namely whether > `@lilycode` should actually be named `@lilypond[code]`. There are > four proposals, and I would like to hear opinions. > > https://gitlab.com/lilypond/lilypond/-/merge_requests/1753 > > (0) Two preliminaries. > > * The

Re: `@lilycode` for highlighting LilyPond code snippets

2022-12-07 Thread Werner LEMBERG
> ``` > blabla @lilycode{\relative { c'2 e }} blabla > ``` > > Example 2: > > ``` > blabla > > @lilycode > \relative { c'2 e { > @end lilycode > ``` > > While the use for the block command version (`@lilycode ... @end > lilycode`) should be clear, the main question is what policy we are >

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

2022-12-06 Thread Werner LEMBERG
>> 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

Re: `@lilycode` for highlighting LilyPond code snippets

2022-12-06 Thread Jean Abou Samra
Le 06/12/2022 à 12:11, Jean Abou Samra a écrit : 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? Alternatively, as you mentioned on #6275, we can wait for having switched to LuaTeX and do that in Lua

Re: `@lilycode` for highlighting LilyPond code snippets

2022-12-06 Thread Jean Abou Samra
Le 06/12/2022 à 07:47, Werner LEMBERG a écrit : 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

Re: `@lilycode` for highlighting LilyPond code snippets

2022-12-05 Thread Werner LEMBERG
>> 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

Re: `@lilycode` for highlighting LilyPond code snippets

2022-12-05 Thread Jean Abou Samra
> Le 5 déc. 2022 à 21:06, Werner LEMBERG a écrit : > > 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

`@lilycode` for highlighting LilyPond code snippets

2022-12-05 Thread Werner LEMBERG
Folks, in MR !1753 https://gitlab.com/lilypond/lilypond/-/merge_requests/1753 I've extended `lilypond-book` to highlight LilyPond code snippets, without producing actual LilyPond output. Because it uses Pygments, code snippets are also highlighted (more or less) correctly if the code is