Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Lilypond the paper size can be set to A4, A5, Letter and so forth. However I have only a short song, and I want to embed it lateron. Therefore the output from Lilypond must be cropped somehow.

Is there a possibility to let Lilypond itself do this? Some setting to the \paper{} block, perhaps?

share|improve this question
up vote 3 down vote accepted
  • If you want only the first system, you can use the -dpreview command-line option.
  • If you want multiple systems:

    \include ""

    \paper { oddFooterMarkup = ##f }

  • Have ImageMagick convert autocrop it with the -trim option, e.g. via a shell script.

share|improve this answer

I managed this with running:

lilypond -dbackend=eps -dresolution=600 --png

And a paper section within the like this:

\paper {
  indent = 0\mm
  line-width = 110\mm
  oddHeaderMarkup = ""
  evenHeaderMarkup = ""
  oddFooterMarkup = ""
  evenFooterMarkup = ""
share|improve this answer
Worked perfectly for me, with the great advantage that no third party package is necessary. I've created a definition and included it. – neves Sep 5 '14 at 3:03

From the Lilypond manual:

Extra sizes may be added by editing the definition for paper-alist in the initialization file scm/paper.scm.

You can therefore add your own page sizes to the default ones.

share|improve this answer
Yes, I read that, too, but actually I have several songs, and doing trial-and-error with each to find the correct height and then editing paper.scm for each is a bit of a hassle. Auto-cropping to the minimum width/height would be much, much more useful. – Boldewyn Jan 18 '10 at 14:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .