On 11/27/2013 04:32 PM, Urs Liska wrote:
Am 27.11.2013 16:25, schrieb Carl Sorensen:
On 11/27/13 8:04 AM, "David Kastrup" <d...@gnu.org> wrote:
Urs Liska <u...@openlilylib.org> writes:
[...]
originalBreak =
#(define-music-function (parser location)()
( #{ \tag #'keep-original-breaks \break #} ))
[...]
If the general case were added, and a special include were included, then
it seems like we'd have both David's wish for keeping things general and
Urs's wish for having an easily-used tool for the specific use case.
For me this sounds good.
Requiring to write \include "original-breaks.ly" is significantly better
than requiring to define the commands.
But it would still need a separate switch, presumably through the
command line.
I do not want to open a Pandora's box here... Just some thoughts:
Would it be easy to add commandline switches for
- including files with LilyPond input at the very beginning of the
"compilation unit"
- inserting Lilypond input given as a commandline argument at the
beginning of the document?
And would it be feasible to have the equivalent of the LaTeX commands
\providecommand and \renewcommand and/or \if\defined?
I imagine commandlines like the following:
lilypond --include-first=stylesheet1.ly piece.ly [equivalent to]
lilypond --input='\include "stylesheet1.ly"' piece.ly
lilypond --input='#(set-default-paper-size "a5")' \
--input='#(set-global-staff-size 15.87)' piece.ly
and, eventually,
lilypond --input='originalBreak = {}' piece.ly
where piece.ly contains an
\include "original-breaks.ly"
which uses \providecommand instead of the Urs' above command to define
\originalBreak. Or you could re-point a tag name to the actual tag which
will be used in the score.
Even without the \providecommand and \if\defined functionality, this
looks like a useful feature for commandline control of Lily's output.
And of course I hope that "pretending" some lines in front of the actual
input file should not be too complicated or intrusive to implement?
Best,
Alexander
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel