Re: lay out

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: lay out

Mats Bengtsson-6
(Graham, or someone else, we should really try to make sure that
all commands and reserved words available in LilyPond are listed
in the Index. \layout is one of those missing. Doing such an exercise
would also help identifying what information is missing from the manual
today.)

Part of an answer to your question can be found in the
sections "Changing context default settings" and
"Defining new contexts" in the manual. There's also some
information in "Line length", but there doesn't seem to be
any introduction to the concept anywhere. For example, I couldn't
find any information on that you can put a \layout{...} block
on the top level of the file to make it apply to all scores in the
file (or at least within the \book) whereas it will only apply to
the current score if you put the declaration inside \score{...}.

    /Mats


Aaron Mehl wrote:

> Hi   all,
>
> In a previous email I asked if layout replaced paper.
> I was told to look at outputs, which I did. The paper
> output section details \paper{}
>
> but I see no mention of \layout {}
>
> where in the docs is \layout discussed?
>
> Thanks
> Aaron
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com 
>
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/lilypond-user

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
         Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: lay out

Aaron Mehl

Ok here is where I am confused. There is a structure
for files which makes a file valid.
Then there is a grammar which must also be followed
for the lanuguage of lilypond.
 
I get the feeling after reading the docs that the
structure of lilypond is loose.

What I mean is that it appear (if I am not wrong) that
there are elements that can appear a number of places
in a document and others that can appear only in
certain places.

I want to be able to generalize and also limit the
structure of a basic lilypond file:

lets say a file with a melody only.

If I ask the question what elements must a lilypond
file have or it won't be valid structuraly will I get
an answer?

If I ask for a valid parent child relationship of
elements will I find such a thing?

This issue is compounded for me by most lilypond
examples which use includes or variables x = y
so that it is often hard to see what the structure is.

I am not complaining rather I am trying to understand.

I realize part of my problem comes from my experience
with xml/html where there are strict rules for nesting
and validity and wellformedbness...


A documentation page titled file structure should lay
down some rules for file structure instead of listing
a few of the top level elements.

I for my part find it confusing when an element is not
nested. Although I realize that with lilypond there is
less worry about missing brackets that way.

I will read some more and experiment some more and see
what I come up with.

Aaron
--- Mats Bengtsson <[hidden email]> wrote:

> (Graham, or someone else, we should really try to
> make sure that
> all commands and reserved words available in
> LilyPond are listed
> in the Index. \layout is one of those missing. Doing
> such an exercise
> would also help identifying what information is
> missing from the manual
> today.)
>
> Part of an answer to your question can be found in
> the
> sections "Changing context default settings" and
> "Defining new contexts" in the manual. There's also
> some
> information in "Line length", but there doesn't seem
> to be
> any introduction to the concept anywhere. For
> example, I couldn't
> find any information on that you can put a
> \layout{...} block
> on the top level of the file to make it apply to all
> scores in the
> file (or at least within the \book) whereas it will
> only apply to
> the current score if you put the declaration inside
> \score{...}.
>
>     /Mats
>
>
> Aaron Mehl wrote:
> > Hi   all,
> >
> > In a previous email I asked if layout replaced
> paper.
> > I was told to look at outputs, which I did. The
> paper
> > output section details \paper{}
> >
> > but I see no mention of \layout {}
> >
> > where in the docs is \layout discussed?
> >
> > Thanks
> > Aaron
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com 
> >
> >
> > _______________________________________________
> > lilypond-user mailing list
> > [hidden email]
> >
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>
> --
> =============================================
> Mats Bengtsson
> Signal Processing
> Signals, Sensors and Systems
> Royal Institute of Technology
> SE-100 44  STOCKHOLM
> Sweden
> Phone: (+46) 8 790 8463
>          Fax:   (+46) 8 790 7260
> Email: [hidden email]
> WWW: http://www.s3.kth.se/~mabe
> =============================================
>



               
__________________________________
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html 



_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: lay out

Mats Bengtsson-6


Aaron Mehl wrote:

> Ok here is where I am confused. There is a structure
> for files which makes a file valid.
> Then there is a grammar which must also be followed
> for the lanuguage of lilypond.
>  
> I get the feeling after reading the docs that the
> structure of lilypond is loose.
>
> What I mean is that it appear (if I am not wrong) that
> there are elements that can appear a number of places
> in a document and others that can appear only in
> certain places.
>
> I want to be able to generalize and also limit the
> structure of a basic lilypond file:
>
> lets say a file with a melody only.
>
> If I ask the question what elements must a lilypond
> file have or it won't be valid structuraly will I get
> an answer?
>
> If I ask for a valid parent child relationship of
> elements will I find such a thing?
>
> This issue is compounded for me by most lilypond
> examples which use includes or variables x = y
> so that it is often hard to see what the structure is.

For me it's the opposite. I find it much harder to see
the structure if you only have a long \score{...} where
I have to scroll several pages from beginning to end.

One thing that may confuse you is that some of the structural
elements are optional. For example,
\book{
   \score{
     {c d e f}
   }
}
can be abbreviated into
{c d e f}

Probably, you wouldn't have that much problems with the basic structure
if you had a background in programming languages like Pascal or C or
Scheme than with the very strictly specified grammar of XML.
To cite Han-Wen, the strict formal definition of the input grammar
can be found in the source code file parser.yy. However, I
agree completely with you that we should have a basic description
not only of the syntax but also of the semantics of the
basic building blocks. Even though I've been using LilyPond
since version 0.0.xx, I'm still confused by some aspects,
especially when it comes to \book{...} and what happens if you
have several \layout{...} blocks at the top level.

