Re: Lilypond preview

2016-09-21 Thread Stephen Luttrell
> On 14 Sep 2016, at 02:23, Scott Kostyshak  wrote:
> 
> On Tue, Sep 13, 2016 at 07:14:00PM +0100, Stephen Luttrell wrote:
>> I have OS X 10.11.6 and LyX 2.2.1 with (1) Look & Feel / Display / Display 
>> graphics checked, and (2) Look & Feel / Display / Instant preview set to 
>> “On”.
>> 
>> If I open Help / Specific Manuals / LilyPond, then after a short delay the 
>> various LilyPond insets — these are inside Preview insets, such as in 
>> section 2.3 on Previews — display themselves in the LyX window as blank 
>> regions, whereas I would have expected fragments of musical score to appear. 
>> However, when I view the corresponding PDF the music is displayed correctly, 
>> but it would be really nice for the Preview insets to work as expected in 
>> the LyX window.
>> 
>> In case it is relevant, preview of mathematical formulae in my LyX window 
>> works correctly.
> 
> Hi Stephen, I'm not sure what's wrong. I just checked and the previews
> show up fine on Ubuntu so there might be something platform-specific
> going on. Hopefully there's someone around here who uses Mac that can
> check.


With a lot of outside help from Helge Hafting, we managed to narrow down what 
the LilyPond Preview problem might be due to.

LilyPond previewing depends on LyX successfully converting EPS graphics (of 
each musical score fragment) into PNG graphics. To make this conversion process 
as similar as possible to the way it is done in Linux, where LilyPond 
previewing is known to work, I installed MacPorts on my Mac, which installs 
ImageMagick as part of the MacPorts installation process. I then reconfigured 
LyX, which then set up a new converter EPS -> PNG using the command “convert 
$$i $$o”, where “convert” is part of the ImageMagick installation. I verified 
that “convert filename.eps filename.png” creates the expected PNG file from one 
of the temporary EPS files that LyX creates when trying to preview a LilyPond 
inset. However, LyX itself still displays blank regions rather than the 
expected fragments of musical score in its window, and when I check the 
temporary PNG files that LyX has generated from the temporary EPS files they 
all contain the same blank pieces of graphics. I have closed then opened LyX, 
and I have even rebooted, but this problem persists.

So, I have a working “convert”, but LyX fails to use it for the EPS previews 
generated by LilyPond insets. BTW, I checked that if I insert EPS graphics into 
a LyX document, then this does display correctly in the LyX window, so there is 
something not working with LilyPond insets, rather than with EPS graphics 
generally.

In case it is relevant, there is only one “convert” on my Mac, which is the one 
that appeared after I installed ImageMagick, and there are 3 EPS converters set 
up in my LyX installation, which are (1) EPS -> PDF (graphics) using “epstopdf 
--outfile=$$o $$i”, (2) EPS -> PNG using “convert $$i $$o”, and (3) EPS 
(uncropped) -> EPS using “ps2eps -- < $$i > $$o”.

Stephen Luttrell



Re: Lilypond preview

2016-09-13 Thread Scott Kostyshak
On Tue, Sep 13, 2016 at 07:14:00PM +0100, Stephen Luttrell wrote:
> I have OS X 10.11.6 and LyX 2.2.1 with (1) Look & Feel / Display / Display 
> graphics checked, and (2) Look & Feel / Display / Instant preview set to “On”.
> 
> If I open Help / Specific Manuals / LilyPond, then after a short delay the 
> various LilyPond insets — these are inside Preview insets, such as in section 
> 2.3 on Previews — display themselves in the LyX window as blank regions, 
> whereas I would have expected fragments of musical score to appear. However, 
> when I view the corresponding PDF the music is displayed correctly, but it 
> would be really nice for the Preview insets to work as expected in the LyX 
> window.
> 
> In case it is relevant, preview of mathematical formulae in my LyX window 
> works correctly.

Hi Stephen, I'm not sure what's wrong. I just checked and the previews
show up fine on Ubuntu so there might be something platform-specific
going on. Hopefully there's someone around here who uses Mac that can
check.

Scott


signature.asc
Description: PGP signature


Re: LilyPond with

2015-06-18 Thread Juan Carlos Gómez Fernández
Hello.
Thanks for your answer, Helge.
I know this possibility, but then the  problem is the use of PostScript
code inside LilyPond code... this generates a GUILE error, I could use,
instead this codes, .svg graphics  but lilypond-book doesn't process any
external material...
I've solved using the .pdf LilyPond exit files directly into the .lyx file
and it is not a bad solution... At the moment.

Thanks.

J.C.

2015-06-18 10:57 GMT+02:00 Helge Hafting :

>
>
> Den 03. juni 2015 10:56, skrev Juan Carlos Gómez Fernández:
>
>   Hello all
>
>  This is my first post to the list so I'll introduce myself: my name is
> Juan, I'm spanish, and I'm a beginner in LYX..
>  I'm transcribing a violin manual to use it with viola and I'm usig
> Lilypond files as external material, and it works fine with small scores.
> The problem I have is with larger scores (more than one page), when lyx
> compile the file it works well, but only one page appears in the .pdf
> file... I tried several changes in preferences menu with no success (most
> of the times I don't understand options because  I'm a complete beginner
> with LaTex...)
>
>  Any suggestions?
>
>
> Yes.  When you include "external material", it is included as a pdf image.
> Usually, that only works for a single page.
>
> But LyX has lilypond support. If you put lilypond stuff directly into LyX,
> then lyx and lilypond will cooperate on the page breaking and you can have
> several pages of music in the lyx document.
>
> I have attached a file that demonstrate this. It has some lines of plain
> text, and two pages of (random) music. If you add more text lines, some
> music lines moves to the next page. If you want the music to start on top
> of the page, insert a page break in front.
>
> Helge Hafting
>



-- 
Juan C. Gómez


Re: LilyPond with

2015-06-18 Thread Helge Hafting



Den 03. juni 2015 10:56, skrev Juan Carlos Gómez Fernández:

Hello all

This is my first post to the list so I'll introduce myself: my name is 
Juan, I'm spanish, and I'm a beginner in LYX..
I'm transcribing a violin manual to use it with viola and I'm usig 
Lilypond files as external material, and it works fine with small 
scores. The problem I have is with larger scores (more than one page), 
when lyx compile the file it works well, but only one page appears in 
the .pdf file... I tried several changes in preferences menu with no 
success (most of the times I don't understand options because  I'm a 
complete beginner with LaTex...)


Any suggestions?


Yes.  When you include "external material", it is included as a pdf 
image. Usually, that only works for a single page.


But LyX has lilypond support. If you put lilypond stuff directly into 
LyX, then lyx and lilypond will cooperate on the page breaking and you 
can have several pages of music in the lyx document.


I have attached a file that demonstrate this. It has some lines of plain 
text, and two pages of (random) music. If you add more text lines, some 
music lines moves to the next page. If you want the music to start on 
top of the page, insert a page break in front.


Helge Hafting


lilypond2pages.lyx
Description: lilypond2pages.lyx


Re: LilyPond with

2015-06-03 Thread John Kane
Hi Juan,
Your English is very good.

Perhaps you could upload an example of the problem? A 'minimal' example
with just the problem material included in the file would be best.

Wellcome to LyX.

On 3 June 2015 at 04:56, Juan Carlos Gómez Fernández 
wrote:

> Hello all
>
> This is my first post to the list so I'll introduce myself: my name is
> Juan, I'm spanish, and I'm a beginner in LYX..
> I'm transcribing a violin manual to use it with viola and I'm usig
> Lilypond files as external material, and it works fine with small scores.
> The problem I have is with larger scores (more than one page), when lyx
> compile the file it works well, but only one page appears in the .pdf
> file... I tried several changes in preferences menu with no success (most
> of the times I don't understand options because  I'm a complete beginner
> with LaTex...)
>
> Any suggestions?
>  TIA
>
> --
> Juan C. Gómez
> P.S. Sorry about my English. I know it is really worse I suspect..
>



-- 
John Kane
Kingston ON Canada


Re: LilyPond preview inset with included files

2014-08-12 Thread Scott Kostyshak
On Sat, Aug 9, 2014 at 4:50 PM, Tao Cumplido  wrote:
> Also the preview doesn't seem to work at all when xelatex is used. Is there
> a workaround maybe?
> I'm using LyX 2.1.1, LilyPond 2.18, Tex Live 2014 under Linux Mint 17.
>
>
> 2014-08-09 20:48 GMT+02:00 Tao Cumplido :
>
>> Hi all,
>>
>> is there a way to make lilypond-snippets inside a preview-inset display
>> when the snippet includes another lilypond-file with \include?
>> I already removed all the --safe and -dsafe options from the
>> lilypond-converters, this at least makes it possible to use \include in
>> snippets generally, i.e. the compiled pdf looks fine.
>> Just the preview processing fails.

Hi Tao,

For your first question, consider external templates. See Help > Customization.
For your second question, please post a minimal working example and a
screenshot of what is displayed ("doesn't seem to work at all" does
not say what happens. Is a red dot shown? Is nothing shown? Is the
LaTeX shown?).

Best,

Scott


Re: LilyPond preview inset with included files

