Re: lilybook module

2010-09-01 Thread Guenter Milde
On 2010-08-31, Julien Rioux wrote:
 On 31/08/2010 3:35 PM, Guenter Milde wrote:
 On 2010-08-30, Jean-Marc Lasgouttes wrote:

 Using the OutputFormat tag defined for use with sweave, one can have a
 module that changes the format (and thus add an extra convert step).
...
 Could this be used to allow LilyPond source code in LyX that is
 converted to musical scores by the 'lilypond-book' pre-processor?

 Yes, I have already submitted a patch to this list to implement it.

Once again, there is a thread on the user list requesting this feature,
so I hope it can go e.g. to the Wiki.

 Since then I have worked on the patch a little bit. It works well except 
 for one or two things. As mentioned in a previous message in this tread, 
 instant preview always treats the current buffer as LaTeX, so any 
 attempt to change the OutputFormat to allow preprocessing by 
 lilypond-book is ignored by the preview mechanism. My current fix to get 
 Instant preview working is kind of a hack, so I haven't posted a updated 
 patch yet.

For me, it would be OK to typeset the LilyPond code verbatim in the
instant preview with a macro redefinition in the preamble that gets
removed/replaced by the pre-processor. I agree this is not WYSIWYG but an
instant fallback solution.

Günter




Re: lilybook module

2010-09-01 Thread Guenter Milde
On 2010-08-31, Julien Rioux wrote:
> On 31/08/2010 3:35 PM, Guenter Milde wrote:
>> On 2010-08-30, Jean-Marc Lasgouttes wrote:

>>> Using the OutputFormat tag defined for use with sweave, one can have a
>>> module that changes the format (and thus add an extra convert step).
...
>> Could this be used to allow LilyPond source code in LyX that is
>> converted to musical scores by the 'lilypond-book' pre-processor?

> Yes, I have already submitted a patch to this list to implement it.

Once again, there is a thread on the user list requesting this feature,
so I hope it can go e.g. to the Wiki.

> Since then I have worked on the patch a little bit. It works well except 
> for one or two things. As mentioned in a previous message in this tread, 
> instant preview always treats the current buffer as LaTeX, so any 
> attempt to change the OutputFormat to allow preprocessing by 
> lilypond-book is ignored by the preview mechanism. My current fix to get 
> Instant preview working is kind of a hack, so I haven't posted a updated 
> patch yet.

For me, it would be OK to typeset the LilyPond code verbatim in the
instant preview with a macro redefinition in the preamble that gets
removed/replaced by the pre-processor. I agree this is not WYSIWYG but an
instant fallback solution.

Günter




Re: lilybook module

2010-08-31 Thread Julien Rioux

On 31/08/2010 3:35 PM, Guenter Milde wrote:

On 2010-08-30, Jean-Marc Lasgouttes wrote:


Using the OutputFormat tag defined for use with sweave, one can have a
module that changes the format (and thus add an extra convert step).
This is unfortunately only easy to use when the module and converters
are bundled with LyX (and these ones are presumably safe...)


Could this be used to allow LilyPond source code in LyX that is
converted to musical scores by the 'lilypond-book' pre-processor
http://lilypond.org/doc/v2.1/Documentation/user/out-www/lilypond/lilypond_002dbook-manual.html
?

Günter






Yes, I have already submitted a patch to this list to implement it. 
Since then I have worked on the patch a little bit. It works well except 
for one or two things. As mentioned in a previous message in this tread, 
instant preview always treats the current buffer as LaTeX, so any 
attempt to change the OutputFormat to allow preprocessing by 
lilypond-book is ignored by the preview mechanism. My current fix to get 
Instant preview working is kind of a hack, so I haven't posted a updated 
patch yet.


But in short, yes you can do that.

Cheers,
Julien



Re: lilybook module

2010-08-31 Thread Julien Rioux

On 31/08/2010 3:35 PM, Guenter Milde wrote:

On 2010-08-30, Jean-Marc Lasgouttes wrote:


Using the OutputFormat tag defined for use with sweave, one can have a
module that changes the format (and thus add an extra convert step).
This is unfortunately only easy to use when the module and converters
are bundled with LyX (and these ones are presumably safe...)


Could this be used to allow LilyPond source code in LyX that is
converted to musical scores by the 'lilypond-book' pre-processor
http://lilypond.org/doc/v2.1/Documentation/user/out-www/lilypond/lilypond_002dbook-manual.html
?

Günter






Yes, I have already submitted a patch to this list to implement it. 
Since then I have worked on the patch a little bit. It works well except 
for one or two things. As mentioned in a previous message in this tread, 
instant preview always treats the current buffer as LaTeX, so any 
attempt to change the OutputFormat to allow preprocessing by 
lilypond-book is ignored by the preview mechanism. My current fix to get 
Instant preview working is kind of a hack, so I haven't posted a updated 
patch yet.


But in short, yes you can do that.

Cheers,
Julien