[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rendering cropped SVG
From: |
David Wright |
Subject: |
Re: Rendering cropped SVG |
Date: |
Mon, 14 Sep 2015 21:02:20 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Quoting address@hidden (address@hidden):
> I forgot: My file is just the minimum to test if Lilypond can do what I want
> it to do.
>
> \pointAndClickOff
>
> \relative {
> c' d e f g f e d
> c' d e f a a b d
> c' d e f a a b d
> }
>
> \version "2.18.2"
I typeset music fragments for insertion into LuaLaTeX files, so I
generate .pdf files and then crop them. My .ly source is built up from
quite a few includes, and processed with bash functions (on Debian)
but I've processed this minimal fragment with the same utilities:
\version "2.18.2"
\relative {
c' d e f g f e d
c' d e f a a b d
c' d e f a a b d
}
\header { tagline = ##f }
\paper { indent = 0 \mm }
$ lilypond -dno-point-and-click -drelative-includes --include="$HOME/LilyLib"
foo.ly
$ pdfcrop --margins 1 foo.pdf bar.pdf
$ pdf2svg bar.pdf foo.svg
pdfcrop is from texlive in Debian's texlive-extra-utils
pdf2svg homepage is at http://www.cityinthesky.co.uk/pdf2svg.html
Filesizes:
141 foo.ly
18078 foo.pdf
17158 bar.pdf
39154 foo.svg
I checked the SVG with inkscape and it looks ok, as does the PDF.
I also ran your PNG command line:
7454 foo.png
but I haven't looked at why the output has over a bar's width of
whitespace at the right side. I don't use PNGs anyway because they're
blurry, whereas PDFs (and the SVGs) remain crisp whatever the size.
I then added \break at the midpoint of the notes and reran everything.
The SVG is complete, and it also happens to fix the PNG.
pdfcrop handles multiple pages; pdf2svg has to process a page at a time.
Cheers,
David.
- Rendering cropped SVG, potoroo, 2015/09/14
- Re: Rendering cropped SVG, Simon Albrecht, 2015/09/14
- Message not available
- Re: Rendering cropped SVG, Simon Albrecht, 2015/09/14
- Re: Rendering cropped SVG, potoroo, 2015/09/14
- Re: Rendering cropped SVG, potoroo, 2015/09/14
- Re: Rendering cropped SVG,
David Wright <=
- Re: Rendering cropped SVG, potoroo, 2015/09/15
- Re: Rendering cropped SVG, Simon Albrecht, 2015/09/15
- Re: Rendering cropped SVG, potoroo, 2015/09/15
- Re: Rendering cropped SVG, Simon Albrecht, 2015/09/15
- Re: Rendering cropped SVG, potoroo, 2015/09/15
- Re: Rendering cropped SVG, Simon Albrecht, 2015/09/15
- Re: Rendering cropped SVG, Wols Lists, 2015/09/15
- Re: Rendering cropped SVG, potoroo, 2015/09/15
- Re: Rendering cropped SVG, David Wright, 2015/09/15
- Re: Rendering cropped SVG, potoroo, 2015/09/15