2014-08-09 Thread Tao Cumplido
Also the preview doesn't seem to work at all when xelatex is used. Is there
a workaround maybe?
I'm using LyX 2.1.1, LilyPond 2.18, Tex Live 2014 under Linux Mint 17.


2014-08-09 20:48 GMT+02:00 Tao Cumplido :

> Hi all,
>
> is there a way to make lilypond-snippets inside a preview-inset display
> when the snippet includes another lilypond-file with \include?
> I already removed all the --safe and -dsafe options from the
> lilypond-converters, this at least makes it possible to use \include in
> snippets generally, i.e. the compiled pdf looks fine.
> Just the preview processing fails.
>
> Regards,
> Tao
>


Re: Lilypond-Book and Xetex error

2013-02-09 Thread Kale Good
Hi Julian,
Changing the converter worked. I took out the call for xetex:

 lilypond-book --verbose --pdf --lily-output-dir=ly-pdf -I


Thanks,
Kale



On Sat, Feb 9, 2013 at 8:34 AM, Julien Rioux  wrote:

> On 09/02/2013 8:22 AM, Kale Good wrote:
>
>> Hi Julian,
>> Your file fails here. Saving and reopening also fails. Here is my output,
>> my output in messages, and my minimum example.
>>
>> Thanks,
>> Kale
>>
>
> Looks like you're hit by this lilypond bug: http://code.google.com/p/**
> lilypond/issues/detail?id=2471
>
> --
> Julien
>



-- 
*Kale Good: Guitar Instructor*
website: phillyguitarlessons.com
email: k...@kalegood.com
phone: (215)260-5383
address: 1867 Frankford Ave.
  Philadelphia, PA 19125
Read my article "*The Seven Secrets to Six String Success*" at
GuitarNoise.com:
http://www.guitarnoise.com/lesson/seven-secrets-to-six-string-success/
*Leading the Journey from No-Skills-Guitarist to Talented Musician*!


Re: Lilypond-Book and Xetex error

2013-02-09 Thread Julien Rioux

On 09/02/2013 8:22 AM, Kale Good wrote:

Hi Julian,
Your file fails here. Saving and reopening also fails. Here is my output,
my output in messages, and my minimum example.

Thanks,
Kale


Looks like you're hit by this lilypond bug: 
http://code.google.com/p/lilypond/issues/detail?id=2471


--
Julien


Re: Lilypond-Book and Xetex error

2013-02-09 Thread Kale Good
Hi Julian,
Your file fails here. Saving and reopening also fails. Here is my output,
my output in messages, and my minimum example.

Thanks,
Kale




On Sat, Feb 9, 2013 at 2:00 AM, Julien Rioux  wrote:

> On 08/02/2013 8:36 PM, Kale Good wrote:
>
>> I spoke a moment too soon, and possibly misdiagnosed from the get-go. With
>> default fonts, it works. As soon as I try non-default fonts, it reverts to
>> the incorrect output. Here's my converter command:
>>
>> lilypond-book --verbose --pdf --latex-program=xelatex
>> --lily-output-dir=ly-pdf -I $$r $$i
>>
>> Oddly, it also takes much longer to compile the document.
>>
>>
>>
>
> Hi,
> Again, works here. Can you please attach the file that fails for you? Does
> the issue resolve itself if you save the file, close it and reopen it? I am
> thinking that maybe something, that prevents compilation, is left out in
> the temporary build directory when you switch font.
>
> Thanks,
> Cheers,
> Julien
>



-- 
*Kale Good: Guitar Instructor*
website: phillyguitarlessons.com
email: k...@kalegood.com
phone: (215)260-5383
address: 1867 Frankford Ave.
  Philadelphia, PA 19125
Read my article "*The Seven Secrets to Six String Success*" at
GuitarNoise.com:
http://www.guitarnoise.com/lesson/seven-secrets-to-six-string-success/
*Leading the Journey from No-Skills-Guitarist to Talented Musician*!
07:56:17.499: Previewing ...
07:56:17.534: (buffer-view pdf4)
07:56:17.555: lilypond-book --verbose --pdf --latex-program=xelatex 
--lily-output-dir=ly-pdf -I "/home/kale/Downloads/" "xetex.lytex"
07:56:17.673: lilypond-book: Setting LilyPond's output to --verbose, implied by 
lilypond-book's setting
07:56:17.677: lilypond-book (GNU LilyPond) 2.16.2
07:56:17.689: Reading xetex.lytex...
07:56:17.697: Running `xelatex' on file `/tmp/tmponwgWP.tex' to detect default 
page settings.
07:56:17.709: 
07:56:17.717: Executing: xelatex /tmp/tmponwgWP.tex
07:56:17.725: 

Running: lilypond-book --verbose --pdf --latex-program=xelatex 
--lily-output-dir=ly-pdf -I "/home/kale/Downloads/" "xetex.lytex"
07:56:46.427: lilypond-book: warning: Unable to auto-detect default settings:
07:56:46.429: xelatex: /home/kale/lilypond/usr/lib/libpng12.so.0: no version 
information available (required by xelatex)
07:56:46.434: xelatex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version 
information available (required by xelatex)
07:56:46.434: xelatex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version 
information available (required by xelatex)
07:56:46.434: xelatex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version 
information available (required by xelatex)
07:56:46.434: xelatex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version 
information available (required by xelatex)
07:56:46.441: xelatex: /home/kale/lilypond/usr/lib/libpng12.so.0: no version 
information available (required by /usr/lib/x86_64-linux-gnu/libpoppler.so.19)
07:56:46.445: xelatex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version 
information available (required by /usr/lib/x86_64-linux-gnu/libpoppler.so.19)
07:56:46.445: xelatex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version 
information available (required by /usr/lib/x86_64-linux-gnu/libpoppler.so.19)
07:56:46.450: Fontconfig error: Cannot load default config file
07:56:46.457: xelatex: relocation error: xelatex: symbol 
_ZNSt8__detail15_List_node_base7_M_hookEPS0_, version GLIBCXX_3.4.15 not 
defined in file libstdc++.so.6 with link time reference
07:56:46.461: 
07:56:46.465: Dissecting...
07:56:46.471: Writing snippets...
07:56:46.477: All snippets are up to date...
07:56:46.480: Linking files...
07:56:46.482: Compiling /tmp/lyx_tmpdir.MT2637/lyx_tmpbuf2/xetex.tex...
07:56:46.509: /tmp/lyx_tmpdir.MT2637/lyx_tmpbuf2/xetex.tex is up to date.
07:56:46.551: xelatex  "xetex.tex"
07:56:46.553: This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 
2009/Debian)

