The simple answer is that lilypond-book doesn't support pdflatex at the moment. It shouldn't be too difficult to add such a feature, since lilypond-bin can create output files that pdftex can process, the problem is that the pdftex output format is not very actively supported.
However, it should be possible to search a file produced with dvips+ps2pdf just as well as a file produced by pdflatex. The only problem I can see is if you have ä, ö, or any other characters in your file and use \usepackage[latin1]{inputenc} since these are typeset using a combination of two font glyphs. Still, you can search for all other words in the text. I hope you use the following flags to dvips to get vector fonts that look well on the screen: dvips -Ppdf -u+lilypond file.dvi
You can switch to a font that includes all latin1 characters if you: - Add '\usepackage[T1]{fontenc}' in your LaTeX file. - Tell LilyPond to use the corresponding font file: \property Lyrics . LyricText \override #'font-name = #"ecrm1000" Then, you can use dvips without the additional flags plus ps2pdf to create a .pdf file where all the text (both in text and in music) is searchable. However, it will look fuzzy on screen since you get bitmapped fonts. By default, teTeX does not contain vector (Type1) versions of the T1 encoded fonts, so if you want a document that looks well on screen and includes all German characters, I see two main alternatives:
- Download CM-Super from CTAN and install on your machine.
- Use the standard times font by adding \usepackage{times} in the LaTeX file header and replace ecrm1000 by ptmr8t in the property setting above.
In both cases, you should again use 'dvips -Ppdf -u+lilypond file.dvi'.
/Mats
Christian Datzko wrote:
Dear List,
I have a problem with pdflatex. With the example file from the website (also attached) I am not able to generate pdf files using pdflatex. ilypond-book and latex as well as dvips and dvipdf run without problems as you can see in the listing below, but pdflatex has some error. Since the pdf files created with pdflatex are of higher quality since you can search them for text using Acrobat Reader I would like to create the files using pdflatex. Can someone help me to find the error?
Thanks in advance,
Christian.
$ lilypond-book 1.lytex lilypond-book (GNU LilyPond) 2.0.1 Reading `/tmp/1/1.lytex' Running latex... Running usr... Now processing: `lily-1192095933.ly' Parsing... Interpreting music...[3] Preprocessing graphical objects... Calculating line breaks... paper output to `lily-1192095933.tex'...
Now processing: `lily-626573667.ly' Parsing... Interpreting music...[1] Preprocessing graphical objects... Calculating line breaks... [2] paper output to `lily-626573667.tex'...
Now processing: `lily-1228813048.ly' Parsing... Interpreting music...[2] Preprocessing graphical objects... Calculating line breaks... [2] paper output to `lily-1228813048.tex'...
Writing `1.latex'
Christian [EMAIL PROTECTED] /tmp/1
$ latex 1.latex
This is TeXk, Version 3.14159 (Web2C 7.4.5)
%&-line parsing enabled.
(./1.latex
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
ohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/config/graphics.cfg)
(/usr/share/texmf/tex/latex/graphics/dvips.def))
No file 1.aux.
(./lily-1192095933.tex (/usr/share/lilypond/2.0.1/tex/lilyponddefs.tex
(/usr/share/lilypond/2.0.1/tex/feta20.tex)
(/usr/share/lilypond/2.0.1/tex/lily-ps-defs.tex))
Overfull \hbox (19.44315pt too wide) in paragraph at lines 7--79
\OT1/cmr/m/n/10 ple: [][][][]
) (./lily-626573667.tex) (./lily-1228813048.tex) [1] (./1.aux) )
(see the transcript file for additional information)
Output written on 1.dvi (1 page, 3740 bytes).
Transcript written on 1.log.
Christian [EMAIL PROTECTED] /tmp/1
$ dvips 1.dvi
This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)
' TeX output 2004.03.22:1749' -> 1.ps
<texc.pro><f7b6d320.enc><music-drawing-routines.ps><74afc74c.enc>
<09fbbfac.enc><texps.pro><special.pro>. <cmr7.pfb><cmtt10.pfb><cmbxti10.pfb>
<cmr10.pfb>[1]
Christian [EMAIL PROTECTED] /tmp/1 $ dvipdf 1.dvi
Christian [EMAIL PROTECTED] /tmp/1
$ pdflatex 1.latex
This is pdfTeXk, Version 3.14159-1.10b (Web2C 7.4.5)
%&-line parsing enabled.
(./1.latex{/usr/share/texmf/pdftex/config/pdftex.cfg}
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
ohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/config/graphics.cfg)
(/usr/share/texmf/tex/latex/graphics/pdftex.def)) (./1.aux)
(/usr/share/texmf/tex/context/base/supp-pdf.tex
(/usr/share/texmf/tex/context/base/supp-mis.tex
loading : Context Support Macros / Missing
)
loading : Context Support Macros / PDF
) (./lily-1192095933.tex (/usr/share/lilypond/2.0.1/tex/lilyponddefs.tex
(/usr/share/lilypond/2.0.1/tex/feta20.tex)
(/usr/share/lilypond/2.0.1/tex/lily-pdf-defs.tex))
! Undefined control sequence.
<argument> ...n 54.6881 \outputscale \embeddedps
{ -0.0687 4.5803 0.4800 dr...
l.78 }
%
? x
No pages of output.
Transcript written on 1.log.
------------------------------------------------------------------------
\documentclass[a4paper]{article} \begin{document}
In a lilypond-book document, you can freely mix music and text. For example: \begin{lilypond} \score { \notes \relative c' { c2 g'2 \times 2/3 { f8 e d } c'2 g4 } } \end{lilypond} Notice that the music line length matches the margin settings of the document.
If you have no \verb+\score+ block in the fragment, \texttt{lilypond-book} will supply one:
\begin{lilypond} c'4 \end{lilypond}
In the example you see here, two things happened: a \verb+\score+ block was added, and the line width was set to natural length. You can specify many more options using \LaTeX style options in brackets:
\begin[verbatim,11pt,singleline, fragment,relative,intertext="hi there!"]{lilypond} c'4 f bes es \end{lilypond}
\texttt{verbatim} prints the LilyPond code in addition to the graphical score, \texttt{11pt} selects the default music size, \texttt{fragment} adds a score block, \texttt{relative} uses relative mode for the fragment, and \texttt{intertext} specifies what to print between the \texttt{verbatim} code and the music.
If you want to include large examples into the text, it may be more convenient to put the example in a separate file:
% \lilypondfile[printfilename]{sammartini.ly}
The \texttt{printfilename} option adds the file name to the output.
\end{document}
------------------------------------------------------------------------
This is pdfTeXk, Version 3.14159-1.10b (Web2C 7.4.5) (format=pdflatex 2004.3.18) 22 MAR 2004 17:49 %&-line parsing enabled. **1.latex (./1.latex{/usr/share/texmf/pdftex/config/pdftex.cfg} LaTeX2e <2001/06/01> Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n ohyphenation, loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2001/04/21 v1.4e Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size10.clo File: size10.clo 2001/04/21 v1.4e Standard LaTeX file (size option) ) [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] \abovecaptionskip=\skip41 \belowcaptionskip=\skip42 \bibindent=\dimen102 ) (/usr/share/texmf/tex/latex/graphics/graphics.sty Package: graphics 2001/07/07 v1.0n Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texmf/tex/latex/graphics/trig.sty Package: trig 1999/03/16 v1.09 sin cos tan (DPC) ) (/usr/share/texmf/tex/latex/config/graphics.cfg File: graphics.cfg 2001/08/31 v1.1 graphics configuration of teTeX/TeXLive ) Package graphics Info: Driver file: pdftex.def on input line 80.
(/usr/share/texmf/tex/latex/graphics/pdftex.def File: pdftex.def 2002/06/19 v0.03k graphics/color for pdftex [EMAIL PROTECTED] )) (./1.aux) \openout1 = `1.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5.
(/usr/share/texmf/tex/context/base/supp-pdf.tex
(/usr/share/texmf/tex/context/base/supp-mis.tex
loading : Context Support Macros / Missing
\protectiondepth=\count88
\scratchcounter=\count89
\scratchtoks=\toks14
\scratchdimen=\dimen103
\scratchskip=\skip43
\scratchmuskip=\muskip10
\scratchbox=\box26
\scratchread=\read1
\scratchwrite=\write3
\zeropoint=\dimen104
\minusone=\count90
\thousandpoint=\dimen105
\emptytoks=\toks15
\nextbox=\box27
\nextdepth=\dimen106
\everyline=\toks16
\!!counta=\count91
\!!countb=\count92
\recursecounter=\count93
)
loading : Context Support Macros / PDF
\nofMPsegments=\count94
\nofMParguments=\count95
\everyMPtoPDFconversion=\toks17
) (./lily-1192095933.tex (/usr/share/lilypond/2.0.1/tex/lilyponddefs.tex
(/usr/share/lilypond/2.0.1/tex/feta20.tex)
(/usr/share/lilypond/2.0.1/tex/lily-pdf-defs.tex)
\outputscale=\dimen107
\scoreshift=\dimen108
)
! Undefined control sequence.
<argument> ...n 54.6881 \outputscale \embeddedps { -0.0687 4.5803 0.4800 dr...
l.78 }
%
? x
Here is how much of TeX's memory you used:
1014 strings out of 10437
12687 string characters out of 1190233
54654 words of memory out of 1000001
4065 multiletter control sequences out of 10000+50000
4533 words of font info for 17 fonts, out of 500000 for 1000
14 hyphenation exceptions out of 1000
23i,6n,17p,198b,93s stack positions out of 300i,100n,500p,50000b,4000s
0 PDF objects out of 65536
0 named destinations out of 20000
0 words of extra memory for PDF output out of 65536
No pages of output.
------------------------------------------------------------------------
_______________________________________________ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
-- ============================================= Mats Bengtsson Signal Processing Signals, Sensors and Systems Royal Institute of Technology SE-100 44 STOCKHOLM Sweden Phone: (+46) 8 790 8463 Fax: (+46) 8 790 7260 Email: [EMAIL PROTECTED] WWW: http://www.s3.kth.se/~mabe =============================================
_______________________________________________ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user