lilypond-devel
[Top][All Lists]
Advanced

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

Re: pygments: `\foo` not always rendered as bold


From: Jean Abou Samra
Subject: Re: pygments: `\foo` not always rendered as bold
Date: Tue, 20 Sep 2022 11:24:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1

Le 20/09/2022 à 07:39, Werner LEMBERG a écrit :
I've noticed in the NR that stuff like `\foo` isn't always coloured as
expected (i.e., `\foo` isn't always bold).  Attached are two examples
from the NR.

I wonder whether it makes sense to always embolden stuff starting with
`\` (except in a string).  This might even include `\1` and friends.


\open is lexed as Token.Name.Builtin.Articulation, which the
PDF style in book_highlight.py explicitly doesn't make bold:


# A custom black-and-white style designed for the PDF documentation.
pdf_styles = {
    Token: "",
    Token.Whitespace: "",
    Token.Text: "",
    Token.Keyword: "bold",
    Token.Comment: "italic",
    Token.String: "",
    Token.String.Escape: "",
    Token.String.Symbol: "",
    Token.Pitch: "",
    Token.Number: "",
    Token.ChordModifier: "",
    Token.Name.Lvalue: "bold",
    Token.Name.BackslashReference: "bold",
    Token.Name.Builtin.MusicCommand: "bold",
    Token.Name.Builtin.PaperVariable: "bold italic",
    Token.Name.Builtin.HeaderVariable: "bold italic",
    Token.Name.Builtin.MusicFunction: "bold",
    Token.Name.Builtin.Clef: "",
    Token.Name.Builtin.Scale: "bold",
    Token.Name.Builtin.RepeatType: "",
    Token.Name.Builtin.Dynamic: "",
    Token.Name.Builtin.Articulation: "",
    Token.Name.Builtin.SchemeFunction: "bold",
    Token.Name.Builtin.SchemeBuiltin: "bold",
    Token.Name.Builtin.MarkupCommand: "bold",
    Token.Name.Builtin.Context: "bold italic",
    Token.Name.Builtin.ContextProperty: "bold italic",
    Token.Name.Builtin.Grob: "italic",
    Token.Name.Builtin.GrobProperty: "italic",
    Token.Name.Builtin.Translator: "bold italic",
}


Remind me who wrote this style, already? :-)





reply via email to

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