Re: Syntax highlighting

2020-01-25 Thread Craig Dabelstein
Hi all,

This is what I've been doing to test, after cloning the repo. Instructions
start halfway down this page: https://pygments.org/docs/lexerdevelopment/

You probably don;t even have to `make mapfiles` on this LilyPond branch.


   1.

   Run make mapfiles
   2.

   Run the lexer to convert the LilyPond file to html: python -m pygments
   -O full -f html -o /tmp/example.html tests/examplefiles/example.ily
   3.

   Open the html file: /tmp/example.html


On Sat, 25 Jan 2020 at 23:50, Henning Hraban Ramm 
wrote:

>
> > Am 2020-01-25 um 10:45 schrieb Urs Liska :
> >
> > Am Samstag, den 25.01.2020, 17:48 +1000 schrieb Craig Dabelstein:
> >> Hi everyone,
> >>
> >> I've written a LilyPond syntax highlighter for pygments. It's not
> perfect but it's mostly working. Is there anyone out there who could test
> it?
> >>
> >> https://github.com/craigdab/pygments/tree/LilyPond
> >
> > Thank you for working on it.
> >
> > How does one test it?
> > First clone the repository and install pygments from there (its
> `setup.py`) I suppose. The README suggests using `pip`, which surely
> wouldn't work, isn't it?
> >
> > I have installed Pygments through pip3, is there a way to avoid a
> conflict, e.g. by *not* installing your pygments clone but directly invoke
> the proper executable?
>
> It would make sense to create a virtualenv, activate it and install
> Craig’s pygments there via setup.py
>
>
> Greetlings, Hraban
> ---
> fiëé visuëlle
> Henning Hraban Ramm
> https://www.fiee.net
>
>
>
>
>
>

-- 
Craig Dabelstein
Owner
Maxime's Music
M: 0404884173
A: 19 Twelfth Ave,  Kedron QLD 4031, Australia
W: concertbandmusicstore.com E:
cr...@concertbandmusicstore.com 






Re: Syntax highlighting

2020-01-25 Thread Henning Hraban Ramm


> Am 2020-01-25 um 10:45 schrieb Urs Liska :
> 
> Am Samstag, den 25.01.2020, 17:48 +1000 schrieb Craig Dabelstein:
>> Hi everyone,
>> 
>> I've written a LilyPond syntax highlighter for pygments. It's not perfect 
>> but it's mostly working. Is there anyone out there who could test it?
>> 
>> https://github.com/craigdab/pygments/tree/LilyPond
> 
> Thank you for working on it.
> 
> How does one test it?
> First clone the repository and install pygments from there (its `setup.py`) I 
> suppose. The README suggests using `pip`, which surely wouldn't work, isn't 
> it?
> 
> I have installed Pygments through pip3, is there a way to avoid a conflict, 
> e.g. by *not* installing your pygments clone but directly invoke the proper 
> executable?

It would make sense to create a virtualenv, activate it and install Craig’s 
pygments there via setup.py


Greetlings, Hraban
---
fiëé visuëlle
Henning Hraban Ramm
https://www.fiee.net







Re: Syntax highlighting

2020-01-25 Thread Urs Liska
Am Samstag, den 25.01.2020, 17:48 +1000 schrieb Craig Dabelstein:
> Hi everyone,
> I've written a LilyPond syntax highlighter for pygments. It's not
> perfect but it's mostly working. Is there anyone out there who could
> test it?
> 
> https://github.com/craigdab/pygments/tree/LilyPond

Thank you for working on it.
How does one test it?First clone the repository and install pygments
from there (its `setup.py`) I suppose. The README suggests using `pip`,
which surely wouldn't work, isn't it?
I have installed Pygments through pip3, is there a way to avoid a
conflict, e.g. by *not* installing your pygments clone but directly
invoke the proper executable?
I suppose testing would be done through using the command line version
as described on https://pygments.org/docs/cmdline/ ?
BestUrs
> I'm sure there is lots that could be improved on it. It is running
> without errors, but it is failing the pull request tests and I don't
> know why. I'm not experienced enough to work it out.
> 
> Thanks everyone,
> 
> Craig
> 
> 
> 
> 


