26.10.2014 Views

Section “Troubleshooting” in Application Usage - LilyPond

Section “Troubleshooting” in Application Usage - LilyPond

Section “Troubleshooting” in Application Usage - LilyPond

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3: Runn<strong>in</strong>g lilypond-book 29<br />

doctitle (Only for Tex<strong>in</strong>fo output.) This option works similarly to texidoc option: if<br />

lilypond is called with the ‘--header=doctitle’ option, and the file to be processed<br />

is called ‘foo.ly’ and conta<strong>in</strong>s a doctitle field <strong>in</strong> the \header, it creates a<br />

file ‘foo.doctitle’. When doctitle option is used, the contents of ‘foo.doctitle’,<br />

which should be a s<strong>in</strong>gle l<strong>in</strong>e of text, is <strong>in</strong>serted <strong>in</strong> the Tex<strong>in</strong>fo document as<br />

@lydoctitle text. @lydoctitle should be a macro def<strong>in</strong>ed <strong>in</strong> the Tex<strong>in</strong>fo document.<br />

The same remark about texidoc process<strong>in</strong>g with localized languages also<br />

applies to doctitle.<br />

nogettext<br />

(Only for Tex<strong>in</strong>fo output.) Do not translate comments and variable names <strong>in</strong> the<br />

snippet quoted verbatim.<br />

pr<strong>in</strong>tfilename<br />

If a <strong>LilyPond</strong> <strong>in</strong>put file is <strong>in</strong>cluded with \lilypondfile, pr<strong>in</strong>t the file name right<br />

before the music snippet. For HTML output, this is a l<strong>in</strong>k. Only the base name of<br />

the file is pr<strong>in</strong>ted, i.e. the directory part of the file path is stripped.<br />

3.4 Invok<strong>in</strong>g lilypond-book<br />

lilypond-book produces a file with one of the follow<strong>in</strong>g extensions: ‘.tex’, ‘.texi’, ‘.html’<br />

or ‘.xml’, depend<strong>in</strong>g on the output format. All of ‘.tex’, ‘.texi’ and ‘.xml’ files need further<br />

process<strong>in</strong>g.<br />

Format-specific <strong>in</strong>structions<br />

L A TEX<br />

There are two ways of process<strong>in</strong>g your L A TEX document for pr<strong>in</strong>t<strong>in</strong>g or publish<strong>in</strong>g: gett<strong>in</strong>g a PDF<br />

file directly with PDFL A TEX, or gett<strong>in</strong>g a PostScript file with L A TEX via a DVI to PostScript<br />

translator like dvips. The first way is simpler and recommended 1 , and whichever way you use,<br />

you can easily convert between PostScript and PDF with tools, like ps2pdf and pdf2ps <strong>in</strong>cluded<br />

<strong>in</strong> Ghostscript package.<br />

To produce a PDF file through PDFL A TEX, use<br />

lilypond-book --pdf yourfile.lytex<br />

pdflatex yourfile.tex<br />

To produce PDF output via L A TEX/dvips/ps2pdf, you should do<br />

lilypond-book yourfile.lytex<br />

latex yourfile.tex<br />

dvips -Ppdf yourfile.dvi<br />

ps2pdf yourfile.ps<br />

The ‘.dvi’ file created by this process will not conta<strong>in</strong> note heads. This is normal; if you follow<br />

the <strong>in</strong>structions, they will be <strong>in</strong>cluded <strong>in</strong> the ‘.ps’ and ‘.pdf’ files.<br />

Runn<strong>in</strong>g dvips may produce some warn<strong>in</strong>gs about fonts; these are harmless and may be<br />

ignored. If you are runn<strong>in</strong>g latex <strong>in</strong> twocolumn mode, remember to add ‘-t landscape’ to the<br />

dvips options.<br />

Known issues and warn<strong>in</strong>gs<br />

The \pageBreak command will not work with<strong>in</strong> a \beg<strong>in</strong>{lilypond} ... \end{lilypond}<br />

environment.<br />

1 Note that PDFLATEX and LATEX may not be both usable to compile any LATEX document, that is why we<br />

expla<strong>in</strong> the two ways.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!