The basic ideas, though, are not that hard. At the top level
of the file, you can have "macro definitions" xxxx = ...,
you can have \header{...} blocks, \paper{...} blocks,
\layout{...} blocks and, of course, \score{...} blocks (I've
probably forgot some others as well).
The \header and \layout can also be moved inside the \score{...}
if you wish and in that case the only apply to the current score,
otherwise they apply to all scores.

    /Mats

>
> I am not complaining rather I am trying to understand.
>
> I realize part of my problem comes from my experience
> with xml/html where there are strict rules for nesting
> and validity and wellformedbness...
>
>
> A documentation page titled file structure should lay
> down some rules for file structure instead of listing
> a few of the top level elements.
>
> I for my part find it confusing when an element is not
> nested. Although I realize that with lilypond there is
> less worry about missing brackets that way.
>
> I will read some more and experiment some more and see
> what I come up with.
>
> Aaron
> --- Mats Bengtsson <[hidden email]> wrote:
>
>
>>(Graham, or someone else, we should really try to
>>make sure that
>>all commands and reserved words available in
>>LilyPond are listed
>>in the Index. \layout is one of those missing. Doing
>>such an exercise
>>would also help identifying what information is
>>missing from the manual
>>today.)
>>
>>Part of an answer to your question can be found in
>>the
>>sections "Changing context default settings" and
>>"Defining new contexts" in the manual. There's also
>>some
>>information in "Line length", but there doesn't seem
>>to be
>>any introduction to the concept anywhere. For
>>example, I couldn't
>>find any information on that you can put a
>>\layout{...} block
>>on the top level of the file to make it apply to all
>>scores in the
>>file (or at least within the \book) whereas it will
>>only apply to
>>the current score if you put the declaration inside
>>\score{...}.
>>
>>    /Mats
>>
>>
>>Aaron Mehl wrote:
>>
>>>Hi   all,
>>>
>>>In a previous email I asked if layout replaced
>>
>>paper.
>>
>>>I was told to look at outputs, which I did. The
>>
>>paper
>>
>>>output section details \paper{}
>>>
>>>but I see no mention of \layout {}
>>>
>>>where in the docs is \layout discussed?
>>>
>>>Thanks
>>>Aaron
>>>
>>>__________________________________________________
>>>Do You Yahoo!?
>>>Tired of spam?  Yahoo! Mail has the best spam
>>
>>protection around
>>
>>>http://mail.yahoo.com 
>>>
>>>
>>>_______________________________________________
>>>lilypond-user mailing list
>>>[hidden email]
>>>
>>
>>http://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>>--
>>=============================================
>> Mats Bengtsson
>> Signal Processing
>> Signals, Sensors and Systems
>> Royal Institute of Technology
>> SE-100 44  STOCKHOLM
>> Sweden
>> Phone: (+46) 8 790 8463
>>         Fax:   (+46) 8 790 7260
>> Email: [hidden email]
>> WWW: http://www.s3.kth.se/~mabe
>>=============================================
>>
>
>
>
>
>
> __________________________________
> Discover Yahoo!
> Find restaurants, movies, travel and more fun for the weekend. Check it out!
> http://discover.yahoo.com/weekend.html 
>

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
         Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: lay out

Aaron Mehl


--- Mats Bengtsson <[hidden email]> wrote:


> For me it's the opposite. I find it much harder to
> see
> the structure if you only have a long \score{...}
> where
> I have to scroll several pages from beginning to
> end.

Well if I take docbook as an example a book can have
multiple sections no problem. The score block would in
your case be confusing because there aren't so many
structureal elements in lilypond. I created an xml
wrapper for lilypond and proposed a phrase element do
do that. The idea is that a fixed structure permits
the engraver/composer to forget about structure an
concentrate on notating. The tools force the correct
structure and the person concentrates on the grammar
of the language.

>
> One thing that may confuse you is that some of the
> structural
> elements are optional. For example,
> \book{
>    \score{
>      {c d e f}
>    }
> }
> can be abbreviated into
> {c d e f}
> yes that is confusing and why make it confusing?
Does this give more power? Does this make things
easier to notate? a tool can be trained to laydown the
structural elements in a file correctly and
automatically. This is done in docbook and it lets the
author concentrate on writing.
> Probably, you wouldn't have that much problems with
> the basic structure
> if you had a background in programming languages
> like Pascal or C or
> Scheme than with the very strictly specified grammar
> of XML.

True but I know a bit of python.  I see what you are
saying but I still say a clearly defined and enforced
structure would make the entry into lilypond much and
I mean much easier to the newbie.
> To cite Han-Wen, the strict formal definition of the
> input grammar
> can be found in the source code file parser.yy.
>
hmn part of the problem is that the base for lilypond
is a fullfleged programing language, which is what
gives it its power but also its confusion.


If you have time look at lilyxml.sourceforge.net

 
> >>Part of an answer to your question can be found in
> >>the
> >>sections "Changing context default settings"

but this should be in file structure and in a section
called layout.


and
> >>"Defining new contexts" in the manual. There's
> also
> >>some
> >>information in "Line length", but there doesn't

I will read these sections again.

Aaron


               
__________________________________
Discover Yahoo!
Stay in touch with email, IM, photo sharing and more. Check it out!
http://discover.yahoo.com/stayintouch.html


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond