lilypond-user
[Top][All Lists]

## Re: Lilypond + LaTex (on Mac)

 From: Peter O'Doherty Subject: Re: Lilypond + LaTex (on Mac) Date: Sat, 16 Sep 2006 23:40:24 +0200

Thanks a lot for this!
As I expected, I fell at the first hurdle.


Can you give me an idea of what should be in the sample.lytex files? When I type "lilypond-book --psfonts sample.lytex" I get this error:

cd '/Users/peter/Piano course/Latex/'
Welcome to Darwin!
ip5455a71f:~ peter$cd '/Users/peter/Piano course/Latex/'  ip5455a71f:~/Piano course/Latex peter$ lilypond-book --psfonts sample.lytex
-bash: lilypond-book: command not found
ip5455a71f:~/Piano course/Latex peter\$


I use Mac OS X. Lilypond version 2.8.5-1


Cool. OK, then assume your input file is named sample.lytex. (Naming
it "sample.tex" would also work, but you'll probably want that name
for something else, as you'll see.) You probably can't do this within
TexShop (I don't use it), so fire up a Terminal and change to whatever

Type:
lilypond-book --psfonts sample.lytex

You'll probably get some messages of various sorts. If they don't look
like error messages, you can proceed. If they do look like error
messages, there's probably something weird in the input file
(sample.lytex) that you need to fix.

Assuming there were no errors, lilypond-book created a new file named
"sample.tex" (which is why you don't want to use that name for your
input file in the first step). So feed that file to LaTex by typing
this at the command prompt:

latex sample.tex

Again, you'll get messages. If none of them are fatal errors, you can
proceed with:

dvips -o -h sample.psfonts -Ppdf sample.dvi

It might complain about missing fonts, but that shouldn't matter. You
should be able to type:

ps2pdf sample.ps

This will produce sample.pdf, which is your output file.

BTW, I would avoid using the \begin{lilypond} syntax and go with
\lilypondfile instead. That way, you can test all the lilypond files
and get the bugs out of them first.

It might be possible to do all this with TexShop if it has a command
shell in it somewhere. I'm still new to OSX and hadn't even heard of
it before, so I might try it and see what happens.

Geoff