lilypond-devel
[Top][All Lists]
Advanced

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

Re: strange pygments handling of LilyPond input


From: Werner LEMBERG
Subject: Re: strange pygments handling of LilyPond input
Date: Wed, 02 Nov 2022 13:53:51 +0000 (UTC)

>> Please have a look at the attached image; it's taken from the LM,
>> chapter 3.1.4.  As can be seen, `_` and `-` are bold, and `^`
>> isn't.  Is it possible to make `_` and `-` bold only if used as
>> articulation (i.e., *after* `[_^-]`)?
>
> The relevant part of the output generated by lilypond-book for this
> snippet is
>
> @ifnothtml
> @pygments
> @tb{\relative}@t{ }@t{@{}@t{ }@t{c''}@t{4}@tb{_-}@tb{^1}@t{
> }@t{d}@tb{^.}@t{ }@t{f}@tb{^4}@tb{_2}@tb{->}@t{
> }@t{e}@tb{^-}@tb{_+}@t{ }@t{@}}
> @endPygments
> @end ifnothtml
>
>
> That looks correct, [...]

The above example was the wrong one, sorry.  What I actually wanted to
show are inconsistencies.  In the same section you can find

```
c''4-3 e-5 b-2 a-1
```

which Pygments translates to

```
@t{c''} @t{4} @t{-3} @t{e} @t{-5} @t{b} @t{-2} @t{a} @t{-1}
```

that is, the `-` is not typeset in bold.  The next one

```
c''4-ˆ c-+ c-- c-!
```

gets translated to

```
@t{c''} @t{4} @tb{-^} @t{c} @tb{-+} @t{c} @t{--} @t{c} @tb{-!}
                                          ^^^^^^
```

showing bold and non-bold for `-` in the same function.


    Werner

PNG image

PNG image


reply via email to

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