How does html editor talk to LilyPond ?
Hi, I'm hoping this is a basic question with an easy answer: I'd like to make some web pages with simple musical examples. I've studied the relevant manual pages, but there seems to be some basic information taken for granted in the explanations. I put the example code from the manual into an html page in my text editor (BBEdit), lilypond fragment relative=2 \key c \minor c4 es g2 /lilypond but, of course, no music showed up when I previewed the page. What needs to happen to get the music the show up? Is there some way I must link the editor to LilyPond? Do I have to run a terminal command on the file (if so, what and how)? I have been successful in producing some nice LaTeX documents with lilypond-book in TexShop, but that happens fairly seamlessly due to Nicola Vitacolonna's engines. I'm fairly new to html and can do a little in the terminal, but I'd like to figure this out. What am I missing? Thank you for any help. I'm using LilyPond 2.14.2 on a MacBook Pro running 10.6.8. Christopher Berg christopherberg.com Christopher Berg's myspace page Rossignol Duo ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How does html editor talk to LilyPond ?
On Aug 17, 2011, at 1:13 PM, Christopher Berg wrote: Hi, I'm hoping this is a basic question with an easy answer: I'd like to make some web pages with simple musical examples. I've studied the relevant manual pages, but there seems to be some basic information taken for granted in the explanations. I put the example code from the manual into an html page in my text editor (BBEdit), lilypond fragment relative=2 \key c \minor c4 es g2 /lilypond You have to run lilypond-book first on your document. In the terminal: lilypond-book foo.html where foo.html is your document. It will produce a new document in which the snippets appear correctly. Cheers, MS___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How does html editor talk to LilyPond ?
Thanks for your help, Mike. After experimenting a bit I realized I actually had to put /Applications/LilyPond.app/Contents/Resources/bin/lilypond-book in order for Terminal to find lilypond-book. (This is probably understood by most of you here, but I didn't realize it.) Is it common practice to move lilypond-book out of LilyPond's Resources/bin to a more convenient location, or does one always use this long path? I did have a successful run, but the music examples were scattered about my home directory. Is there a way to specify an images folder into which lilypond-book could put the images? Terminal gave me the message: *** Warning: GenericResourceDir doesn't point to a valid resource directory. the -sGenericResourceDir=... option can be used to set this. but I really don't know what this means or what to do with the information. Finally, it took a long time to compile and seems as though it might actually be quicker to typeset the examples in lilypond, give the images a name that made sense when looking at the html, put them into an images folder for the web project, write my own alt tag in the html file, and end up with something like this: src=damilano_1.png alt=[fantasia theme] as opposed to something like this: src=a9/lily-f88e68a9.png alt=[image of music] Anyway, I am just wondering what the experiences of other html-to-lilypond-book users are. As I mentioned before, I've had success using lilypond-book in TexShop for LaTeX documents, but it seems that when using lilypond-book with an html file, I'd have to go back and change file names, move things into more convenient folders, and change some of the html code to end up with a convenient and understandable folder structure. On Aug 17, 2011, at 7:20 AM, Mike Solomon wrote: On Aug 17, 2011, at 1:13 PM, Christopher Berg wrote: Hi, I'm hoping this is a basic question with an easy answer: I'd like to make some web pages with simple musical examples. I've studied the relevant manual pages, but there seems to be some basic information taken for granted in the explanations. I put the example code from the manual into an html page in my text editor (BBEdit), lilypond fragment relative=2 \key c \minor c4 es g2 /lilypond You have to run lilypond-book first on your document. In the terminal: lilypond-book foo.html where foo.html is your document. It will produce a new document in which the snippets appear correctly. Cheers, MS ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How does html editor talk to LilyPond ?
Hello, Here are a few indications you might find usefull. 1. Do not separate de lilypond-book binary from the LilyPond application 2. lilypond-book creates indeed a lot of little files. As you work with TeXShop, it is possible to create an engine that uses the right command (lilypond-book) and stores all these file in a temporary folder. The following is adapted to pdf, but you could adapt it your html. Philippe %% #!/bin/tcsh set LILYPONDFOLDER = /Applications set path = ($path $LILYPONDFOLDER/LilyPond.app/Contents/Resources/bin/) rm -r dir lilypond-book --output=dir --pdf $1 cd dir pdflatex --shell-escape $1 mv $1:r.pdf .. -- View this message in context: http://old.nabble.com/How-does-html-editor-%22talk%22-to-LilyPond---tp32278786p32284870.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user