lilypond-devel
[Top][All Lists]
Advanced

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

Re: Comments wanted on code highlighting in PDF output


From: Werner LEMBERG
Subject: Re: Comments wanted on code highlighting in PDF output
Date: Tue, 22 Feb 2022 20:07:10 +0000 (UTC)

> I haven't worked wirh TexInfo markup before, however it occurs to me
> that lisp is regular enough that with some effort one could hope to
> scrape out a majority of the function definitions and then use such
> a database to touch up the help source?

Having a script that converts `@code` to, say, `@lilycode` (which
would be defined as an alias to `@code` if highlighting is not used)
for both LilyPond and Scheme inline fragments in the documentation
would be very welcomed.

>  - scrape out what you can with a script (targeting to find 90% or so of
>    what's there)

Yes.

>  - add an exception list hand-curated (which mops up the rest)

Maybe.

>  - use this stuff to find and 'parse' the contents of the help so
>    that you can then transform it into something else this could
>    give you some 90-95% of the source revised.
>  - mop up again the result by hand

I think these two steps are not necessary.

> If this were a one-off affair, it could be a way to go,

It certainly would be a once-only action.

> I know the docs for lilypond are a huge set, and I'm not sure how
> translations are implemented.

The translators could use this script, too.

> I'm not suggesting now it's a good time to do this, however if one
> were to consider such a thing, this seems like it could be a way to
> do it, purely because Lisp-y things are easy to parse, which makes
> them relatively robust to detecting decorations such as @var{}

Ah, there is probably a misunderstanding.  We don't use `@var` within
`@code` to mark syntax but meta-ness, for example

```
@code{foo-@var{XXX}}
```

where @var{XXX} could be a three-digit number.  Such situations can
only be handled manually.


    Werner



reply via email to

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