Re: lilypond book issues version 2.5.19
Op za, 16-04-2005 te 10:09 +0100, schreef Bernard Hurley: > Lilypond makes a good job of deciding breaks between systems, once this > is done page breaks are easy again I might want them to follow the > general format of the rest of my document, which does not only contain > music, but contains fingering charts, various tables, graphs indicating > the volume of instruments at different pitches. At some point in this > document I have a quotation from Mozart symphony. Maybe lilypond splits > this into three eps files. However these files take up about three > quarters of an A4 page. Suppose I want these to be at the top of three > consecutive pages and the text of my document to flow round them. > Suppose I also want them to have captions under them, for instance: > > Figure X, Mozart Symphony no 40 movement 3 bars y-z > > The number X depends _both_ on what other figures I have in my document > and how lilypond has split the score into systems. It may well be > possible for me to get LilyPond to render this in that same format as > the captions for my other figures, but how then do I include it in my > list of figures? How do I cross reference from my text as in: "see > Figure 8, page 4, bar 12"? I'm sorry, I was under the impression that you were producing full scores (essentially pages filled with music), with elaborate front matter. In your case, lp-book of course is the way to go. -- Han-Wen Nienhuys - [EMAIL PROTECTED] LilyPond Software Design - http://www.lilypond-design.com ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
On Sat, 2005-04-16 at 01:08 +0200, Han-Wen Nienhuys wrote: > > When called from lilypond-book, LilyPond does _not_ take care of > > formatting the pages. This is precisely the reason I started using it. > > So that I can have a multi-movement score with fancy headers, table of > > contents, etc. What it does is to break a long score up into several > > snippets each of which is included individually. It would be extremely > > useful to have a macro that added something between these snippets. > > > > This is not quite correct. Lily will do page formatting if you put your > music into a \book block. The .eps files then output represent a full > page, and with appropriate latex trickery, they could be put on a single > page each. > > I don't see why you're so keen on doing everything in LaTeX. If every > system is dumped as a separate .EPS, then it will not be possible to > determine neat vertical spacing and sensible pagebreaks in the final > document. Conversely, it should not be that hard to make lilypond put > barnumbers or rehearsal marks in page headers or footers. The code is > all in scm/page-layout.scm, and can be changed at runtime. > This may be true but suppose that I am using the fancyhdr package to format headers and footers in my document. First I have to figure out how to make lilypond produce headers and footers inexactly the same format. I have to make sure it can understand macros like: \renewcommand{\headrulewidth}{0.4pt} \fancyhead[LE, RO]{Page \thepage} in my LaTeX preamble in case I feel like changing the data in them. This may well be possible but it is a lot of work, in fact it is more work that was done to produce the fancyhdr package itself, because I not only do I have to duplicate the formatting inside lilypond, which is a bit like re-inventing the wheel, but I also have to pass information from LaTeX to lilypond. But the situation is actually worse than that. Suppose someone posts a new package "betterfancyhdr" to CTAN and I decide that I would prefer to use that. What I want to be able to do is to switch to the new package and to re-write a few things in my LaTeX preamble. I definitely don't want to have to re-write my lilypond files and I don't want to have to re-implement another LaTeX package within lilypond. On the other hand The things that I might need to put in a header or footer or caption or margin note, are fairly limited and it would be possible for lilypond to pass these to LaTeX. Lilypond makes a good job of deciding breaks between systems, once this is done page breaks are easy again I might want them to follow the general format of the rest of my document, which does not only contain music, but contains fingering charts, various tables, graphs indicating the volume of instruments at different pitches. At some point in this document I have a quotation from Mozart symphony. Maybe lilypond splits this into three eps files. However these files take up about three quarters of an A4 page. Suppose I want these to be at the top of three consecutive pages and the text of my document to flow round them. Suppose I also want them to have captions under them, for instance: Figure X, Mozart Symphony no 40 movement 3 bars y-z The number X depends _both_ on what other figures I have in my document and how lilypond has split the score into systems. It may well be possible for me to get LilyPond to render this in that same format as the captions for my other figures, but how then do I include it in my list of figures? How do I cross reference from my text as in: "see Figure 8, page 4, bar 12"? /Bernard ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
Op vr, 15-04-2005 te 11:22 +0100, schreef Bernard Hurley: > > When called from lilypond-book, LilyPond does _not_ take care of > formatting the pages. This is precisely the reason I started using it. > So that I can have a multi-movement score with fancy headers, table of > contents, etc. What it does is to break a long score up into several > snippets each of which is included individually. It would be extremely > useful to have a macro that added something between these snippets. > This is not quite correct. Lily will do page formatting if you put your music into a \book block. The .eps files then output represent a full page, and with appropriate latex trickery, they could be put on a single page each. I don't see why you're so keen on doing everything in LaTeX. If every system is dumped as a separate .EPS, then it will not be possible to determine neat vertical spacing and sensible pagebreaks in the final document. Conversely, it should not be that hard to make lilypond put barnumbers or rehearsal marks in page headers or footers. The code is all in scm/page-layout.scm, and can be changed at runtime. -- Han-Wen Nienhuys - [EMAIL PROTECTED] LilyPond Software Design - http://www.lilypond-design.com ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
Laura Conrad wrote: > Getting latex to not render a footnote marker is pretty easy. You > just say: > > \footnotetext[1]{Here's the first footnote.} Of course, I've been away from LaTeX for too long! The sort of thing I had in mind was to get lilypond-book to (optionally) produce a LaTeX file that contained information about things like bar numbers and footnotes in eps snippets this could be input near the top of the LaTeX source and then macros could be used to control things like bar numbers in page headers. It looks entirely possible to me but it would take some time to get right! But it would also mean you would be able to say things like "see bar 16 of Fred Blogg's Symphony Op. 11 (page 6)". This sort of thing would be very useful if you were (say) writing a book on orchestration. I doubt that this sort of thing would be of top priority for core developers so I will look and see what I can come up with myself. /Bernard ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
> > \includegraphics. > > Yes, I agree. Go forth and provide a patch! > > > Werner Will do -as soon as I have convinced myself I havn't broken anything! /Bernard ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
> "BH" == Bernard Hurley <[EMAIL PROTECTED]> writes: BH> To do it now you would have to get LaTeX to associate a BH> footnote with a particular eps file but stop it rendering the BH> footnote marker. If no one else wants to I will look into BH> this! Getting latex to not render a footnote marker is pretty easy. You just say: \footnotetext[1]{Here's the first footnote.} If you leave out the number in brackets, Latex will pick a number for you. So all you have to do is have your .lytex file be in sync with your .ly files about what the numbers of the footnotes are. -- Laura (mailto:[EMAIL PROTECTED] , http://www.laymusic.org/ ) (617) 661-8097 fax: (501) 641-5011 233 Broadway, Cambridge, MA 02139 ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
> I would appreciate if I in latex could get the first and last \piece, > \mark number, and bar number on a page to be able to put it in page > headers/footers, or add some footnotes from within the music, > as some editors do. > These are things I would like to be able to do(especially the footnotes!), but I think they would be rather difficult to implement. Interestingly in one of the older versions (I can't remember which and I can't remember when it stopped working. At the time I was not particularly interested in it and just tried it out of curiosity) it was possible to put a footnote in markup and it would be rendered correctly by lilypond-book. To do it now you would have to get LaTeX to associate a footnote with a particular eps file but stop it rendering the footnote marker. If no one else wants to I will look into this! /Bernard ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
... > > Its not a matter circumventing any limitations of Lilypond, but of being > > able to use the full power of LaTeX. It would not be practical to add > > anything to LilyPond itself to get this functionality as using it would > > involve (at least) two calls to lilypond. Actually I already have this > > functionality (and more) as I call Lilypond from LyX, using a LyX > > converter that I am developing and this can do some post-processing on > > the file produced by lilypond-book. The code for the converter at the > > moment is a bit of a mess and is really only usable by me. I will > > release it sometime, but I will probably wait till the next version of > > LyX is released as that will change the way converters are handled. > > However life would be easier if it could be done with a macro. > > I'm just trying to help the LilyPond hackers to judge if your request > is of sufficiently general interest to be worth to implement and > support. So far, I have to say that your request looks fairly exotic > to me and I can't see that there would be a large group of users that > would use it. > If you prove me wrong, I'd be happy to change my mind (can't promise > about the main developers, though). > > /Mats I would appreciate if I in latex could get the first and last \piece, \mark number, and bar number on a page to be able to put it in page headers/footers, or add some footnotes from within the music, as some editors do. Regards /Karl ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
> > > Isn't his what \makeatother is for? > > > > This isn't defined for plain TeX. > > > > But lilypond-book produces a LaTeX document, not a TeX document. Right. Sorry. IMHO this line should be deleted from lilypond-book. > For example in 2.5.19 the code: > > \input lily-1105931465-systems.tex > > In Text.tex was generated from the _single_ call: > > \lilypondfile[indent=1.2\cm]{prelude-d.ly} > > It does not result in one postscript snippet being included but six > as can be seen by looking at the contents of > lily-1105931465-systems.tex: > > \includegraphics{lily-365734716-1.eps} > \includegraphics{lily-365734716-2.eps} > \includegraphics{lily-365734716-3.eps} > \includegraphics{lily-365734716-4.eps} > \includegraphics{lily-365734716-5.eps} > \includegraphics{lily-365734716-6.eps} > % eof - 'eof' is Makefile marker; do not remove. Aah, I wasn't aware that lilypond already does that (admittedly, I have never used the TeX backend in the 2.5 series due to lack of time). > It has to do something like this because Lilypond cannot possibly > know where one page ends and the next starts. It would be very > useful indeed to be able to put a macro between these calls to > \includegraphics. Yes, I agree. Go forth and provide a patch! Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
Bernard Hurley wrote: Mats Bengtsson wrote: I don't realize what you would want to add between the staff lines. Is it to circumvent some limitations in LilyPond? Otherwise you could just as well tell LilyPond to add the information. I think both me, Werner and others on the mailing list would find it easier to realize why you find it useful if you are a bit more specific. First, I'm not sure what you mean by "between the staff lines". In the example I gave, prelude-d.ly is for clarinet and piano. I did not want to add anything between the clarinet and piano staffs or inside the piano grandstaff. Sorry, I means score lines (or systems if you prefer that nomenclature). Lilypond-book renders the first three bars (clarinet and piano together) in the first eps file, the next three in the next etc.. If I render the final LaTeX file, the fourth of these eps files is included at the top of page 2. Although I might guess that this will happen, neither I, LaTeX or LilyPond can know this in advance note also that changes both to the LilyPond score _and_ to my original LaTeX file can change this. Suppose I want to do something specific under the first system on each page (e.g. in a set of children's piano pieces I might want a picture of a dog) then I could do it easily if I could insert an appropriate LaTeX macro _between_ the \includegraphics calls. I could also include things like cross-references to other pages, bibliographic references etc. That would be a fairly advanced macro if it's able to determine that it's the first line of each page. Why not simply redefine \includegraphics if you want to do some extra processing for each included .eps file? If you want the original definition of \includegraphics in the rest of the document and a special definition only for the lilypond scores, then you could do the redefinition within {pre,post}LilyPondExample. Another simple alternative is to write a sed script that modifies the generated *-systems.tex file and inserts whatever. Its not a matter circumventing any limitations of Lilypond, but of being able to use the full power of LaTeX. It would not be practical to add anything to LilyPond itself to get this functionality as using it would involve (at least) two calls to lilypond. Actually I already have this functionality (and more) as I call Lilypond from LyX, using a LyX converter that I am developing and this can do some post-processing on the file produced by lilypond-book. The code for the converter at the moment is a bit of a mess and is really only usable by me. I will release it sometime, but I will probably wait till the next version of LyX is released as that will change the way converters are handled. However life would be easier if it could be done with a macro. I'm just trying to help the LilyPond hackers to judge if your request is of sufficiently general interest to be worth to implement and support. So far, I have to say that your request looks fairly exotic to me and I can't see that there would be a large group of users that would use it. If you prove me wrong, I'd be happy to change my mind (can't promise about the main developers, though). /Mats ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
Mats Bengtsson wrote: > I don't realize what you would want to add between the staff lines. > Is it to circumvent some limitations in LilyPond? Otherwise you could > just as well tell LilyPond to add the information. > I think both me, Werner and others on the mailing list would find it > easier to realize why you find it useful if you are a bit more specific. > First, I'm not sure what you mean by "between the staff lines". In the example I gave, prelude-d.ly is for clarinet and piano. I did not want to add anything between the clarinet and piano staffs or inside the piano grandstaff. Lilypond-book renders the first three bars (clarinet and piano together) in the first eps file, the next three in the next etc.. If I render the final LaTeX file, the fourth of these eps files is included at the top of page 2. Although I might guess that this will happen, neither I, LaTeX or LilyPond can know this in advance note also that changes both to the LilyPond score _and_ to my original LaTeX file can change this. Suppose I want to do something specific under the first system on each page (e.g. in a set of children's piano pieces I might want a picture of a dog) then I could do it easily if I could insert an appropriate LaTeX macro _between_ the \includegraphics calls. I could also include things like cross-references to other pages, bibliographic references etc. Its not a matter circumventing any limitations of Lilypond, but of being able to use the full power of LaTeX. It would not be practical to add anything to LilyPond itself to get this functionality as using it would involve (at least) two calls to lilypond. Actually I already have this functionality (and more) as I call Lilypond from LyX, using a LyX converter that I am developing and this can do some post-processing on the file produced by lilypond-book. The code for the converter at the moment is a bit of a mess and is really only usable by me. I will release it sometime, but I will probably wait till the next version of LyX is released as that will change the way converters are handled. However life would be easier if it could be done with a macro. /Bernard ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
Bernard Hurley wrote: When called from lilypond-book, LilyPond does _not_ take care of formatting the pages. This is precisely the reason I started using it. So that I can have a multi-movement score with fancy headers, table of contents, etc. What it does is to break a long score up into several snippets each of which is included individually. It would be extremely useful to have a macro that added something between these snippets. For example in 2.5.19 the code: \input lily-1105931465-systems.tex In Text.tex was generated from the _single_ call: \lilypondfile[indent=1.2\cm]{prelude-d.ly} It does not result in one postscript snippet being included but six as can be seen by looking at the contents of lily-1105931465-systems.tex: \includegraphics{lily-365734716-1.eps} \includegraphics{lily-365734716-2.eps} \includegraphics{lily-365734716-3.eps} \includegraphics{lily-365734716-4.eps} \includegraphics{lily-365734716-5.eps} \includegraphics{lily-365734716-6.eps} % eof - 'eof' is Makefile marker; do not remove. It has to do something like this because Lilypond cannot possibly know where one page ends and the next starts. It would be very useful indeed to be able to put a macro between these calls to \includegraphics. I don't realize what you would want to add between the staff lines. Is it to circumvent some limitations in LilyPond? Otherwise you could just as well tell LilyPond to add the information. I think both me, Werner and others on the mailing list would find it easier to realize why you find it useful if you are a bit more specific. /Mats ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
> > > It `normalises' the `@' character, so it no longer is of type > > > `letter'. I also wonder why it's here. Additionally, it should > > > be > > > > > > [EMAIL PROTECTED] > > > > > > to make TeX stop parsing after the `2'. > > > > > > > Isn't his what \makeatother is for? > > This isn't defined for plain TeX. > But lilypond-book produces a LaTeX document, not a TeX document. > > In any case, it looks like it should _not_ be here, after all > > someone might "@" in \preLilyPondExample and then get surprised at > > the result! > > I disagree. `@' should *always* be of category `other' for the user. > If she wants to change that she should explicitly change the catcode. > This is standard LaTeX practise. Sorry, I agree, I was confusing \makeatletter and \makeatother! The code really does nothing here because `@' will already have category `other' in a normal LaTeX file. > > > I should have thought if that since my wife is Chinese! I still > > think that being able to put a macro between the systems would be > > useful. > > Since LilyPond completely takes care of formatting pages, this isn't > really useful. Think of LilyPond returning an `image' of a piece of > music which is accidentally in TeX format. If you want something > between the systems, make LilyPond do that. Otherwise use two or more > LilyPond snippets. When called from lilypond-book, LilyPond does _not_ take care of formatting the pages. This is precisely the reason I started using it. So that I can have a multi-movement score with fancy headers, table of contents, etc. What it does is to break a long score up into several snippets each of which is included individually. It would be extremely useful to have a macro that added something between these snippets. For example in 2.5.19 the code: \input lily-1105931465-systems.tex In Text.tex was generated from the _single_ call: \lilypondfile[indent=1.2\cm]{prelude-d.ly} It does not result in one postscript snippet being included but six as can be seen by looking at the contents of lily-1105931465-systems.tex: \includegraphics{lily-365734716-1.eps} \includegraphics{lily-365734716-2.eps} \includegraphics{lily-365734716-3.eps} \includegraphics{lily-365734716-4.eps} \includegraphics{lily-365734716-5.eps} \includegraphics{lily-365734716-6.eps} % eof - 'eof' is Makefile marker; do not remove. It has to do something like this because Lilypond cannot possibly know where one page ends and the next starts. It would be very useful indeed to be able to put a macro between these calls to \includegraphics. /Bernard ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
> > It `normalizes' the `@' character, so it no longer is of type > > `letter'. I also wonder why it's here. Additionally, it should > > be > > > > [EMAIL PROTECTED] > > > > to make TeX stop parsing after the `2'. > > > > Isn't his what \makeatother is for? This isn't defined for plain TeX. > In any case, it looks like it should _not_ be here, after all > someone might "@" in \preLilyPondExample and then get surprised at > the result! I disagree. `@' should *always* be of category `other' for the user. If she wants to change that she should explicitly change the catcode. This is standard LaTeX practice. > I should have thought if that since my wife is Chinese! I still > think that being able to put a macro between the systems would be > useful. Since LilyPond completely takes care of formatting pages, this isn't really useful. Think of LilyPond returning an `image' of a piece of music which is accidentally in TeX format. If you want something between the systems, make LilyPond do that. Otherwise use two or more LilyPond snippets. Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
> > First what is the code: [EMAIL PROTECTED] for? > > It `normalizes' the `@' character, so it no longer is of type > `letter'. I also wonder why it's here. Additionally, it should be > > [EMAIL PROTECTED] > > to make TeX stop parsing after the `2'. > Isn't his what \makeatother is for? In any case, it looks like it should _not_ be here, after all someone might "@" in \preLilyPondExample and then get surprised at the result! > > Second what is the point of putting the \preLilyPondExample and > > \postLilyPondExample macros where they are? If I want macros in > > _these_ places I can put them in the original latex file! > > The idea is that you need sometimes need special environments to make > the lyrics work correctly. For example, you have to enter a CJK > environment for Chinese. \preLilyPondExample and \postLilyPondExample > should be global hooks (this is, setting them up just once for all > lilypond snippets), not local ones. I should have thought if that since my wife is Chinese! I still think that being able to put a macro between the systems would be useful. Bernard ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: lilypond book issues version 2.5.19
> The 2.5.19 version of lilypond-book generates code like: > > {% > \parindent 0pt > [EMAIL PROTECTED] > \ifx\preLilyPondExample \undefined > \relax > \else > \preLilyPondExample > \fi > \def\lilypondbook{}% > \input lily-1105931465-systems.tex > \ifx\postLilyPondExample \undefined > \relax > \else > \postLilyPondExample > \fi > } > > First what is the code: [EMAIL PROTECTED] for? It `normalizes' the `@' character, so it no longer is of type `letter'. I also wonder why it's here. Additionally, it should be [EMAIL PROTECTED] to make TeX stop parsing after the `2'. > Second what is the point of putting the \preLilyPondExample and > \postLilyPondExample macros where they are? If I want macros in > _these_ places I can put them in the original latex file! It would > make much more sense to put them between the systems (in > lily-1105931465-systems.tex). Actually having read the > documentation, that is where I expected them to be! This could be > used to do things like control the gap between the systems or put > wiggly lines between them etc. The idea is that you need sometimes need special environments to make the lyrics work correctly. For example, you have to enter a CJK environment for Chinese. \preLilyPondExample and \postLilyPondExample should be global hooks (this is, setting them up just once for all lilypond snippets), not local ones. Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel