Re: Layout integrating LaTeX and music
[EMAIL PROTECTED]: ... Hi Tobias, I don't use lilypond-book, but call lilypond from within latex. This approach has some advantages and some drawbacks. 1) I'd like to know how you call lilypond from within latex. 2)Could you tell me the advantages and disadvantages of this approach? Hello Patrick. lilypond-book seems to do the following: (text below i valid for \version 2.6.5, yes I know it is old, and I only tried it with \lilypondfile) a, run latex to get linewidth b, makes a new ly-file (e.g. lily-1045984756.ly) that sets the line width and basically prepends this to the original ly-file: #(set! toplevel-score-handler ly:parser-print-score) #(set! toplevel-music-handler (lambda (p m) (ly:parser-print-score p (ly:music-scorify m p the above make the eps cropped, else it has some space above and the the left c, runs lilypond --ps -b eps on the new file which gives you: the whole score in AA.eps (AA = eg. lily-1045984756) one system per file in AA-xx.eps lines of \includegraphics{AA-xx.eps}, one per system, in AA-systems.tex (plus a few other files) d, extracts the fonts from AA.eps to origname.psfonts (the AA.eps includes the fonts, AA-xx.eps does not) e, modifies your .lytex file - .tex by replacing \lilypondfile etc. with \input AA-systems.tex === So to solve you 1) you have to do the same. You can manually set the linewidth and add the b, part to your ly-files. c, is a simple, just run the command To extract the fonts, you can cp lilypond-book to a new file and modify the end of it to (ie. leave out all other stuff): def main (): fontextract.extract_fonts (sys.argv[1],sys.argv[2:]) if __name__ == '__main__': main () Use e.g \includegraphics[width=39mm]{myfile-1.eps} etc. where you want your music. === Pro: easier to see errors in your latex file easier to work with bibtex and makeindex you can put your \includegraphics in an macro, does not work with \lilypondfile fewer files in your directory (all those lily-xxx-files) easier to do (different) things between (different) system lilypond-book does not sometime run lilypond --ps -b eps ie. when some \inlude'd file is changed easier integration into makefiles all.dvi: all.tex litt.bib Arcadelt.eps ... latex all bibtex all log makeindex all log latex all log latex all log # lilypond-psfonts == the modified lilypond-book %.ps: %.dvi ./lilypond-psfonts $*.psfonts *[a-z].eps dvips -h $*.psfonts $ log ps2pdf14 $*.ps $*.pdf # if you want pdf's Arcadelt.eps: arcadelt.ly header.ly layout.ly vars.ly short.ly ... %.eps:%.ly rm -f $*-*.eps # the number of systems might have changed lilypond --ps -b eps $ Con: you must handle the linewidth yourself you must have one \includegraphics per system and handle that yourself somehow, maybe someone could write a latexpackage for that create the AA-systems.tex yourself you must have all your lilypondfragments and such in ly-files The rationale for me --- easier handling of latex. Regards, /Karl --- Karl HammarAspö Data [EMAIL PROTECTED] Lilla Aspö 2340Networks S-742 94 Östhammar +46 173 140 57 Computers Sweden +46 70 511 97 84 Consulting --- ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Layout integrating LaTeX and music
Hi Patrick, the baseline of the lilypond fragment is now identical with the letter's baseline. Have you got any idea why there is so much horizontal space in between the round brackets and the fragment: ( fragment )? I think what you're looking for is the --left-padding parameter. Just call lilypond-book with --left-padding=0. You can find this in the manual, AU(Application Usage), 4.4, Invoking LilyPond. See also 4.3., Music fragment options Michael ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Layout integrating LaTeX and music
I think what you're looking for is the --left-padding parameter. Just call lilypond-book with --left-padding=0. You can find this in the manual, AU(Application Usage), 4.4, Invoking LilyPond. See also 4.3., Music fragment options Hi Michael, thanks a lot for your help! The option --left-padding=0 reduced the redundant space on the left side and improved the layout on the right side of the fragment within the brackets. I don't want to be pedantic ;-) but is there an option to get rid off the space on the right side (fragment ) like --right-padding=0? All the best, PLS Hi Tobias, I don't use lilypond-book, but call lilypond from within latex. This approach has some advantages and some drawbacks. 1) I'd like to know how you call lilypond from within latex. 2)Could you tell me the advantages and disadvantages of this approach? Cheers, PLS -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger?did=10 ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Layout integrating LaTeX and music
Hi Patrick, thanks a lot for your help! The option --left-padding=0 reduced the redundant space on the left side and improved the layout on the right side of the fragment within the brackets. I don't want to be pedantic ;-) but is there an option to get rid off the space on the right side (fragment ) like --right-padding=0 I'm quite unsure what's the reason for this. I've looked at the eps file lilypond generates - there's no extra space. That's why I think it's an issue with LaTeX, but I don't really know how to improve this...sorry for that. Michael ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Layout integrating LaTeX and music
Dear all, I'm trying to integrate Lilypond fragments (Version 2.11.34) in a LaTeX document. Here is a minimal example: \documentclass[a4paper]{article} \begin{document} Bli bla blub, bla bla bla bla bla bla bla (\lilypond[fragment,staffsize=6]{\override Staff.TimeSignature #'style = #'()\time 4/4 \override NoteHead #'style = #'cross f''4 f''8 f'' f''4 f''8 f''}) bla bla bla bla bla bla bla bla, bli bla blub! \end{document} Everything works fine apart from some details concerning the layout. 1) There is too much space between the brackets and the fragment 2) The fragment itself seems to be typeset higher than the text level Does anybody know a solution to this? Is it a LaTeX or a Lilypond problem? Thanks very much for your help and a happy new year! PLS -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Layout integrating LaTeX and music
Patrick, (La)TeX just sets boxes of objects on a base line. You can see this when you change your sample in this way: Bli bla blub, bla bla bla bla bla bla bla (% \frame{\lilypond[fragment,staffsize=6]{ \override Staff.TimeSignature #'style = #'() \time 4/4 \override NoteHead #'style = #'cross f''4 f''8 f'' f''4 f''8 f'' }}) bla bla bla bla bla bla bla bla, bli bla blub! The base line of the lilypond fragment is identical with the letter's base line. When you add some lines of text before the snippet you see that the snippet is a bit too high and the distance to preceeding line is to large. You can lower the lilypond fragment in this way: Bli bla blub, bla bla bla bla bla bla bla (% \lower2.5pt\hbox{\lilypond[fragment,staffsize=6]{ \override Staff.TimeSignature #'style = #'() \time 4/4 \override NoteHead #'style = #'cross f''4 f''8 f'' f''4 f''8 f'' }}) bla bla bla bla bla bla bla bla, bli bla blub! Regards, Helge - Original Message - From: Patrick Schmidt [EMAIL PROTECTED] To: lilypond-user@gnu.org Sent: Saturday, December 29, 2007 12:23 PM Subject: Layout integrating LaTeX and music Dear all, I'm trying to integrate Lilypond fragments (Version 2.11.34) in a LaTeX document. Here is a minimal example: \documentclass[a4paper]{article} \begin{document} Bli bla blub, bla bla bla bla bla bla bla (\lilypond[fragment,staffsize=6]{\override Staff.TimeSignature #'style = #'()\time 4/4 \override NoteHead #'style = #'cross f''4 f''8 f'' f''4 f''8 f''}) bla bla bla bla bla bla bla bla, bli bla blub! \end{document} Everything works fine apart from some details concerning the layout. 1) There is too much space between the brackets and the fragment 2) The fragment itself seems to be typeset higher than the text level Does anybody know a solution to this? Is it a LaTeX or a Lilypond problem? Thanks very much for your help and a happy new year! PLS -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Layout integrating LaTeX and music
Thank you Helge, the baseline of the lilypond fragment is now identical with the letter's baseline. Have you got any idea why there is so much horizontal space in between the round brackets and the fragment: ( fragment )? All the best, PLS Hi Ole, I don*t know which platform you use (Windows, Linux or MacOs) If you have a Mac than it should work as follows: Open the terminal then type: cd / cd /Users/Ole/ %(your user name) vi .profile%(editor) i %(insert) PATH=$PATH:/Applications/LilyPond.app/Contents/Resources/bin/ export PATH %(set the path) :wq%(to save and quit) Now you have to run a script cslled lilypond-book. It is described in the manual. If you use the terminal then enter the following commands (but not the comments): mkdir -p out/ %this creates a new file called out lilypond-book --output=out --psfonts yourfile.tex %name of your latex-file cd out %go to the file out latex yourfile %name of your latex-file instead od yourfile dvips -o -Ppdf -h yourfile.psfonts yourfile %substitute yourfile ps2pdf yourfile.ps It makes your life easier if you install a script in your latex-editor. I use Texshop and there is a little plugin called Lilypond-LaTeX. You can find it here: http://users.dimi.uniud.it/~nicola.vitacolonna/download/software/latex/Lilypond-LaTeX.engine.txt Hope this helps, PLS -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Layout integrating LaTeX and music
Patrick, as you can see with the framebox, the space is not added by LaTeX. This is a question for the Lilypond gurus. I also noticed this additional space, but did not made any tries to remove it, although it is annoying in this circumstance. Regards, Helge - Original Message - From: Patrick Schmidt [EMAIL PROTECTED] To: lilypond-user@gnu.org Sent: Saturday, December 29, 2007 5:14 PM Subject: Re: Layout integrating LaTeX and music Thank you Helge, the baseline of the lilypond fragment is now identical with the letter's baseline. Have you got any idea why there is so much horizontal space in between the round brackets and the fragment: ( fragment )? All the best, PLS Hi Ole, I don*t know which platform you use (Windows, Linux or MacOs) If you have a Mac than it should work as follows: Open the terminal then type: cd / cd /Users/Ole/ %(your user name) vi .profile%(editor) i %(insert) PATH=$PATH:/Applications/LilyPond.app/Contents/Resources/bin/ export PATH %(set the path) :wq%(to save and quit) Now you have to run a script cslled lilypond-book. It is described in the manual. If you use the terminal then enter the following commands (but not the comments): mkdir -p out/ %this creates a new file called out lilypond-book --output=out --psfonts yourfile.tex %name of your latex-file cd out %go to the file out latex yourfile %name of your latex-file instead od yourfile dvips -o -Ppdf -h yourfile.psfonts yourfile %substitute yourfile ps2pdf yourfile.ps It makes your life easier if you install a script in your latex-editor. I use Texshop and there is a little plugin called Lilypond-LaTeX. You can find it here: http://users.dimi.uniud.it/~nicola.vitacolonna/download/software/latex/Lilypond-LaTeX.engine.txt Hope this helps, PLS -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user