Re: Syntax highlighting

2020-01-16 Thread Craig Dabelstein
The pygments LilyPond lexer is actually going ok. I'm still copying over
the info from python-ly, but I've worked it out and so far it's working
without errors. I will have to learn some regex tricks in the next few
days. Perhaps another week and it will be ready for some testing.

Craig

On Wed., 15 Jan. 2020, 12:16 pm Craig Dabelstein, <
craig.dabelst...@gmail.com> wrote:

> Federico,
>
> Is it just me or is the documentation for Pygments really hard to
> understand? I can't even find anywhere they discuss the setup.py file.
>
> I've opened a repo (https://github.com/craigdab/pygments-lilypond-test)
> and cut and paste from other peoples repositories as a start, but I really
> have no idea what I'm doing.
>
> Craig
>
>
> On Wed, 15 Jan 2020 at 10:38, Craig Dabelstein 
> wrote:
>
>> Thank you gentlemen,
>>
>> I'll have a go at taking the python-ly work and seeing if I can use it
>> work to make syntax highlighting with pygments. It's highly possible that I
>> will totally fail, but I'll give it a try.
>>
>> Craig
>>
>>
>> On Tue, 14 Jan 2020 at 23:38, Federico Bruni  wrote:
>>
>>> Il giorno mar 14 gen 2020 alle 12:34, Urs Liska 
>>> ha scritto:
>>> > Pygments is also what Pandoc uses for its syntax highlighting, so that
>>> > would also make sense for that (e.g. generating PDF documentation from
>>> > Markdown).
>>>
>>> Are you sure?
>>> I think that pygments is the name of the default style in Pandoc, but
>>> the highlight library is a Haskell library called skylighting:
>>> https://pandoc.org/MANUAL.html#syntax-highlighting
>>> https://github.com/jgm/skylighting
>>>
>>> It seems Wilbert contributed the definitions for lilypond syntax:
>>>
>>> https://github.com/KDE/syntax-highlighting/blob/master/data/syntax/lilypond.xml
>>>
>>> About 10 days ago I wanted to share this in the open issue in
>>> Frescobaldi tracker but I forgot to do it.
>>> I remember I found the lilypond file definition somewhere else...
>>>
>>>
>>>
>>>
>>
>> --
>> Craig Dabelstein
>> Owner
>> Maxime's Music
>> M: 0404884173
>> A: 19 Twelfth Ave,  Kedron QLD 4031, Australia
>> W: concertbandmusicstore.com E:
>> cr...@concertbandmusicstore.com 
>> 
>> 
>>
>> 
>>
>>
>
>
> --
> Craig Dabelstein
> Owner
> Maxime's Music
> M: 0404884173
> A: 19 Twelfth Ave,  Kedron QLD 4031, Australia
> W: concertbandmusicstore.com E:
> cr...@concertbandmusicstore.com 
> 
> 
>
> 
>
>


Re: Syntax highlighting

2020-01-14 Thread Craig Dabelstein
Federico,

Is it just me or is the documentation for Pygments really hard to
understand? I can't even find anywhere they discuss the setup.py file.

I've opened a repo (https://github.com/craigdab/pygments-lilypond-test) and
cut and paste from other peoples repositories as a start, but I really have
no idea what I'm doing.

Craig


On Wed, 15 Jan 2020 at 10:38, Craig Dabelstein 
wrote:

