nburdick / lilykde

Automatically exported from code.google.com/p/lilykde
0 stars 0 forks source link

Feature Request: Easier handling of multiple input files #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
At first thx for this really nice app.

Here my issue:

I tried to build a larger lilypond project like "Concerto for Violin and
Piano" from Antonio Vivaldi RV356. This project builds two pdf files. One
pdf contains just the violin part and the second one the violin part above
the piano score.

For this project i have multiple files:
defs.ly
RV356-header.ly
RV356-header_Violine.ly
RV356-piano-1.ly
RV356-piano-2.ly
RV356-piano-3.ly
RV356-piano-3++.ly
RV356-piano-layout.ly
RV356-score.ly
RV356-violin.ly
RV356-violin-1.ly
RV356-violin-2.ly
RV356-violin-3.ly

Because i need the violin part in both pdf (but just wants to type and
correct it only one time) i work with /include.

For example the RV356-violin.ly:
-----------------------------------------
\include "defs.ly"

\include "RV356-header_Violine.ly"
\include "RV356-violin-1.ly"
\include "RV356-violin-2.ly"
\include "RV356-violin-3.ly"

#(set-global-staff-size 21)
#(set-default-paper-size "a4")
#(ly:set-option 'point-and-click #f)

\paper {
line-width = 18.3\cm
[...]
-------------------------------------------------

In RV356-score.ly i include the violin part and the piano part to merge it
into the score.
--------------------------------------------------
\include "RV356-header.ly"
\include "RV356-violin-1.ly"
\include "RV356-piano-1.ly"
\include "RV356-violin-2.ly"
\include "RV356-piano-2.ly"
\include "RV356-violin-3.ly"
\include "RV356-piano-3.ly"
--------------------------------------------------

This means when i change something on RV356-violin-2.ly i need to do
"lilypond RV356-violin.ly"(To get the violin-only-part) or "lilypond
RV356-score.ly"(To get violin-piano-score)

But when i type on RV356-violin-2.ly and hit ctrl+shift+M it tries to
compile: "lilypond RV356-violin-2.ly" which will not work because it
contains no \score and no \layout (which is on RV356-violin.ly and
RV356-score.ly)

So it would be nice if i have RV356-violin-2.ly and RV356-violin.ly open i
could mark RV356-violin.ly as "run lilypond-preview on this file". May be
this could be done by a context menu or something like that. Than i would
do some changes in RV356-violin-2.ly and the shortcut ctrl+shift+M runs
"lilypond RV356-violin.ly". 

I know it is just a simple thing when typing on RV356-violin-2.ly to click
on RV356-violin.ly and hit the preview-shortcut. But if i can save this
click i would be happy ;-)

Thx in advance. And keep up the great work.
Felix

Original issue reported on code.google.com by fhamme...@gmail.com on 27 Apr 2008 at 6:42

GoogleCodeExporter commented 8 years ago
Sry i dont want to set the issue type to "defect". It is just a request.

Original comment by fhamme...@gmail.com on 27 Apr 2008 at 6:43

GoogleCodeExporter commented 8 years ago
Thanks for entering this feature request. Yes I plan to include such a feature. 
I 
think the way it will work is that "sub"-files of another project could specify 
the 
command to run in a special comment. For some projects that would be 'run 
LilyPond 
on that other file', or just 'make' if you use Makefile (which I do very often).

Original comment by wbsoft on 28 Apr 2008 at 8:57

GoogleCodeExporter commented 8 years ago
My proposal is that the specially formatted comment looks as follows:

%{lilykde
lyfile = <other lilypond file to build instead of current>
preview = <command to run instead of 'lilypond doc.ly', e.g. 'make'>
publish = <command to run instead of 'lilypond -dno-point-and-click doc.ly'>
...
%}

Other variables could be envisioned, e.g. to change the output file name or 
other 
parameters.

Please add any useful opinions on this :)

Original comment by wbsoft on 28 Apr 2008 at 9:42

GoogleCodeExporter commented 8 years ago
Implemented in revision 341.

It is now possible to place specially formatted variables
inside LilyPond comments, that are read by LilyKDE. The
variable names should consist of lowercase letters, and may
contain (but not end or start with) single hyphens.

E.g.:

%%varname: value

The following variables are currently understood:

%%master: document.ly

Runs lilypond on document.ly instead of current document.

%%master-publish: document.ly

Runs lilypond on document.ly instead of current document,
but only in publish mode.

%%master-preview: document.ly

Runs lilypond on document.ly instead of current document,
but only in preview mode.

(This function does only work within kate, not in the
Konqueror service menu helper app.)

Original comment by wbsoft on 28 Apr 2008 at 9:57

GoogleCodeExporter commented 8 years ago
Thx for implementation. I will try it these days.

Original comment by fhamme...@gmail.com on 2 May 2008 at 7:16

GoogleCodeExporter commented 8 years ago
It works great. Thx again.

Original comment by fhamme...@gmail.com on 4 May 2008 at 8:43