lilypond-user
[Top][All Lists]
Advanced

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

Re: Re: conditional formatting


From: Vicente Solsona
Subject: Re: Re: conditional formatting
Date: Tue, 05 Oct 2010 20:51:16 +0200
User-agent: Opera Mail/10.61 (Linux)

On Mon, 04 Oct 2010 23:11:01 +0200, Marten Visser <address@hidden> wrote:
Hi Vincente, thanks for the suggestion. However, I do not only want to delete a music expression (which can be tagged), but an entire staff, namely the tabStaff. I wouldn't know how to create code removing a staff by tagging it.

you're right. I thought that what you requested could be done with tags
because I once did something similar and there were tags involved.

but I've looked in my file again and found an alternative and perhaps simpler way which you may find useful: the trick is to use two different \book sections; then Lilypond generates two pdfs in one move, so you don't need to specify any
condition at all:

%----------------8<--------------------------------------
%
% input file tst.ly generates tst.pdf for the piccolist and tst-1.pdf for the guitarist

\version "2.12.3"

piccolo = \relative c'' {
        c d e f
}

guitar = \relative c' {
        a b c d
}

staffPiccolo = \new Staff {
        \piccolo        
}

staffGuitar = \new Staff
{
        \guitar 
}

staffTabGuitar = \new TabStaff
{
        
        \guitar 
}

\book
{
        % creates tst.pdf for the piccolist
        <<
                \staffPiccolo
                \staffGuitar
        >>
}

\book
{
        % creates tst-1.pdf for the guitarist
        <<
                \staffPiccolo
                \staffGuitar
                \staffTabGuitar                 
        >>
}

%----------------8<--------------------------------------

I hope I've understood you better this time :)

Dmytro's suggestion looks more promising, though I haven't been able to generate code that does the job so far. When I code

that looks very interesting and can be very useful if you find the way.

greetings,

Vicente




reply via email to

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