> Thank you gentlemen,
>
> I'll have a go at taking the python-ly work and seeing if I can use it
> work to make syntax highlighting with pygments. It's highly possible that I
> will totally fail, but I'll give it a try.
>
> Craig
>
>
> On Tue, 14 Jan 2020 at 23:38, Federico Bruni  wrote:
>
>> Il giorno mar 14 gen 2020 alle 12:34, Urs Liska 
>> ha scritto:
>> > Pygments is also what Pandoc uses for its syntax highlighting, so that
>> > would also make sense for that (e.g. generating PDF documentation from
>> > Markdown).
>>
>> Are you sure?
>> I think that pygments is the name of the default style in Pandoc, but
>> the highlight library is a Haskell library called skylighting:
>> https://pandoc.org/MANUAL.html#syntax-highlighting
>> https://github.com/jgm/skylighting
>>
>> It seems Wilbert contributed the definitions for lilypond syntax:
>>
>> https://github.com/KDE/syntax-highlighting/blob/master/data/syntax/lilypond.xml
>>
>> About 10 days ago I wanted to share this in the open issue in
>> Frescobaldi tracker but I forgot to do it.
>> I remember I found the lilypond file definition somewhere else...
>>
>>
>>
>>
>
> --
> Craig Dabelstein
> Owner
> Maxime's Music
> M: 0404884173
> A: 19 Twelfth Ave,  Kedron QLD 4031, Australia
> W: concertbandmusicstore.com E:
> cr...@concertbandmusicstore.com 
> 
> 
>
> 
>
>


-- 
Craig Dabelstein
Owner
Maxime's Music
M: 0404884173
A: 19 Twelfth Ave,  Kedron QLD 4031, Australia
W: concertbandmusicstore.com E:
cr...@concertbandmusicstore.com 






Re: Syntax highlighting

2020-01-14 Thread Craig Dabelstein
Thank you gentlemen,

I'll have a go at taking the python-ly work and seeing if I can use it work
to make syntax highlighting with pygments. It's highly possible that I will
totally fail, but I'll give it a try.

Craig


On Tue, 14 Jan 2020 at 23:38, Federico Bruni  wrote:

> Il giorno mar 14 gen 2020 alle 12:34, Urs Liska 
> ha scritto:
> > Pygments is also what Pandoc uses for its syntax highlighting, so that
> > would also make sense for that (e.g. generating PDF documentation from
> > Markdown).
>
> Are you sure?
> I think that pygments is the name of the default style in Pandoc, but
> the highlight library is a Haskell library called skylighting:
> https://pandoc.org/MANUAL.html#syntax-highlighting
> https://github.com/jgm/skylighting
>
> It seems Wilbert contributed the definitions for lilypond syntax:
>
> https://github.com/KDE/syntax-highlighting/blob/master/data/syntax/lilypond.xml
>
> About 10 days ago I wanted to share this in the open issue in
> Frescobaldi tracker but I forgot to do it.
> I remember I found the lilypond file definition somewhere else...
>
>
>
>

-- 
Craig Dabelstein
Owner
Maxime's Music
M: 0404884173
A: 19 Twelfth Ave,  Kedron QLD 4031, Australia
W: concertbandmusicstore.com E:
cr...@concertbandmusicstore.com 






Re: Syntax highlighting

2020-01-14 Thread Federico Bruni
Il giorno mar 14 gen 2020 alle 12:34, Urs Liska  
ha scritto:

Pygments is also what Pandoc uses for its syntax highlighting, so that
would also make sense for that (e.g. generating PDF documentation from
Markdown).


Are you sure?
I think that pygments is the name of the default style in Pandoc, but 
the highlight library is a Haskell library called skylighting:

https://pandoc.org/MANUAL.html#syntax-highlighting
https://github.com/jgm/skylighting

It seems Wilbert contributed the definitions for lilypond syntax:
https://github.com/KDE/syntax-highlighting/blob/master/data/syntax/lilypond.xml

About 10 days ago I wanted to share this in the open issue in 
Frescobaldi tracker but I forgot to do it.

I remember I found the lilypond file definition somewhere else...






Re: Syntax highlighting

