lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: latex with PNG images using lilypond-book?


From: Francisco Vila
Subject: Re: latex with PNG images using lilypond-book?
Date: Tue, 30 Apr 2013 20:31:54 +0200

2013/4/30 David Kastrup <address@hidden>:
> Francisco Vila <address@hidden> writes:
>
>> 2013/4/30 Julien Rioux <address@hidden>:
>>> On 30/04/2013 5:56 AM, Francisco Vila wrote:
>>>>
>>>> In theory yes, but does this make lilypond-book generate a myfile.tex
>>>> that includes the PNG images? I think not.
>>>>
>>>
>>> The generated .tex file does not specify the file extension for the
>>> imported
>>> graphic files, so that it is up to (pdf)latex to pick the preferred
>>> format.
>>
>> It seems both PDF and EPS are generated, so what should I do to force
>> latex to pick the PNG and not the EPS? For HTML it looks easy: <img
>> src="file.png" /> does pick the PNG file, but you're right,
>> \includegraphics{file} lets latex choose. I really, really thought
>> lilypond-book made this easy. Instead, do I have to manually remove
>> all EPS files by hand? It doesn't sound good.
>
> I don't see the problem.  If you call pdflatex, it will not be
> interested in EPS files.  And you stated you did not want to call LaTeX
> anyway, instead using some ebook converter.

True, but I wanted to start from a working latex file with PNG images
in it, before I passed it through the converter. Neither PDF nor EPS
images are allowed in the final ebook, and the converter just converts
whatever I pass to it. My results so far are that the converted file
has no images except what I explicitly insert. And I think I've found
the problem. Two problems, actually.

One is: I had \includes in my initial tests. I managed to flatten the
document, but with tiny documents I did not bother to flatten them.
lilypond-book files have \input commands and therefore they are
flatten-needing.

The second problem is that lilypond-book generates per-system EPS with
names like cf/lily-481ba953-1.eps along with cf/lily-481ba953.eps (no
-1 here) whilst generated PNGs are just like cf/lily-481ba953.png. The
generated latex file tries to include the image with the -1 suffix and
no extension, so there is no matching PNG for that. My converter can
not guess it. And you can not switch freely between latex and pdftalex
for this reason. That, or I am doing it bad.

I use \usepackage{graphicx} and can manually insert PNG images with
.png extension \includegraphics{}, and it works.

Thank you, I'll perform more tests and will post my results.
-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]