Running: xelatex  "xetex.tex" > /dev/null
07:56:46.802: entering extended mode
07:56:46.820: (./xetex.tex
07:56:46.842: LaTeX2e <2009/09/24>
07:56:46.867: Babel  and hyphenation patterns for english, usenglishmax, 
dumylang, noh
07:56:46.893: yphenation, loaded.
07:56:46.923: 
07:56:47.190: evince "xetex.pdf"
07:56:47.196: Successful preview of format: pdf4
Running: evince "xetex.pdf"


xetex-fail.pdf
Description: Adobe PDF document


minimum.lyx
Description: Binary data


Re: Lilypond-Book and Xetex error

2013-02-08 Thread Julien Rioux

On 08/02/2013 8:36 PM, Kale Good wrote:

I spoke a moment too soon, and possibly misdiagnosed from the get-go. With
default fonts, it works. As soon as I try non-default fonts, it reverts to
the incorrect output. Here's my converter command:

lilypond-book --verbose --pdf --latex-program=xelatex
--lily-output-dir=ly-pdf -I $$r $$i

Oddly, it also takes much longer to compile the document.





Hi,
Again, works here. Can you please attach the file that fails for you? 
Does the issue resolve itself if you save the file, close it and reopen 
it? I am thinking that maybe something, that prevents compilation, is 
left out in the temporary build directory when you switch font.


Thanks,
Cheers,
Julien


xetex.lyx
Description: application/lyx


xetex.pdf
Description: Adobe PDF document


Re: Lilypond-Book and Xetex error

2013-02-08 Thread Kale Good
I spoke a moment too soon, and possibly misdiagnosed from the get-go. With
default fonts, it works. As soon as I try non-default fonts, it reverts to
the incorrect output. Here's my converter command:

lilypond-book --verbose --pdf --latex-program=xelatex
--lily-output-dir=ly-pdf -I $$r $$i

Oddly, it also takes much longer to compile the document.


On Fri, Feb 8, 2013 at 8:14 PM, Kale Good  wrote:

> That was it, thanks. I had edited it (in a completely uninformed way)
> trying to solve the fretboard diagram issue, but failed. I updated from
> 2.14 to 2.16, and no longer have the fretboard diagram issue.
>
>
> On Fri, Feb 8, 2013 at 6:57 PM, Julien Rioux  wrote:
>
>> On 08/02/2013 12:17 PM, Kale Good wrote:
>>
>>> Hello,
>>> To work around known issues with Lilypond-book, I tried installing the
>>> most
>>> recent Lilypond (2.16.2). It solved one problem but created another. When
>>> processing in Xetex, there is a line-break following each measure. There
>>> is
>>> no problem when the file is processed with pdflatex.
>>>
>>> I'm getting these errors in the messages when processing:
>>>
>>> 11:43:38.493: lilypond-book: warning: Unable to auto-detect default
>>> settings:
>>> 11:43:38.495: xetex: /home/kale/lilypond/usr/lib/**libpng12.so.0: no
>>> version
>>> information available (required by xetex)
>>> 11:43:38.496: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>>> version
>>> information available (required by xetex)
>>> 11:43:38.496: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>>> version
>>> information available (required by xetex)
>>> 11:43:38.496: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>>> version
>>> information available (required by xetex)
>>> 11:43:38.496: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>>> version
>>> information available (required by xetex)
>>> 11:43:38.498: xetex: /home/kale/lilypond/usr/lib/**libpng12.so.0: no
>>> version
>>> information available (required by
>>> /usr/lib/x86_64-linux-gnu/**libpoppler.so.19)
>>> 11:43:38.502: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>>> version
>>> information available (required by
>>> /usr/lib/x86_64-linux-gnu/**libpoppler.so.19)
>>> 11:43:38.502: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>>> version
>>> information available (required by
>>> /usr/lib/x86_64-linux-gnu/**libpoppler.so.19)
>>> 11:43:38.503: xdvipdfmx: /home/kale/lilypond/usr/lib/**libpng12.so.0: no
>>> version information available (required by xdvipdfmx)
>>>
>>> It seemed that lyx wouldn't pick up the install if lilypond wasn't in
>>> /usr/bin, and I couldn't figure out how to get lilypond to install into
>>> /usr/bin/ (that is, without creating a subdirectory /lilypond), so I
>>> copied
>>> the lilypond-book into /usr/bin.
>>>
>>>   Here is a minimum (I think) .lyx file:
>>>
>>> [...]
>>>
>>> Thanks,
>>> Kale
>>>
>>>
>>>
>> Your file compiles fine here using xelatex and the pdf has only one staff
>> line, i.e. no line break. Did you modify or perhaps define the converter
>> yourself? I have this for converter from "LilyPond book (LaTeX)" to "PDF
>> (XeTeX)":
>>
>> python "C:\Program Files (x86)\LilyPond\usr\bin\**lilypond-book.py"
>> --verbose --pdf --latex-program=xelatex --lily-output-dir=ly-pdf -I $$r $$i
>>
>> I'm using a slightly older version of lilypond, 2.15.40, on Win7, so it's
>> possible that something has changed between versions or that the behavior
>> is different between OSes.
>>
>> Cheers,
>> Julien
>>
>
>
>
> --
> *Kale Good: Guitar Instructor*
> website: phillyguitarlessons.com
> email: k...@kalegood.com
> phone: (215)260-5383
> address: 1867 Frankford Ave.
>   Philadelphia, PA 19125
> Read my article "*The Seven Secrets to Six String Success*" at
> GuitarNoise.com:
> http://www.guitarnoise.com/lesson/seven-secrets-to-six-string-success/
> *Leading the Journey from No-Skills-Guitarist to Talented Musician*!
>



-- 
*Kale Good: Guitar Instructor*
website: phillyguitarlessons.com
email: k...@kalegood.com
phone: (215)260-5383
address: 1867 Frankford Ave.
  Philadelphia, PA 19125
Read my article "*The Seven Secrets to Six String Success*" at
GuitarNoise.com:
http://www.guitarnoise.com/lesson/seven-secrets-to-six-string-success/
*Leading the Journey from No-Skills-Guitarist to Talented Musician*!


Re: Lilypond-Book and Xetex error

2013-02-08 Thread Kale Good
That was it, thanks. I had edited it (in a completely uninformed way)
trying to solve the fretboard diagram issue, but failed. I updated from
2.14 to 2.16, and no longer have the fretboard diagram issue.


On Fri, Feb 8, 2013 at 6:57 PM, Julien Rioux  wrote:

> On 08/02/2013 12:17 PM, Kale Good wrote:
>
>> Hello,
>> To work around known issues with Lilypond-book, I tried installing the
>> most
>> recent Lilypond (2.16.2). It solved one problem but created another. When
>> processing in Xetex, there is a line-break following each measure. There
>> is
>> no problem when the file is processed with pdflatex.
>>
>> I'm getting these errors in the messages when processing:
>>
>> 11:43:38.493: lilypond-book: warning: Unable to auto-detect default
>> settings:
>> 11:43:38.495: xetex: /home/kale/lilypond/usr/lib/**libpng12.so.0: no
>> version
>> information available (required by xetex)
>> 11:43:38.496: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>> version
>> information available (required by xetex)
>> 11:43:38.496: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>> version
>> information available (required by xetex)
>> 11:43:38.496: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>> version
>> information available (required by xetex)
>> 11:43:38.496: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>> version
>> information available (required by xetex)
>> 11:43:38.498: xetex: /home/kale/lilypond/usr/lib/**libpng12.so.0: no
>> version
>> information available (required by
>> /usr/lib/x86_64-linux-gnu/**libpoppler.so.19)
>> 11:43:38.502: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>> version
>> information available (required by
>> /usr/lib/x86_64-linux-gnu/**libpoppler.so.19)
>> 11:43:38.502: xetex: /home/kale/lilypond/usr/lib/**libstdc++.so.6: no
>> version
>> information available (required by
>> /usr/lib/x86_64-linux-gnu/**libpoppler.so.19)
>> 11:43:38.503: xdvipdfmx: /home/kale/lilypond/usr/lib/**libpng12.so.0: no
>> version information available (required by xdvipdfmx)
>>
>> It seemed that lyx wouldn't pick up the install if lilypond wasn't in
>> /usr/bin, and I couldn't figure out how to get lilypond to install into
>> /usr/bin/ (that is, without creating a subdirectory /lilypond), so I
>> copied
>> the lilypond-book into /usr/bin.
>>
>>   Here is a minimum (I think) .lyx file:
>>
>> [...]
>>
>> Thanks,
>> Kale
>>
>>
>>
> Your file compiles fine here using xelatex and the pdf has only one staff
> line, i.e. no line break. Did you modify or perhaps define the converter
> yourself? I have this for converter from "LilyPond book (LaTeX)" to "PDF
> (XeTeX)":
>
> python "C:\Program Files (x86)\LilyPond\usr\bin\**lilypond-book.py"
> --verbose --pdf --latex-program=xelatex --lily-output-dir=ly-pdf -I $$r $$i
>
> I'm using a slightly older version of lilypond, 2.15.40, on Win7, so it's
> possible that something has changed between versions or that the behavior
> is different between OSes.
>
> Cheers,
> Julien
>



-- 
*Kale Good: Guitar Instructor*
website: phillyguitarlessons.com
email: k...@kalegood.com
phone: (215)260-5383
address: 1867 Frankford Ave.
  Philadelphia, PA 19125
Read my article "*The Seven Secrets to Six String Success*" at
GuitarNoise.com:
http://www.guitarnoise.com/lesson/seven-secrets-to-six-string-success/
*Leading the Journey from No-Skills-Guitarist to Talented Musician*!


Re: Lilypond-Book and Xetex error

2013-02-08 Thread Julien Rioux

On 08/02/2013 12:17 PM, Kale Good wrote:

Hello,
To work around known issues with Lilypond-book, I tried installing the most
recent Lilypond (2.16.2). It solved one problem but created another. When
processing in Xetex, there is a line-break following each measure. There is
no problem when the file is processed with pdflatex.

I'm getting these errors in the messages when processing:

11:43:38.493: lilypond-book: warning: Unable to auto-detect default
settings:
11:43:38.495: xetex: /home/kale/lilypond/usr/lib/libpng12.so.0: no version
information available (required by xetex)
11:43:38.496: xetex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version
information available (required by xetex)
11:43:38.496: xetex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version
information available (required by xetex)
11:43:38.496: xetex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version
information available (required by xetex)
11:43:38.496: xetex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version
information available (required by xetex)
11:43:38.498: xetex: /home/kale/lilypond/usr/lib/libpng12.so.0: no version
information available (required by
/usr/lib/x86_64-linux-gnu/libpoppler.so.19)
11:43:38.502: xetex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version
information available (required by
/usr/lib/x86_64-linux-gnu/libpoppler.so.19)
11:43:38.502: xetex: /home/kale/lilypond/usr/lib/libstdc++.so.6: no version
information available (required by
/usr/lib/x86_64-linux-gnu/libpoppler.so.19)
11:43:38.503: xdvipdfmx: /home/kale/lilypond/usr/lib/libpng12.so.0: no
version information available (required by xdvipdfmx)

It seemed that lyx wouldn't pick up the install if lilypond wasn't in
/usr/bin, and I couldn't figure out how to get lilypond to install into
/usr/bin/ (that is, without creating a subdirectory /lilypond), so I copied
the lilypond-book into /usr/bin.

  Here is a minimum (I think) .lyx file:

[...]

Thanks,
Kale




Your file compiles fine here using xelatex and the pdf has only one 
staff line, i.e. no line break. Did you modify or perhaps define the 
converter yourself? I have this for converter from "LilyPond book 
(LaTeX)" to "PDF (XeTeX)":


python "C:\Program Files (x86)\LilyPond\usr\bin\lilypond-book.py" 
--verbose --pdf --latex-program=xelatex --lily-output-dir=ly-pdf -I $$r $$i


I'm using a slightly older version of lilypond, 2.15.40, on Win7, so 
it's possible that something has changed between versions or that the 
behavior is different between OSes.


Cheers,
Julien


Re: lilypond

2013-01-17 Thread Julien Rioux

On 16/01/2013 7:50 AM, bb wrote:

I imported a lilypond file with include-external file-filename.ly. I
checked that file in advance to make sure it will be compiled correctly
with lilypond. If I try a pdf preview in Lyx, I get an error and the
head of the protocol is:


This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
(format=pdflatex 2012.7.20) 16 JAN 2013 13:41

entering extended mode

%&-line parsing enabled.

**lilypondTest.tex

(./lilypondTest.tex

LaTeX2e <2009/09/24>

Babel  and hyphenation patterns for english, usenglishmax,
dumylang, noh

yphenation, loaded.


What is wrong? Any help please?


Regards bllochl




Hi,

Can you post an example file demonstrating your problem? Maybe also 
provide the full log from Document > LaTeX Log, and specify which error 
you get?


Cheers,
Julien


Re: Lilypond and Lyx howto's

2011-11-30 Thread Wolfgang Engelmann
Am Mittwoch, 30. November 2011, 15:41:59 schrieb Guenter Milde:

Thanks Julien and Guenter for your advices. Will give them a good nights 
sleep and then decide how to proceed.

Wolfgang


Re: Lilypond and Lyx howto's

2011-11-30 Thread Guenter Milde
On 2011-11-29, Wolfgang Engelmann wrote:
> Hello,

> 1- how to install the newer fontforge and python-fontforge (both 20110222; 
> my is 20100501, the newer one is not in the synaptic/All-list).

You might try with the versions from Debian/testing instead of
Debian/stable.

You can download them from the "Debian package search" and install "by hand"
(with dpkg).

Another way to do this is to change /etc/apt/sources.list to use the "testing"
sources, e.g.

# stable (commented out)
# deb http://ftp.tu-chemnitz.de/pub/linux/debian/debian/ stable main contrib 
non-free
# deb-src http://ftp.tu-chemnitz.de/pub/linux/debian/debian/ stable main

# Testing
deb http://ftp.tu-chemnitz.de/pub/linux/debian/debian/ testing main contrib 
non-free
deb-src http://ftp.tu-chemnitz.de/pub/linux/debian/debian/ testing main

This might also give you a new version of lilypond. Maybe even solve 4-.

Beware: testing is not stable - Mixing packages works in many cases but
might also fail. 

Also, if you have some "auto-update" feature activated, this will try to
bring everything up to the newest version -- leading to many packages update
to "testing" versions. OTOH, with "auto-update" disabled, this will
conveniently ensure the required packages are installed in the required
versions (if the version info on the requiring package is complete and
correct).


Günter



Re: Lilypond and Lyx howto's

2011-11-29 Thread Julien Rioux

On 29/11/2011 12:57 PM, Wolfgang Engelmann wrote:

Hello,

I have installed Lilypond and Lyx using Julien Rioux's advise from 18 Jan
2011 on this list on my Linux Debian (thanks, again, Julien), which worked
well; but a few questions remain:
Could somebody advise me with
1- how to install the newer fontforge and python-fontforge (both 20110222;
my is 20100501, the newer one is not in the synaptic/All-list).
2- Gui toolbar: session settings could not be found! Defaults used ???


2- I have seen these warnings but it looks safe to just ignore them.


3- Create scripts lilypond lilypond-books convert-ly, put them into ~/bin,
with a pointer to lilypond.org/macos-x.html; seems to be Mac-OS specific?
4- and main question: I have chosen module lilypond-book, which needs
apparently lilypond-book>latex. I tried to find a solution in the User help
file (3.1.2.3) but am lost. There should be an example document for
lilypond, which I can't find, however.


4- This "lilypond-book->latex" means that you need a program installed 
and configured in LyX that will convert from the lilypond-book format to 
the latex format.


This program is lilypond-book, version 2.14 at the least.



I would appreciate help,

thanks,
Wolfgang




You might have better luck to get answers on your issues 1- and 3- if 
you ask on the lilypond mailing list.


Cheers,
Julien


Re: lilypond-book causes xetex relocation errors with libstdc++.so.6

2011-10-29 Thread Julien Rioux
ExecutorElassus  gmail.com> writes:
> I hope I'm asking in the right place, as this seems to be a bug with lilypond 
> integration.
> 
> Thanks,
> 
> EE
> 

Hi,

I can't see how this would be a problem originating from LyX. Try to create a
very simple .tex file and run it through `xelatex'. Does it compile to pdf? If
yes, try a simple .lytex file (essentially a .tex file) and run it through
`lilypond-book --safe --pdf --latex-program=xelatex'. Does it produce a .tex
file? Along the way you should find where the problem really lies.

Cheers,
Julien



Re: lilypond in lyx children documents

2011-03-24 Thread Julien Rioux

On 20/03/2011 9:32 AM, Sylvain Le Groux wrote:

Any idea what I should do to be
able to use lilypond in children lyx documents ?


This will be fixed in the next release candidate: you can "Include" 
child lyx documents and use the lilypond module with them.


--
Julien



Re: lilypond in lyx children documents

2011-03-21 Thread Julien Rioux

On 20/03/2011 9:32 AM, Sylvain Le Groux wrote:

Hi,

I managed to use lilypond in single lyx
  documents in LyX 2.0.0beta4 and 2.0 r1.
Now, when I use those files containing
lilypond code as children in a master document
(lilypond module is selected in the master
document settings), I get the following error:

"
LaTeX Error: Environment lilypond undefined.
Undefined control sequence.
LaTeX Error: \begin{document} ended by \end{lilypond}.
LaTeX Error: Environment lilypond undefined.
Undefined control sequence.
"

I tried using \begin{lilypond} and \end{lilypond}
as ERT in the master document
and got the folowwing error message:

"An error occurred while running:
lilypond-book --safe --pdf --latex
-program=pdflatex --lily-output-dir=ly-pdf"

Any idea what I should do to be
able to use lilypond in children lyx documents ?

Thank you,
Sylvain



I can confirm that this does not work at all. It seems that LyX skips 
the preprocessing step for included files (it also fails for children 
using the sweave module, for example). I am not sure if this was working 
and is now broken. Perhaps it never worked before and nobody had that 
use case until now. But it should get fixed. Thanks for the report.


--
Julien


Re: lilypond use lyx/linux

2011-01-18 Thread Julien Rioux

On 18/01/2011 3:21 AM, Wolfgang Engelmann wrote:

what is the reason to remove lyx if I have the latest already?


To avoid a version clash when you make install the development version. 
Other ways to prevent this without removing your previous lyx are


a) don't run make install
b) run ./configure with the --with-version-suffix="-devel" so that make 
install will create a "lyx-devel" folder and executable

c) use stow
d) others?

--
Julien



Re: lilypond use lyx/linux

2011-01-18 Thread Wolfgang Engelmann
Am Monday 17 January 2011 17:18:59 schrieb Julien Rioux:
>
> If you're looking for advices on how to build from source, I usually do
1) sudo apt-get remove lilypond lyx

Thanks, Julien,

what is the reason to remove lyx if I have the latest already?

Wolfgang


Re: lilypond use lyx/linux

2011-01-17 Thread Julien Rioux

On 17/01/2011 4:57 AM, Wolfgang Engelmann wrote:

Hi,
I try to use Lilypond under Lyx/linux (Debian) and wonder whether somebody
could share his experiences re download (debian package? compile?) with me.

Wolfgang



...and if you want to keep LyX 1.6.x alongside the development version 
(it is, after all, still in beta stage) there will be ways to do that. A 
few have been mentioned on the mailing lists in the past.


--
Julien



Re: lilypond use lyx/linux

2011-01-17 Thread Julien Rioux

On 17/01/2011 4:57 AM, Wolfgang Engelmann wrote:

Hi,
I try to use Lilypond under Lyx/linux (Debian) and wonder whether somebody
could share his experiences re download (debian package? compile?) with me.

Wolfgang



If you're looking for advices on how to build from source, I usually do

1) remove the main distribution (debian) package,
2) install the packages needed for a build,
3) download the latest source code,
4) start building, and
5) optionally, install system-wide

For lilypond and lyx, that would be, from the command line:

1) sudo apt-get remove lilypond lyx

2) a) sudo apt-get build-dep lilypond lyx
   b) sudo apt-get install git subversion

3) a) svn co svn://svn.lyx.org/lyx/lyx-devel/trunk/ /home/username/lyx-devel
   b) git clone git://git.sv.gnu.org/lilypond.git 
/home/username/lilypond-devel


4) (in the appropriate directory)
  a) ./autogen.sh
  b) ./configure
  c) make

5) (optional)
  sudo make install


--
Julien



Re: Lilypond+Lyx

2010-04-13 Thread Guenter Milde
On 2010-04-12, Helge Hafting wrote:
> Bernardo Barros wrote:

>> ... with this method there isn't much difference of
>> this and importing the PDF already. It's not less work.

> It is slightly less; LyX will manage the creation of PDFs itself, you 
> will not need to update the PDF when changing the .ly file.

> Of course, embedding lilypond code in LyX would be even less work. But I 
> don't know a quick way to program that.
...

It should/could be done similar to "literate programming" and
"R/Sweave" support.

...

> What you want can be done though. Lilypond code could be stored in the
> .lyx file, and LyX could write out a temporary .ly file and process it 
> with lilypond.

There is already the lilybook program that does this
separation/processing/replacement for Lilypond code in a tex file.
Hence, LyX should export a tex file and then process it with lilybook
before carrying on with latex ...

> You may want to file an enhancement request for this at 
> http://www.lyx.org/trac/wiki/BugTrackerHome
> so your idea is not forgotten. 

Also, this has been discussed on this (or the devel) list some time
ago. AFAIK the framework for an implementation is now in place.

Günter



Re: Lilypond+Lyx

2010-04-12 Thread Helge Hafting

Bernardo Barros wrote:

I got an error. BTW with this method there isn't much difference of this and
importing the PDF already. It's not less work.

It is slightly less; LyX will manage the creation of PDFs itself, you 
will not need to update the PDF when changing the .ly file.


Of course, embedding lilypond code in LyX would be even less work. But I 
don't know a quick way to program that. Anything not supported directly 
by latex, is kept in separate files. This is the way it is for graphics, 
as well as music.


The current lilypond support in LyX takes care of running lilypond and 
importing the resulting PDF automatically. So you can include music, but 
you need to have each piece in a separate file.



What you want can be done though. Lilypond code could be stored in the
.lyx file, and LyX could write out a temporary .ly file and process it 
with lilypond.


You may want to file an enhancement request for this at 
http://www.lyx.org/trac/wiki/BugTrackerHome

so your idea is not forgotten. The idea is interesting, but I don't have
time right now.

Helge Hafting


Re: Lilypond+Lyx

2010-04-10 Thread Bernardo Barros
I got an error. BTW with this method there isn't much difference of this and
importing the PDF already. It's not less work.

On 10 April 2010 04:38, Jürgen Spitzmüller  wrote:

> Bernardo Barros wrote:
> > Can I put a Lilypond code directly into a Lyx document? Like we do with
> > Mathematical equations and Tex code?
> > If not, any project in this direction?
>
> You can use the external inset (Insert > File > External Material, select
> "Lilypond") to include a *.ly file. Preview inside the LyX workarea is
> supported IIRC.
>
> Jürgen
>


Re: Lilypond+Lyx

2010-04-10 Thread Jürgen Spitzmüller
Bernardo Barros wrote:
> Can I put a Lilypond code directly into a Lyx document? Like we do with
> Mathematical equations and Tex code?
> If not, any project in this direction?

You can use the external inset (Insert > File > External Material, select 
"Lilypond") to include a *.ly file. Preview inside the LyX workarea is 
supported IIRC.

Jürgen


Re: Lilypond integration

2009-04-01 Thread Guenter Milde
On 2009-04-01, Jürgen Spitzmüller wrote:
> Guenter Milde wrote:

 After leaving this environment, the graphic is rendered and put into
 place in the LyX document. If you need to change it, you just click on
 the graphic and the code environment pops up again.

>> This is rather hard. With lilypond-book, you will have to live with
>> the source code in LyX.

> Actually, I think implementing instant preview to InsetFlex (and make it 
> customizable by a layout flag) should not be too hard, and it would be a 
> valuable goal also for other custom inset (think of a tipa inset).

The problem here is that the preview has to be generated with lilypond,
not LaTeX. This is usually the realm of the external inset.

However, the user wanted to edit the source code inside LyX instead of an
external file. Maybe it is simpler to allow "inline source" in an
external inset than "external preview" in an InsetFlex.

Günter



Re: Lilypond integration

2009-04-01 Thread Jürgen Spitzmüller
Guenter Milde wrote:

>>> After leaving this environment, the graphic is rendered and put into
>>> place in the LyX document. If you need to change it, you just click on
>>> the graphic and the code environment pops up again.
> 
> This is rather hard. With lilypond-book, you will have to live with
> the source code in LyX.

Actually, I think implementing instant preview to InsetFlex (and make it 
customizable by a layout flag) should not be too hard, and it would be a 
valuable goal also for other custom inset (think of a tipa inset).

Jürgen




Re: Lilypond integration

2009-04-01 Thread Guenter Milde
On 2009-03-23, Helge Hafting wrote:

>> I don't know if it's possible, but the ideal solution (for me) would be 
>> some kind of lilypond environment (somewhat like the math environment), 
>> where you can type in your lilypond code directly. 

This could be done, best in a "lilypond.module".

>> After leaving this environment, the graphic is rendered and put into
>> place in the LyX document. If you need to change it, you just click on
>> the graphic and the code environment pops up again.

This is rather hard. With lilypond-book, you will have to live with
the source code in LyX.

> Support for lilypond-book would be interesting. And sure - if you 
> volunteer to do some work then you will get it faster.

> This process can be divided into several steps, you won't have to do it 
> all at once.

> 1. Work on the support for lilypond-book.
> This will have LyX create latex output as usual,
> then, add code to run lilypond-book on the produced file
> Finally, let LyX run latex/pdflatex on the file produced, as usual.
> So this step is mostly about inserting an invocation
> of "lilypond-book" into the existing workflow.

We have an example of "latex-preprocessing" with the literate
programming (noweb) support. It is already (ab)used for R code with
sweave. I would very much like a generalisation, where a module could
trigger such preprocessing an set the preprocessor. 

Idea:

In the module:

  Style Lilypond
...
ExportsTo  lilytex
  End  

-> Would call the created LaTeX source .

In the Converters:

   LilyTeX -> LaTeX (plain):  lilypond-book $$i $$a
   
> At this point, use a new document settings to decide whether
> lyx should do this lilypond-book step or not. Many lyx documents
> have no lilypond content, and many lyx users don't have lilypond.

This is why I want to define the Lilypond style in a module. This
would also allow combination with any (?) document class.


> 2. With lilypond-book working, start on the lilypond environment.
> first figure out if it ought to be a inset, a layout module, or
> whatever. I guess an inset will be the way.
> Then add the rule about how LyX produces latex code when processing
> a lilypond inset. This is easy - just output \begin{lilypond}
> followed by the inset contents, followed by \end{lilypond}

> At this point, you have working lilypond-book!

This step can even be tried before the first step -- if you export to
latex and run lilypond-book and latex by hand.

> 3. Some fine-tuning. Remove the document setting that specifies if this
> is a lilypond document. Instead, add logic so that LyX will run
> lilypond-book whenever the document contains a lilypond inset.
> You can perhaps make use of similiar logic that add latex packages
> on an as-needed basis.

As stated above, I would prefer a generalization of the code for
literate programming.

> 4. The preview. Arrange so Lyx runs the inset content through
> lilypond, and display the resulting .png if this succeeds.
> I am not sure how to do this part, but look at how it is done
> for math and graphichs insets.

If a preview is important, it might be simpler to go a completely
different route: amend the external inset so that it allows in-place
editing of the source instead of relying on an external file.

Günter



Re: Lilypond integration

2009-04-01 Thread Guenter Milde
On 2009-03-23, Piero Faustini wrote:

> I have a doubt, although it's regarding more the LaTeX-LilyPond integration: 
> lily-book knows how to break music lines (or pages) in a given latex 
> environment, 

Are you sure? 

As I understand the docs of lilypond-book, it is a preprocessor that
works by extracting snippets of lilypond notation, transforming them to
EPS or PDF graphics and inserting a graphic-loading command in their
place.

> but it can't guess if this environment will change after LaTeX 
> compile. I mean: I'm writing a komascript book using some packages
> which can alter heavily the shape of the text, such as BibLaTeX, by
> adding more text.  This is the reason why my LyX's LaTeX run up to 4
> times when compiling, and everything works ok. Can lilypond-book give
> instructions at the beginning of this process? 

No.

But if used according to its specification (small musical examples in a
book), LaTeX should handle them nice. If I remember right, you can also
place the lilypond snipped inside a flaot.

> Can it be run more than once between Latex runs just to refine 
> the process? 

Not that I know of.


Günter



RE: Lilypond integration

2009-03-31 Thread Piero Faustini


> The big question is - how can we know that another re-run is needed? LyX 
> can't look at the final PDF and spot a badly broken musical line. 
> However, lyx can be made to search any logfile lilypond produce, and 
> look for messages that indicate such problems.
> 
> I don't know enough about lilypond to answer this.
> 
> Helge Hafting

This is far beyond my knowledge, but I will be happy to help by testing and/or 
debugging, if it's not enough giving suggestions and advice.
_
25 GB di spazio gratis online: attiva SkyDrive!
http://clk.atdmt.com/GBL/go/136430529/direct/01/

Re: Lilypond integration

2009-03-31 Thread Helge Hafting

Piero Faustini wrote:
Support for lilypond-book would be interesting. And sure - if you 
volunteer to do some work then you will get it faster.


I would happily contribute, but I'm not a programmer. May I be of some help 
just giving some suggestion or testing?



This process can be divided into several steps, you won't have to do it 
all at once.


I think your 4-steps are a perfect roadmap.

I have a doubt, although it's regarding more the LaTeX-LilyPond integration: 
lily-book knows how to break music lines (or pages) in a given latex 
environment, but it can't guess if this environment will change after LaTeX 
compile. I mean: I'm writing a komascript book using some packages which can 
alter heavily the shape of the text, such as BibLaTeX, by adding more text. 
This is the reason why my LyX's LaTeX run up to 4 times when compiling, and 
everything works ok. Can lilypond-book give instructions at the beginning of 
this process? Can it be run more than once between Latex runs just to refine 
the process? If yes, what about LyX and all this mess?


I don't know. LyX can be enhanced to do anything that you can do with 
latex+lilypond. As you said, LyX already knows to run latex several 
times in order to  resolve bibliographies, references, TOCs and so on. 
If lilypond outputs information to the effect that "something changed, 
and so a rerun *might* be necessary", then sure - LyX can be programmed 
to get the message.


Or, if it is necessary (and sufficient) to re-run lilypond on each 
re-run of latex, then that can be arranged instead.


The big question is - how can we know that another re-run is needed? LyX 
can't look at the final PDF and spot a badly broken musical line. 
However, lyx can be made to search any logfile lilypond produce, and 
look for messages that indicate such problems.


I don't know enough about lilypond to answer this.

Helge Hafting


Re: Lilypond integration

2009-03-23 Thread Piero Faustini

> Support for lilypond-book would be interesting. And sure - if you 
> volunteer to do some work then you will get it faster.

I would happily contribute, but I'm not a programmer. May I be of some help 
just giving some suggestion or testing?


> This process can be divided into several steps, you won't have to do it 
> all at once.

I think your 4-steps are a perfect roadmap.

I have a doubt, although it's regarding more the LaTeX-LilyPond integration: 
lily-book knows how to break music lines (or pages) in a given latex 
environment, but it can't guess if this environment will change after LaTeX 
compile. I mean: I'm writing a komascript book using some packages which can 
alter heavily the shape of the text, such as BibLaTeX, by adding more text. 
This is the reason why my LyX's LaTeX run up to 4 times when compiling, and 
everything works ok. Can lilypond-book give instructions at the beginning of 
this process? Can it be run more than once between Latex runs just to refine 
the process? If yes, what about LyX and all this mess?

Anyway, to all: keep me updated about any Lilypond-book integration attempt.
Piero



Re: Lilypond integration

2009-03-23 Thread Helge Hafting

Johannes Asal wrote:
I know that you can include Lilypond material by External Material. 
That's ok when you have few notation examples in your text and I 
appreciate that someone took the time to implement it. But I'm trying to 
write a book about jazz harmonics and therefore I need many musical 
examples that have to be changed often in the writing process. The main 
problems I have with the External Material approach are the following:


1. It interrupts the creative process, because you need to prepare the 
lilypond snippets in another editor and import them afterwards


I understand, as I have the same problem with figures. It is possible to 
ease the pain some, though. The external inset has a "edit" button, so 
you can click that in order to edit your music snippet. Newer versions 
of lyx doesn't have the button, instead you right-click the lilypond 
object and select "edit externally" from the menu. So you can "get to 
it" from LyX, but it will obviously still be an external application. 
You may have to define an editor for .ly files in the preferences.


2. You don't have a preview and therefore it is a bit difficult to see 
whether you have written something already or not


Tools->preferences->Graphics, then turn "Instant Preview" ON.
You should now get previews of all external insets, including lilypond 
music.  This is perhaps turned off by default, for performance reasons.


3. If you have to change one of the snippets, you have to find the 
corresponding file


Not really. right-click and select "edit externally" (Or, for older 
versions of lyx: click, then use the edit button in the dialog.)


I don't know if it's possible, but the ideal solution (for me) would be 
some kind of lilypond environment (somewhat like the math environment), 
where you can type in your lilypond code directly. After leaving this 
environment, the graphic is rendered and put into place in the LyX 
document. If you need to change it, you just click on the graphic and 
the code environment pops up again.


This is of course not a simple modification to do, and I guess it 
wouldn't be that fun either, but I'm sure it would be a valueable 
addition to LyX's feature list because as far as I know there is no 
solution today that combines text with music typesetting in a convenient 
and straightforward way. I would even volunteer for implementing parts 
of it if needed.


Support for lilypond-book would be interesting. And sure - if you 
volunteer to do some work then you will get it faster.


This process can be divided into several steps, you won't have to do it 
all at once.


1. Work on the support for lilypond-book.
   This will have LyX create latex output as usual,
   then, add code to run lilypond-book on the produced file
   Finally, let LyX run latex/pdflatex on the file produced, as usual.
   So this step is mostly about inserting an invocation
   of "lilypond-book" into the existing workflow.

   At this point, use a new document settings to decide whether
   lyx should do this lilypond-book step or not. Many lyx documents
   have no lilypond content, and many lyx users don't have lilypond.

   Use the latex inset for lilypond code in the beginning.
   To enter music, type stuff like
\begin{lilypond} { c d e } \end{lilypond}
   There will be no preview so far.

2. With lilypond-book working, start on the lilypond environment.
   first figure out if it ought to be a inset, a layout module, or
   whatever. I guess an inset will be the way.

   Then add the rule about how LyX produces latex code when processing
   a lilypond inset. This is easy - just output \begin{lilypond}
   followed by the inset contents, followed by \end{lilypond}

   At this point, you have working lilypond-book!

3. Some fine-tuning. Remove the document setting that specifies if this
   is a lilypond document. Instead, add logic so that LyX will run
   lilypond-book whenever the document contains a lilypond inset.
   You can perhaps make use of similiar logic that add latex packages
   on an as-needed basis.

4. The preview. Arrange so Lyx runs the inset content through
   lilypond, and display the resulting .png if this succeeds.
   I am not sure how to do this part, but look at how it is done
   for math and graphichs insets.


Helge Hafting


Re: Lilypond converter - broken?

2009-03-20 Thread Jürgen Spitzmüller
Piero Faustini wrote:
> I'm puzzled, any idea???

If you use lilypond >= 2.11.0:
http://bugzilla.lyx.org/show_bug.cgi?id=5834

Jürgen


Re: Lilypond converter - broken?

2009-03-19 Thread Piero Faustini
Piero Faustini  writes:
 
> corresponding ps or pdf, allowing LyX not to run Lilypond. (I couldn't find 
> them, and I already DELETED any pdf or ps in the working dirs... VERY 
> strange!!!)


Uhm, I found them, in a cache dir in LyX application Data.
About my problem, I'm still puzzled and need help.





Re: Lilypond integration

2009-03-16 Thread Doug Laidlaw
I run Lyx, Lilypond and Frescobaldi.  I still use Noteedit to write Lilypond 
files, although development has stopped.  I have no reason to import Lilypond 
into Lyx, but under "Converters" I did notice that there are commands for 
Noteedit and Lilypond files.

Frescobaldi no longer depends on Kate, as its predecessor did.  It is 
basically an editor and processor for .ly files.  Importing probably needs 
something different.  Since the usable output from Lilypond is PostScript or 
PDF, perhaps the OP needs to look at importing those.

Doug.

On Tuesday 17 March 2009 10:09:25 am Piero Faustini wrote:
> Johannes Asal  writes:
> > Thanks for your answer. I was checking the nabble forum so I didn't read
> > your posts. I think the External material solution is not optimal, as it
> > forces
>
> you
>
> > to interrupt your creative process. You need to switch to another
> > application and create a lilypond file, then go back to lyx and import
> > it. Of course you could prepare all the files before starting to write
> > the text, but who knows exactly what kind of musical examples he will
> > need in his book?
>
> Sure. If "creative process" continuity is your need, that's pretty
> important. But I thought that creating a musical example IS a different
> task than write some text. If you just need to put in the FLOW of text some
> musical symbols to create - for example - a simple rhythm pattern or some
> harmony analysis, check the package Harmony: but not "music" at all.
>
> If you think you can stand "import" you can do like this:
> 1. have a plain and blank .ly file always ready in the document directory.
> Let's call it "blank.ly"
> 2. Put it in the document with Insert etc. etc.
> 3. Rightclick on it and Select EDIT EXTERNALLY (MUCH BETTER if you have a
> proper tool already working, as I have, for example Lilypondtool + jEdit)
> 4. Edit file but save it with a new name, and just quit external editor
> 5. click on the example box and just select the new .ly file you just
> created (otherwise it would still point to "blank.ly")
> 6. If preview is ON, you now should see the example in the proper place,
> and edit "externally" whenever you need it.
>
> If you have hundreds of VERY tiny examples (such a pair of chords or a
> simple melody) the process could be annoying, and you were right.
>  But if your examples are just "small" (or rather medium-size), and not
> hundreds, this method have a great advantage: you can see a preview (in
> your default editor) AND a preview in LyX (otherwise, I think, you CAN'T
> have, and you should rely on your unassisted .ly writing skills - I
> couldn't do so!!!)
>
> > I'm not really sure, what would be the best solution. But what I'm sure
> > about
>
> is
>
> > that there should be a solution. Not even Finale or Sibelius provide real
> > support for writing musicological documents. Considering the price you
> > have
>
> Finale? Sibelius? never heard oh that, should be some exotic programs ;)
>
> Lilypond-book IS the solution for your needs, but we LyX-Lilypond users
> need to tweak harder to have it work without problems.
> But, I repeat, even when we find a way to use lilypond-book, I would
> continue to use in many case the IMPORT solution - By the way, it IS NOT a
> import: you do not import anything at all, you just USE lilypond files.
> Importing would be bad, using is great: you could manually add some stuff
> like a "copyright" line in every .ly file without compiling, and touch
> NOTHING in your LyX doc, and everything would work perfect at next LyX
> compiling.
> It's just a matter of keep .ly code in external files.
>
> Hope to have helped you.
> These days I'm very busy, but in a pair of weeks I'm going to work on the
> lilypond-book thing. I quote you "there should be a solution".
> Bye
> Piero




Re: Lilypond integration

2009-03-16 Thread Piero Faustini
Johannes Asal  writes:

> Thanks for your answer. I was checking the nabble forum so I didn't read your
> posts. I think the External material solution is not optimal, as it forces 
you
> to interrupt your creative process. You need to switch to another application
> and create a lilypond file, then go back to lyx and import it. Of course you
> could prepare all the files before starting to write the text, but who knows
> exactly what kind of musical examples he will need in his book?

Sure. If "creative process" continuity is your need, that's pretty important. 
But I thought that creating a musical example IS a different task than write 
some text. If you just need to put in the FLOW of text some musical symbols to 
create - for example - a simple rhythm pattern or some harmony analysis, check 
the package Harmony: but not "music" at all.

If you think you can stand "import" you can do like this:
1. have a plain and blank .ly file always ready in the document directory. 
Let's call it "blank.ly"
2. Put it in the document with Insert etc. etc.
3. Rightclick on it and Select EDIT EXTERNALLY (MUCH BETTER if you have a 
proper tool already working, as I have, for example Lilypondtool + jEdit)
4. Edit file but save it with a new name, and just quit external editor
5. click on the example box and just select the new .ly file you just created 
(otherwise it would still point to "blank.ly")
6. If preview is ON, you now should see the example in the proper place, and 
edit "externally" whenever you need it.

If you have hundreds of VERY tiny examples (such a pair of chords or a simple 
melody) the process could be annoying, and you were right.
 But if your examples are just "small" (or rather medium-size), and not 
hundreds, this method have a great advantage: you can see a preview (in your 
default editor) AND a preview in LyX (otherwise, I think, you CAN'T have, and 
you should rely on your unassisted .ly writing skills - I couldn't do so!!!)

> I'm not really sure, what would be the best solution. But what I'm sure about 
is
> that there should be a solution. Not even Finale or Sibelius provide real
> support for writing musicological documents. Considering the price you have 

Finale? Sibelius? never heard oh that, should be some exotic programs ;)

Lilypond-book IS the solution for your needs, but we LyX-Lilypond users need to 
tweak harder to have it work without problems.
But, I repeat, even when we find a way to use lilypond-book, I would continue 
to use in many case the IMPORT solution - By the way, it IS NOT a import: you 
do not import anything at all, you just USE lilypond files. Importing would be 
bad, using is great: you could manually add some stuff like a "copyright" line 
in every .ly file without compiling, and touch NOTHING in your LyX doc, and 
everything would work perfect at next LyX compiling.
It's just a matter of keep .ly code in external files.

Hope to have helped you.
These days I'm very busy, but in a pair of weeks I'm going to work on the 
lilypond-book thing. I quote you "there should be a solution".
Bye
Piero






Re: Lilypond integration

2009-03-16 Thread Johannes Asal
Piero Faustini  writes:

> 
> I understand what are your needs, because almost identical as mine.
> I had to discard lilypond-book because it was too difficoult to integrate 
> with 
> LyX. I must admit I didn't try too much: but I use a lot of multiple-pass 
> packages such BibLaTeX (a sort of enhanced bibTeX), indexes and so on, so I 
> think it would be difficuolt to have everything work without problems, and 
> almost impossible to have a working instant preview of the whole doc.
>  It seems that a theory book (as a musicological research on librettoes) 
> doesn't need a lot of long music examples, so the advantages of lilypond-book 
> (basically: ability to draw music snipetts in different environments) are not 
> so important.
> This is what I use: I have a directory of musical examples in .ly files, 
> which 
> have a simple code that have all the white space cut. (can't find the thread 
> where this was discussed, I will post it later).
> I use Insert - File - External material - Lilypond file. It can give instant 
> preview (and allows direct link to the predefined Lilypond editor, if you 
> find 
> some error) so is ALMOST as having the code directly in the LyX doc.
> If you need multiple lines examples, this can be hard to achieve if you need 
> lines to cross between pages, but I think a solution can be found. Stay tuned.
> Hope it was clear
> 
> 

Thanks for your answer. I was checking the nabble forum so I didn't read your
posts. I think the External material solution is not optimal, as it forces you
to interrupt your creative process. You need to switch to another application
and create a lilypond file, then go back to lyx and import it. Of course you
could prepare all the files before starting to write the text, but who knows
exactly what kind of musical examples he will need in his book?

I'm not really sure, what would be the best solution. But what I'm sure about is
that there should be a solution. Not even Finale or Sibelius provide real
support for writing musicological documents. Considering the price you have to
pay for them, that's a real shame.



Re: Lilypond integration

2009-03-10 Thread Pavel Sanda
Guenter Milde wrote:
> On 2009-03-10, Pavel Sanda wrote:
> 
> > btw as a small poll - what version of lilypond you people use?
> > (see http://bugzilla.lyx.org/show_bug.cgi?id=5834 )
> 
> Version: 2.10.33-2.3 (Debian/testing).
> 
> BTW: How much work would it be to copy/adapt the lilypond external inset to
> an inset for *.abc music files with abcm2ps?

its not time saver to use external inset for this.
it would need some cloning of ert-like insent, adding preview like graphics 
insets do and
maybe some additional tweaks in latex generation in case you can't put lilypond 
code
directly into the .tex file. the basic blocks are already done, but assemling
it into functional inset wont be few-liner either...

pavel


Re: Lilypond integration

2009-03-10 Thread Guenter Milde
On 2009-03-10, Pavel Sanda wrote:

> btw as a small poll - what version of lilypond you people use?
> (see http://bugzilla.lyx.org/show_bug.cgi?id=5834 )

Version: 2.10.33-2.3 (Debian/testing).

BTW: How much work would it be to copy/adapt the lilypond external inset to
an inset for *.abc music files with abcm2ps?

Günter




Re: Lilypond integration

2009-03-10 Thread Pavel Sanda
Johannes Asal wrote:
> 1. It interrupts the creative process, because you need to prepare the
> lilypond snippets in another editor and import them afterwards
> 2. You don't have a preview and therefore it is a bit difficult to see
> whether you have written something already or not

you should be able to do this via instant preview.

> 3. If you have to change one of the snippets, you have to find the
> corresponding file

you should be able to do this directly via context menu -> edit externally.

pavel


Re: Lilypond integration

2009-03-10 Thread Johannes Asal
I know that you can include Lilypond material by External Material. That's
ok when you have few notation examples in your text and I appreciate that
someone took the time to implement it. But I'm trying to write a book about
jazz harmonics and therefore I need many musical examples that have to be
changed often in the writing process. The main problems I have with the
External Material approach are the following:

1. It interrupts the creative process, because you need to prepare the
lilypond snippets in another editor and import them afterwards
2. You don't have a preview and therefore it is a bit difficult to see
whether you have written something already or not
3. If you have to change one of the snippets, you have to find the
corresponding file

I don't know if it's possible, but the ideal solution (for me) would be some
kind of lilypond environment (somewhat like the math environment), where you
can type in your lilypond code directly. After leaving this environment, the
graphic is rendered and put into place in the LyX document. If you need to
change it, you just click on the graphic and the code environment pops up
again.

This is of course not a simple modification to do, and I guess it wouldn't
be that fun either, but I'm sure it would be a valueable addition to LyX's
feature list because as far as I know there is no solution today that
combines text with music typesetting in a convenient and straightforward
way. I would even volunteer for implementing parts of it if needed.

Johannes Asal

2009/3/10 Helge Hafting 

> j.asal wrote:
>
>> Hi,
>>
>> I want to write a music theory book with LyX. For musical examples I would
>> like to use Lilypond, but there seems to be no support for including and
>> displaying Lilypond snippets (apart from importing whole Lilypond files).
>> I
>> know that one could use lilypond-book to postprocess files with embedded
>> lilypond code, but then you don't have any preview and you can't use LyX
>> to
>> 'compile' the latex file. Any ideas/suggestions?
>>
>
> I created what little support there is for lilypond in LyX. Mostly because
> it was easy and interesting to do.  It'd be interesting to know more about
> what kind of lilypond support that actually is useful.
>
> Currently, LyX can use lilypond files that takes up a page or less. This
> because LyX runs the file through the lilypond software for you, obtains a
> pdf or postscript file, and includes that as a graphical object.
>
> This lets you typeset pieces of music that is less than a page each, and
> get them into the LyX document. Maybe it is also possible to create small
> examples such as a single chord and include it in the middle of a line of
> text. I haven't actually tried that, but it ought to work.
>
> The way to do this:
> 1. Create a LyX document and a lilypond file
> 2. In LyX: "Insert->File->External Material"
> 3. In the external material dialog, change "template" to LilyPond",
>   and insert the correct filename.
>
> Your music should now appear when you print the LyX file or export a PDF
> file.
>
> Please let me know if there are problems with this.
>
> Supporting lilypond-book would need a different approach, because the
> processing is different.
>
> Helge Hafting
>
>
>


Re: Lilypond integration

2009-03-10 Thread Pavel Sanda
j.asal wrote:
> 
> Hi,
> 
> I want to write a music theory book with LyX. For musical examples I would
> like to use Lilypond, but there seems to be no support for including and
> displaying Lilypond snippets (apart from importing whole Lilypond files). I
> know that one could use lilypond-book to postprocess files with embedded
> lilypond code, but then you don't have any preview and you can't use LyX to
> 'compile' the latex file. Any ideas/suggestions?

btw as a small poll - what version of lilypond you people use?
(see http://bugzilla.lyx.org/show_bug.cgi?id=5834 )

pavel


Re: Lilypond integration

2009-03-10 Thread Helge Hafting

j.asal wrote:

Hi,

I want to write a music theory book with LyX. For musical examples I would
like to use Lilypond, but there seems to be no support for including and
displaying Lilypond snippets (apart from importing whole Lilypond files). I
know that one could use lilypond-book to postprocess files with embedded
lilypond code, but then you don't have any preview and you can't use LyX to
'compile' the latex file. Any ideas/suggestions?


I created what little support there is for lilypond in LyX. Mostly 
because it was easy and interesting to do.  It'd be interesting to know 
more about what kind of lilypond support that actually is useful.


Currently, LyX can use lilypond files that takes up a page or less. This 
because LyX runs the file through the lilypond software for you, obtains 
a pdf or postscript file, and includes that as a graphical object.


This lets you typeset pieces of music that is less than a page each, and 
get them into the LyX document. Maybe it is also possible to create 
small examples such as a single chord and include it in the middle of a 
line of text. I haven't actually tried that, but it ought to work.


The way to do this:
1. Create a LyX document and a lilypond file
2. In LyX: "Insert->File->External Material"
3. In the external material dialog, change "template" to LilyPond",
   and insert the correct filename.

Your music should now appear when you print the LyX file or export a PDF 
file.


Please let me know if there are problems with this.

Supporting lilypond-book would need a different approach, because the 
processing is different.


Helge Hafting




Re: Lilypond integration

2009-03-09 Thread Piero Faustini
Charles de Miramon  writes:

> 
> j.asal wrote:
> 
> > 
> > Hi,
> > 
> > I want to write a music theory book with LyX. For musical examples I would
> > like to use Lilypond, but there seems to be no support for including and
> > displaying Lilypond snippets (apart from importing whole Lilypond files).
> > I know that one could use lilypond-book to postprocess files with embedded
> > lilypond code, but then you don't have any preview and you can't use LyX
> > to 'compile' the latex file. Any ideas/suggestions?
> > 
> > Best regards,
> > Johannes Asal
> 
> I know nothing about Lilypond but have you looked at the insert->external
> object way. There is also a KDE frontend to Lilypond called Frescobaldi
> that looks nice from the screenshots.
> 
> Cheers,
> Charles 

I understand what are your needs, because almost identical as mine.
I had to discard lilypond-book because it was too difficoult to integrate with 
LyX. I must admit I didn't try too much: but I use a lot of multiple-pass 
packages such BibLaTeX (a sort of enhanced bibTeX), indexes and so on, so I 
think it would be difficuolt to have everything work without problems, and 
almost impossible to have a working instant preview of the whole doc.
 It seems that a theory book (as a musicological research on librettoes) 
doesn't need a lot of long music examples, so the advantages of lilypond-book 
(basically: ability to draw music snipetts in different environments) are not 
so important.
This is what I use: I have a directory of musical examples in .ly files, which 
have a simple code that have all the white space cut. (can't find the thread 
where this was discussed, I will post it later).
I use Insert - File - External material - Lilypond file. It can give instant 
preview (and allows direct link to the predefined Lilypond editor, if you find 
some error) so is ALMOST as having the code directly in the LyX doc.
If you need multiple lines examples, this can be hard to achieve if you need 
lines to cross between pages, but I think a solution can be found. Stay tuned.
Hope it was clear

 







Re: Lilypond integration

2009-03-09 Thread Charles de Miramon
j.asal wrote:

> 
> Hi,
> 
> I want to write a music theory book with LyX. For musical examples I would
> like to use Lilypond, but there seems to be no support for including and
> displaying Lilypond snippets (apart from importing whole Lilypond files).
> I know that one could use lilypond-book to postprocess files with embedded
> lilypond code, but then you don't have any preview and you can't use LyX
> to 'compile' the latex file. Any ideas/suggestions?
> 
> Best regards,
> Johannes Asal

I know nothing about Lilypond but have you looked at the insert->external
object way. There is also a KDE frontend to Lilypond called Frescobaldi
that looks nice from the screenshots.

Cheers,
Charles 
-- 
http://www.kde-france.org



Re: lilypond in LyX 6.1

2008-12-26 Thread Piero Faustini

>From your post is not wuite clear if you managed to include your .ly file 
>automatically in LyX by simply selecting it in "External Material"
If yes, you would be asking to get rid of the pag-size problem.

Well, I've (almost) done it! (Thanks to a old post I found googling)
You just need your .ly files correctly called by LyX.
You just have to add this code to your .ly file:

  \header{  
  copyright = "" 
  tagline = ""}

as well as

  \paper{ragged-right=##t}

(or ragged-last=##t if the excerpt is longer than 1 line)

The resulting pdf or png or ps (don't know which is the auto temporary file, I 
simply don't care) is clipped in its heigth, but not in its width (I'm working 
on this).
You can use it in in-line text with proper scaling but this may require some 
manual clipping (in the Lyx external file option tab) to cut some white space 
in the right side.
Also you may require to quit the indent space of the 1st line in the .ly file, 
by setting it to zero.
If you use the fragment in a paragraph or in some box, you also may need to 
manage some clipping, expecially if the fragment is longer. If you need a big 
fragment which spread along more than one page, I still can't help you 
effectively.
I think it would be too difficoult to have the clip-invoking option of Lilypond 
work with LyX, but perhaps you can manage the problem of splitting your music 
by producing two or more supplemental .ly file which just "quote" only the x 
line of the master .ly file, and input them one after the other with lyx, 
expecting LyX to change page when there's no more space. I read about quoting 
somewhere in the lily docs, but can't remember where.
You may also set some Lilypond layout properties (including the mentioned 
\header or \paper properties) by default so each example match scaling and 
width/heigth of your LaTeX document class. I use Komascript book and I will try 
write this code for me.
Let me know if this work and if there're some issue cause I want to use 
Lilypond this way too.
Piero


_
Party… con Eventi! Condividi foto e commenti sulla tua festa!
http://www.microsoft.com/windows/windowslive/events.aspx

Re: lilypond in LyX 6.1

2008-12-25 Thread Piero Faustini

To Jamie:
I'm trying to work with Lilypond too. It seems that what we're trying to do is 
almost impossible without lilypond-book 
(http://lilypond.org/doc/v2.10/Documentation/user/lilypond/LilyPond_002dbook#LilyPond_002dbook)
 which "wrap" your document preprocessing it and converting to graphics your 
lilypond examples before TeX compiling. But this is not implemented in LyX, you 
have to do it manually, and I can't help with this (I use some more wrappers so 
I think it simply won't work with me). If you still want to use normal lilypond 
examples, stay tuned, I'm trying find a solution. In the meantime, you can 
produce a output .png or small .pdf or .eps of the very first system of a .ly 
file with the "--preview" option 
(http://lilypond.org/doc/v2.10/Documentation/user/lilypond/Invoking-lilypond#Invoking-lilypond)
 (I think the "--no-page" option still doesn't work in the latest Lilypond 
version) and loading the resulting mylilypondfile.preview.png image in your 
text. Check 
http://lilypond.org/doc/v2.10/Documentation/user/lilypond/Extracting-fragments-of-notation#Extracting-fragments-of-notation
 for a tool to roughly clip your music.
Another solution is using musixTeX, but this is MUCH harder than Lilypond, and 
have to be considered twice before beginning using it.

write me if you have more technical questions (or help as well!).

you're welcome
Piero
p.s. I use windows XP
P.P.S. Use package harmony if you want to include just musical sybols such 
notes, very simple rhythms, tempo markings etc. directly IN your text without 
pentagram.


_
"Condividi e organizza le tue immagini con  Windows Live Foto.
"
http://www.microsoft.com/windows/windowslive/photos.aspx

Re: Lilypond examples

2008-08-05 Thread Uwe Stöhr

H schrieb:


Hello, I need to put a few short Lilypond musical examples in my LyX thesis,
possibly without using pdf or similar passages.
Is it possible to have it put in some ERT box where I need them?


You could try to include the Lilypond passages as external document, see section 6.1 of the Embedded 
Objects manual.


If this doesn't help, I would cut out a PDF image of your Lilypond output and include it to your LyX 
document as image.


regards Uwe