2020-01-14 Thread Urs Liska
Am Dienstag, den 14.01.2020, 12:27 +0100 schrieb Federico Bruni:
> 
> Il giorno mar 14 gen 2020 alle 09:13, Craig Dabelstein 
>  ha scritto:
> > Hi all,
> > 
> > I'd like to add LilyPond syntax highlighting to highlight.js ( 
> > https://highlightjs.readthedocs.io/en/latest/ ) so that I can 
> > experiment with documentation tools such as mkDocs/readthedocs.
> > Does 
> > anyone have any experience with this? Would it just be a matter of 
> > getting one of the current syntax packages (such as 
> > https://github.com/yrammos/SubLilyPond or 
> > https://github.com/yrammos/AtLilyPond , and trying to modify them?
> > 
> > 
> 
> I don't have any experience with highlight.js.
> Some years ago I started writing a Pygments definition for LilyPond
> but 
> then I gave up or simply forgot about it.
> 
> The Sublimetext and Atom packages might be useful as a reference, but
> I 
> guess that highlight.js will need its own syntax so you'd better
> start 
> from scratch.
> 
> The problem with syntax highlighting is maintainance. LilyPond
> syntax 
> changes and a manually compiled list must be updated manually for
> every 
> new stable release.
> 
> See also python-ly:
> https://github.com/frescobaldi/python-ly/blob/master/ly/words.py
> 

I'm not sure where and how, but there is also a substantial part of
python-ly's knowledge that is retrieved directly from LilyPond (either
from the sources or by running some LilyPond code). As far as I know
python-ly is the most comprehensive syntax highlighting solution on the
market (although still 2.18.2), and I think it would be good to find a
way use that “knowlegde” to generate syntax highlighting for arbitrary
other highlighters from that set of data.

> 
> Personally I'd be more interested in adding lilypond to Pygments.
> Pygments can be easily exported to chroma¹ (for Hugo² static site 
> generator).
> And it seems Pygments may be used also in Mkdocs, see this
> discussion:
> https://github.com/mkdocs/mkdocs/issues/1588

Pygments is also what Pandoc uses for its syntax highlighting, so that
would also make sense for that (e.g. generating PDF documentation from
Markdown).

Urs

> 
> ¹ https://github.com/alecthomas/chroma
> ² https://gohugo.io/content-management/syntax-highlighting/
> 
> 
> 
> 




Re: Syntax highlighting

2020-01-14 Thread Federico Bruni




Il giorno mar 14 gen 2020 alle 09:13, Craig Dabelstein 
 ha scritto:

Hi all,

I'd like to add LilyPond syntax highlighting to highlight.js ( 
https://highlightjs.readthedocs.io/en/latest/ ) so that I can 
experiment with documentation tools such as mkDocs/readthedocs. Does 
anyone have any experience with this? Would it just be a matter of 
getting one of the current syntax packages (such as 
https://github.com/yrammos/SubLilyPond or 
https://github.com/yrammos/AtLilyPond , and trying to modify them?





I don't have any experience with highlight.js.
Some years ago I started writing a Pygments definition for LilyPond but 
then I gave up or simply forgot about it.


The Sublimetext and Atom packages might be useful as a reference, but I 
guess that highlight.js will need its own syntax so you'd better start 
from scratch.


The problem with syntax highlighting is maintainance. LilyPond syntax 
changes and a manually compiled list must be updated manually for every 
new stable release.


See also python-ly:
https://github.com/frescobaldi/python-ly/blob/master/ly/words.py


Personally I'd be more interested in adding lilypond to Pygments.
Pygments can be easily exported to chroma¹ (for Hugo² static site 
generator).

And it seems Pygments may be used also in Mkdocs, see this discussion:
https://github.com/mkdocs/mkdocs/issues/1588

¹ https://github.com/alecthomas/chroma
² https://gohugo.io/content-management/syntax-highlighting/






Re: syntax highlighting in the doc, call for testers

2012-02-05 Thread Thomas Morley
Hi Federico,

2012/2/3 Federico Bruni fedel...@gmail.com:
 Il 02/02/2012 22:22, Thomas Morley ha scritto:

 1. Am I right you resigned of every highlighting within scheme?


 Yes, almost.
 I know nothing about Scheme. The only highlighting within Scheme that I'd
 like to preserve are the strings . I've just edited the scheme definition
 and it works.

 Is there any other highlghting within Scheme that I'm missing?
 Can you provide some example?

in your initial mail you wrote I'm trying to follow Frescobaldi
highlighting as much as possible and so you did! Congratulation! It's
nearly a perfect reproduction.

But (as remarked before) I don't like the highlighting style of
Frescobaldi. I prefer the style of jEdit, highlighting LilyPond and
scheme (well, it's not perfect but I like it). In case you don't know
the jEdit-style, I attached a screen-shot.

Some thoughts:
1. IIRC the tracker-issue is about highlighting stuff in the docs. So
maybe highlighting scheme isn't desirable.
2. Seems I'm the only user who answered, so my opinion isn't representative.

 No one else out there, interested in this stuff 

 source-highlight has already a scheme language and I might easily include
 it, but I don't think that it's desirable: you would get what you see in the
 attached file.

That looks not very nice and gives _very_ little advantage. So I think
you should not include it.

Regards,
 Harm
attachment: jEdit.png___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: syntax highlighting in the doc, call for testers

2012-02-02 Thread Federico Bruni

Il 02/01/2012 15:58, Thomas Morley ha scritto:

I tested a file with a large scheme-definition.
In the attached file you may notice some inconsequences:


Hi Thomas,

I have fixed the error in the scheme definition, so your file is 
highlighted correctly now.

I've done also some other improvements.

Anyone wishing to test it again is welcomed to do so, see files attached.

Tip for quick testing:

1) copy all the .ly files you want to test in a directory along with the 
attached files

2) create the html subdirectory
3) run ./srchilite.sh
4) open all the .html files at once and check tab by tab

I think that I'll submit the files upstream within saturday/sunday.
We'll fix next bugs when we find them :-) (I'm aware of some minor bugs 
in markup blocks)


Thanks,
Federico
java = java.lang 
moc = cpp.lang
cpp = cpp.lang
c = c.lang
C = cpp.lang
cc = cpp.lang
cs = csharp.lang
csharp = csharp.lang
h = cpp.lang
hh = cpp.lang
H = cpp.lang
hpp = cpp.lang
javascript = javascript.lang
js = javascript.lang
prolog = prolog.lang
pl = prolog.lang
perl = perl.lang
pm = perl.lang
php3 = php.lang
php4 = php.lang
php5 = php.lang
php = php.lang
ctp = php.lang
protobuf = proto.lang
proto = proto.lang
python = python.lang
py = python.lang
ruby = ruby.lang
rb = ruby.lang
flex = flex.lang
lex = flex.lang
l = flex.lang
ll = flex.lang
bison = bison.lang
yacc = bison.lang
y = bison.lang
yy = bison.lang
changelog = changelog.lang
lua = lua.lang
ml = caml.lang
caml = caml.lang
mli = caml.lang
sml = sml.lang
sig = sml.lang
syslog = log.lang
log = log.lang
pas = pascal.lang
pascal = pascal.lang
fortran = fortran.lang
free-fortran = fortran.lang
fixed-fortran = fixed-fortran.lang
html = html.lang
htm = html.lang
tex = latex.lang
latex = latex.lang
cls = latex.lang
sty = latex.lang
dtx = latex.lang
lgt = logtalk.lang
logtalk = logtalk.lang
diff = diff.lang
patch = diff.lang
lang = langdef.lang
langdef = langdef.lang
outlang = outlang.lang
style = style.lang
ps = postscript.lang
eps = postscript.lang
postscript = postscript.lang
kcfg = xml.lang
ui = xml.lang
kdevelop = xml.lang
rc = xml.lang
docbook = xml.lang
kidl = xml.lang
xml = xml.lang
xhtml = xml.lang
bash = sh.lang
sh = sh.lang
csh = sh.lang
ksh = sh.lang
tcsh = sh.lang
shell = sh.lang
tcl = tcl.lang
tk = tcl.lang
txt = nohilite.lang
sql = sql.lang
bib = bib.lang
makefile = makefile.lang
am = makefile.lang
in = makefile.lang
css = css.lang
m4 = m4.lang
ac = m4.lang
autoconf = m4.lang
sl = slang.lang
slsh = slang.lang
slang = slang.lang
properties = properties.lang
desktop = desktop.lang
ini = desktop.lang
conf = conf.lang
lsm = lsm.lang
spec = spec.lang
haxe = haxe.lang
hx = haxe.lang
ldap = ldap.lang
ldif = ldap.lang
glsl = glsl.lang
xorg = xorg.lang
scala = scala.lang
ada = ada.lang
adb = ada.lang
pc = pc.lang
pkgconfig = pc.lang
oz = oz.lang
texinfo = texinfo.lang
texi = texinfo.lang
hs = haskell.lang
hs = haskell.lang
lhs = haskell_literate.lang
haskell = haskell.lang
manifest = manifest.lang
mf = manifest.lang
asm = asm.lang
s = asm.lang
applescript = applescript.lang
scpt = applescript.lang
vbscript = vbscript.lang
vbs = vbscript.lang
awk = awk.lang
bat = bat.lang
batch = bat.lang
clipper = clipper.lang
prg = clipper.lang
cbl = cobol.lang
cobol = cobol.lang
dmd = d.lang
d = d.lang
errors = errors.lang
erl = erlang.lang
erlang = erlang.lang
vala = vala.lang
lisp = lisp.lang
el = lisp.lang
scm = scheme.lang
scheme = scheme.lang
po = po.lang
pot = po.lang
opa = opa.lang
javalog = javalog.lang
upc = upc.lang
tml = tml.lang
ly = lilypond.lang
# LilyPond v2.14.2

