lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggestion: Keep original breaks


From: Alexander Kobel
Subject: Re: Suggestion: Keep original breaks
Date: Tue, 03 Dec 2013 11:59:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130702 Icedove/17.0.7

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" <address@hidden> wrote:

Urs Liska <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]