On Wed, Jan 6, 2021 at 2:29 PM David Wright <lily...@lionunicorn.co.uk>
wrote:

> On Wed 06 Jan 2021 at 11:34:24 (-0500), Trevor Bača wrote:
> > On Tue, Jan 5, 2021 at 11:31 PM David Wright wrote:
> > > On Tue 05 Jan 2021 at 19:05:30 (-0500), Trevor Bača wrote:
> > > > I love the functionality for cropped SVGs! (Added back in 2019, or
> around
> > > > then?)
> > > >
> > > > Question: it appears that cropped multisystem SVGs remove all
> whitespace
> > > > between systems. Is this supposed to happen?
> > >
> > > I think that removing all the margins is the functionality "crop" is
> > > supposed to add to LP. To generate the equivalent cropped and packed
> > > image without this facility would be quite tedious to do (unless
> > > someone has a trick for doing it?).
> > >
> > > > %%% BEGIN %%%
> > > > […]
> > > > %%% END %%%
> > > >
> > > > Called with ...
> > > >    lilypond -dbackend=svg -dcrop test.ly
> > > > ... produces test.cropped.svg as attached here.
> > > >
> > > > Screenshot:
> > > > […]
> > > >
> > > > Seems like cropping should be around the edges of the image (rather
> than
> > > > between systems)?
> > >
> > > If you just want to crop the whole page image, you can do that easily
> > > at the end of a normal run with the usual utilities. If you require
> > > LP to set the entire score on a single page, just use a very long
> > > custom page (as in NR §4.1.2: width, then length).
> >
> > I'm sorry; I don't understand.
> >
> > What I want Lily to do: remove whitespace from the *edges* of an SVG.
>
> As I said, you run LP as normal, and then trim to taste. So, taking
> your example, I ran it with
> $ lilypond-2.21.80-1.linux-64/bin/lilypond --svg -dno-point-and-click
> Bača.ly
> and then edited the first line of Bača.svg, resulting in Bača-trimmed.svg.
> The end of the first line is modified from
>  width="210.00mm" height="297.00mm" viewBox="0 0 119.5016 169.0094">
> to
>  width="192.00mm" height="297.00mm" viewBox="4.5 0 109.5016 169.0094">
> which I did by inspection. As you use SVG files in your workflow,
> I assume you can carry this out more easily and precisely¹ with some
> particular tool. (I'm PDF-centric myself.) I only considered X because
> I was inspecting the file on a landscape screen (and you didn't remove
> the tagline anyway).
>
> > What Lily actually does when -dcrop is set: removes whitespace from the
> > edges *and from between all systems* of an SVG.
>
> That's right, so that your file contains all the information,
> unencumbered by margins, ready for some sort of further processing.
> Obviously, I don't know what that will be in your case.
>
> It reminds me of those PNG files that you find in browsers' cache,
> which have a strip or grid of little images that are used internally,
> either as a toolbar, or displayed sequentially like a movie.
>
> > So my question is: is Lily supposed to remove whitespace from *between*
> > systems when -d[c]rop is set?
>
> AIUI yes. But this is policy: I await pronouncements from higher-ups.
>
> ¹ I believe the modifications need to be kept proportional, in order
>   to preserve the aspect ratio.
>

Hi David,

I really appreciate the responses, but I'm even more confused than before.

When you ran ...

$ lilypond-2.21.80-1.linux-64/bin/lilypond --svg -dno-point-and-click
Bača.ly

... why didn't you include the -dcrop option?


-- 
Trevor Bača
www.trevorbaca.com
soundcloud.com/trevorbaca

Reply via email to