string delim \ \ multiline

environment scheme delim '#\'?\(' ) multiline nested begin
  environment scheme delim ( ) multiline nested begin
include url.lang
  end
end

scheme_value = '##(t|f)', '#{1,2}\'?[[:alnum:]\.:+-]+'

comment delim %{ %} multiline nested
comment start %

# Symbols
cbracket = {|}||
symbol = (|)|~|^|_
dynamic = '\\(||!|f{1,5}|p{1,5}|m(f|p)|fp|(r|s)fz|s(f|p){1,2})(?!\w)'

# Numbers
specialchar = '(?!#)-[1-5]\b', '\\[0-9]\b' # strings and fingerings
note_duration = '(?=[a-zR\',!?])(1|2|4|8|16|32|64|128)(\.+|\b)'
value = '[[:digit:]/\*]+'

# Markup commands
markup_command = '\\((left-|center-|right-|general-)?align|arrow-head',
'beam|bold|(left-|right-)brace|(filled-|rounded-)?box|(h)?bracket',
'caps|char|circle|combine|concat|(left-|center-|right-|dir-)?column',
'dynamic|dot|draw(-circle|-hline|-line)|eyeglasses|epsfile',

'fill-with-pattern|finger|(double|semi|sesqui)?flat|fontCaps|(abs-)?fontsize',
'(auto-)?footnote|fraction|fret-diagram(-terse|-verbose)?|fromproperty',
'halign|harp-pedal|hcenter-in|hspace|huge|italic|justify(-field|-string)?',
'(justified-|fill-)?line|large(r)?|lookup',
'magnify|mark(alphabet|letter)|markup(list|lines)?|medium',
'musicglyph|natural|normal-size(-super|-sub)|normalsize',
'normal-text|note(-by-number)?|null|number',
'override-lines|pad(-around|-markup|-to-box|-x)',
'page(-link|-ref)|parenthesize|path|pattern',

Re: syntax highlighting in the doc, call for testers

2012-02-02 Thread Thomas Morley
Hi Federico,

