lilypond-user
[Top][All Lists]
Advanced

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

Re: lilypond-book shifts music right relative to text


From: Arvid Grøtting
Subject: Re: lilypond-book shifts music right relative to text
Date: Thu, 12 Oct 2006 20:55:24 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Laura Conrad <lconrad <at> laymusic.org> writes:

> Has anyone figured out a way around this?

A workaround, yes:

For each EPS file, between running lilypond-book and tex, replace the first
(and negative) number in the BoundingBox comment with 0.

On Unix (including Mac), you could do this step thus:

    sed -i 's/%%BoundingBox: -*[1-9][0-9]*/%%BoundingBox: 0/' lily*eps

Yes, it's an ugly hack.  Here's why it works:

Lilypond-book produces EPS files where some point on the left edge of
the staff has coordinates (0, 0).  The first 0 here would be an ideal
candidate for horisontal aligment within the TeX file.

Some stuff extends to the left of this: bar numbers, most notably.

The BoundingBox PS comment describes where in the EPS file there's any
ink.  This includes anything printed to the left of the left edge of
the staff line.

LaTeX, when deciding where to place an EPS graphic, uses the
BoundingBox comment.  When not given a bounding box in the
\includegraphics command, that's how LaTeX knows where there's any
graphics to place.

Now, I guess lilypond-book could be modified to give an explicit *and
deliberately misleading* BoundingBox argument to the \includegraphics
command in order to get the correct placement without compromising the
EPS file.  That would, IMHO, be a better and more permanent solution.

Cheers,

-- 

Arvid






reply via email to

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