Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

3 Answers

up vote 2 down vote accepted
+100
  • If you want only the first system, you can use the -dpreview command-line option.
  • If you want multiple systems:

    \include "lilypond-book-preamble.ly"

    \paper { oddFooterMarkup = ##f }

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

share|improve this answer
add comment

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
1  
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
add comment

I managed this with running:

lilypond -dbackend=eps -dresolution=600 --png FILE.ly

And a paper section within the FILE.ly like this:

\paper {
  indent = 0\mm
  line-width = 110\mm
  oddHeaderMarkup = ""
  evenHeaderMarkup = ""
  oddFooterMarkup = ""
  evenFooterMarkup = ""
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.