lilypond-devel
[Top][All Lists]
Advanced

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

syntax highlighting in the docs (issue 1005)


From: Federico Bruni
Subject: syntax highlighting in the docs (issue 1005)
Date: Tue, 20 Dec 2011 00:23:07 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111105 Thunderbird/8.0

Hi,

I've finished the draft of the lilypond language file for source-highlight (task 1 of issue 1005):

http://code.google.com/p/lilypond/issues/detail?id=1005

I need some feedback and tips from you, please test it.


How-to
======

You must install the source-highlight package.
You don't need to recompile it: just put the attached files (lilypond.lang, lilypond.style and lang.map) in the current working directory. Then launch this command:

source-highlight -s lilypond.lang --style-file=lilypond.style -i test.ly -o test.html

HTML is the default output format.  A list of all the output format
available can be obtained with:

source-highlight --outlang-list



Feedback
========

Please let me know:

1) which colours you prefer for each element. source-highlight is very flexible: http://www.gnu.org/software/src-highlite/source-highlight.html#Colors

2) the numbers regexp may be improved, I guess. Any idea?

3) I tried to use mainly regexp instead of lists of words. Do you think it's ok? Grouping the music functions and styling them differently as Frescobaldi does would be nice but not easy to maintain. I chose the easiest way so far.

4) I tried to choose source-highlight elements (function, cbracket, code) which are as close as possible to the meaning of the lilypond element. But sometimes it was almost impossible or difficult for a non-developer like me. I don't know even if it's that important (after all I just have to tie a regexp to an element that I can style as I wish). Anyway any feedback on this regard is much appreciated. A list of all elements is available - I think - in /usr/share/source-highlight/default.style, where you can see that there are some elements specific of each language, so maybe we can even create them. I tried to ask on the source-highlight mailing list but I haven't received any reply so far.

Thanks,
Federico

Attachment: lang.map
Description: Text document

Attachment: lilypond.lang
Description: Text document

Attachment: lilypond.style
Description: Text document

Attachment: test.ly
Description: Text document


reply via email to

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