2012/2/2 Federico Bruni fedel...@gmail.com:
 Il 02/01/2012 15:58, Thomas Morley ha scritto:

 I tested a file with a large scheme-definition.

 In the attached file you may notice some inconsequences:


 Hi Thomas,

 I have fixed the error in the scheme definition, so your file is highlighted
 correctly now.
 I've done also some other improvements.

 Anyone wishing to test it again is welcomed to do so, see files attached.

 Tip for quick testing:

 1) copy all the .ly files you want to test in a directory along with the
 attached files
 2) create the html subdirectory
 3) run ./srchilite.sh
 4) open all the .html files at once and check tab by tab

 I think that I'll submit the files upstream within saturday/sunday.
 We'll fix next bugs when we find them :-) (I'm aware of some minor bugs in
 markup blocks)

 Thanks,
 Federico

1. Am I right you resigned of every highlighting within scheme?
2. I noticed that the number 1 in R1 is in a different color than in
R1*8 (see the attached small file)

I found nothing more to worry about, but I hope there will be more
testers, I'm not the best to do this sort of work.

HTH,
  Harm

\version "2.14.2"


%
% Vertical space skip!
%
% Usage: \vspace #2
%


#(define-markup-command (vspace layout props amount) (number?)
  "This produces a invisible object taking vertical space."
  (let ((amount (* amount 3.0)))
(if ( amount 0)
(ly:make-stencil "" (cons -1 1) (cons 0 amount))
(ly:make-stencil "" (cons -1 1) (cons amount amount)
  
 
%### Melody 

_One_ = {
	R1*8
}

%## 2. Stimme ##

Two = {
		R1
		R1
		R1
		R1
		R1
		R1
		R1
		R1
	\bar "|."
}

%## Akkorde 


akkorde = 
\chords { c2. g4 | c2 g2 | c4 g4 d4:m d4 | g2 r2 | 
	c2 f4 c4 | f1 | c2 d4:m g4 | c2. r4 | }



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: syntax highlighting in the doc, call for testers

2012-02-02 Thread Federico Bruni

Il 02/02/2012 22:22, Thomas Morley ha scritto:

1. Am I right you resigned of every highlighting within scheme?


Yes, almost.
I know nothing about Scheme. The only highlighting within Scheme that 
I'd like to preserve are the strings . I've just edited the scheme 
definition and it works.


Is there any other highlghting within Scheme that I'm missing?
Can you provide some example?

source-highlight has already a scheme language and I might easily 
include it, but I don't think that it's desirable: you would get what 
you see in the attached file.



2. I noticed that the number 1 in R1 is in a different color than in
R1*8 (see the attached small file)


this is fixed now, thanks

\version "2.14.2"


%
% Vertical space skip!
%
% Usage: \vspace #2
%


#(define-markup-command (vspace layout props amount) (number?)
  "This produces a invisible object taking vertical space."
  (let ((amount (* amount 3.0)))
(if ( amount 0)
(ly:make-stencil "" (cons -1 1) (cons 0 amount))
(ly:make-stencil "" (cons -1 1) (cons amount amount)
  
 
%### Melody 

_One_ = {
	R1*8
}

%## 2. Stimme ##

Two = {
		R1
		R1
		R1
		R1
		R1
		R1
		R1
		R1
	\bar "|."
}

%## Akkorde 


akkorde = 
\chords { c2. g4 | c2 g2 | c4 g4 d4:m d4 | g2 r2 | 
	c2 f4 c4 | f1 | c2 d4:m g4 | c2. r4 | }




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: syntax highlighting in the doc, call for testers

2012-01-02 Thread Federico Bruni

Hi Harm,

thanks for your feedback.
Your example let me notice that I forgot that R (upper case) is a note 
as well, so I've updated the note_duration regexp.


Il 02/01/2012 15:58, Thomas Morley ha scritto:

I tested a file with a large scheme-definition.
In the attached file you may notice some inconsequences:

1. The scheme-functions of IR 4. Scheme functions aren't
high-lighted consistent:
 ly:grob? isn't colored and ly: never.

2. In #(define (center-note-column grob) (let* ...
 Some of the defined variables are colored some not.

Sory, that I can't do more than testing.



Scheme is the hardest part.
I don't have a solution for it. The problem is the conflict between 
single and multiline blocks. I must put the multiline regexp before the 
single line regexp, because the first has precedence. But I also need to 
distinguish them: they cannot have the same start delimiter.


Single line blocks can be:

\once \override Tie #'staff-position = #3.5
tempoWholesPerMinute = #(ly:make-moment 120 4)
tagline = \markup { \override #'(box-padding . 1.0) }

Start: #' or #(
End: ) or end of line

In your example the multiline blocks start with #( so the single line 
regexp applies.
I might define #( as a multiline start delimiter, but then the single 
line instance (see tempoWholesPerMinute above) would break everything.


Also, tracking the end of that big block is not easy at all.

I think I've covered the most frequent and basic uses of scheme inside a 
lilypond file. Large scheme definitions are quite difficult for me.

If any regexp guru has a good idea, please share it here.



HTH,
   Harm

P.S. Great work so far!


Thanks!

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Syntax highlighting in LilyPad?

2008-08-04 Thread Mats Bengtsson
Please always keep the discussion on the mailing list 
lilypond-user@gnu.org,
for the benefit of yourself since you get access to the collected 
expertise on the
list and for the benefit of others who experience similar problems. I 
have never

used LilyPond on a Mac. I hope you have read section
http://lilypond.org/doc/v2.11/Documentation/user/lilypond-program/Text-editor-support#Text-editor-support
which describes several editors with good LilyPond support. You can find 
even more

examples if you search the mailing list archives.

  /Mats


Oliver Popp wrote:

Hey,

have you found a way for syntax highlighting in Lilypad?
I suppose you're using a mac and you prefer the Lilypad app instead of 
the Lilypond editor. Till now I could not find a nice way for editing 
in Lilypond as you have it in TeXShop for example.
I just tried to integrate Lilypond in TeXShop (which should be 
possible), however it didn't work out yet.


Do you have any ideas?

Many greets from Germany,

Oliver


--
=
Mats Bengtsson
Signal Processing
School of Electrical Engineering
Royal Institute of Technology (KTH)
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
   Fax:   (+46) 8 790 7260
Email: [EMAIL PROTECTED]
WWW: http://www.s3.kth.se/~mabe
=



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Syntax Highlighting / lilypond.words.vim

2004-02-11 Thread Lyle Raymond
 I apparently need to find lilypond.words.vim for the
 operation to be complete.  Where can I get it?

It should be distributed with LilyPond.  You don't say which
package you installed so we can't help more; recent Debian
packages put it into /usr/share/doc/lilypond.  Tell at least
a version number so that somebody can send one to you.
-- 
Feri.

I'm using Lilypond ver. 2.1.0.



___
Lilypond-user mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-user


Re: Syntax Highlighting / lilypond.words.vim

2004-02-10 Thread Aaron
Hi Lyle,
I also use vim (gvim) for lilypond editing.
I am looking for others to who use vim to create some sort of group to 
work on an extented vim mode for lilypond.

I made a lilypond ftplugin for vim but it is now out of date and needs 
much debugging.

If you are interested or anyone else let me know.

also
The lilypond vim files that are missing I found by searching google and 
downloading them from the cvs.

Aaron





___
Lilypond-user mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-user


Re: Syntax Highlighting / lilypond.words.vim

2004-02-10 Thread Ferenc Wagner
Lyle Raymond [EMAIL PROTECTED] writes:

 I apparently need to find lilypond.words.vim for the
 operation to be complete.  Where can I get it?

It should be distributed with LilyPond.  You don't say which
package you installed so we can't help more; recent Debian
packages put it into /usr/share/doc/lilypond.  Tell at least
a version number so that somebody can send one to you.
-- 
Feri.


___
Lilypond-user mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-user