lilypond-user
[Top][All Lists]
Advanced

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

Re: Piping contents of SVG directly to stdout


From: David Wright
Subject: Re: Piping contents of SVG directly to stdout
Date: Tue, 19 Jul 2022 09:40:54 -0500

On Mon 18 Jul 2022 at 21:35:11 (+0200), Silvain Dupertuis wrote:
> Le 18.07.22 à 20:33, David Wright a écrit :
> > On Mon 18 Jul 2022 at 11:28:26 (-0500), DoubleFelix wrote:

> > > Actually this is exactly what I'm trying to do. My current setup uses a
> > > python library called svgpathtools to get the bounding box, then I do some
> > > basic manipulation of the width, height, and viewbox parameters to trim 
> > > all
> > > of the excess whitespace out. Although I am very interested in  can
> > > do this without any additional utilities.

> It'll be interesting to be able to ouput SVG directly to get snippet
> which can be integrated into other documents.

[Note to Jean Abou Samra: sorry, yes, I overlooked including the
command line, which was only given in the web page referred to.]

> Actually, one can get SVG files using Inkscape : import the PDF file
> (using PopplerCairo orption),  edit at will, select parts, crop, etc.
> and save as SVG.
> 
> This is what I did for this experimental page 
> <https://math.silvain-dupertuis.org/musique/Test-audition-fr%C3%A9quences.html>.
> I used one LilyPond file, produced one PDF page output, which I edited
> with Inkscpae to cut it into 3 SVG files to include in my HTML page.

Being document- rather than web-oriented, and having been using …TeX
for over 35 years, my workflow was [Encapsulated]PostScript- and is
now PDF-based. As for the cropping LilyPond output, pdfcrop has been
around for 20 years, longer than I've been using LP.

Trying to typeset anything more than plain vanilla scores, just using
LilyPond itself, has never been my priority. I generate any
surrounding textual matter in …TeX, and then insert the cropped
LilyPond PDFs into that, using either bash or Python scripts,
depending on the complexity (eg, automatic transposition of
Anglican chants).

But I can understand that others are more web-oriented, and I've
read that browsers can handle SVGs better than PDFs. I don't know
what the OP's workflow/platforms/desired outcomes are.

Cheers,
David.



reply via email to

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