When trying to use babel lilypond for music engraving inside org, I have got the following problem: The paper size used by lilypond is always a full page. But what I want is a minimal, growing paper size, suitable for rendering only one or more staffs and not using a full page for that.
What I have tried so far is the following:
#+name: lily_init
#+begin_src lilypond
#(set! paper-alist (cons '("preview" . (cons (* 210 mm) (* 20 mm))) paper-alist))
\paper {
#(set-paper-size "preview")
}
\header{ tagline="" }
#+end_src
#+begin_src lilypond :file mixolydian.png :noweb yes
<<lily_init>>
\relative c' {a b c}
#+end_src
Which works, but is not exactly what I expected, as I have to create a paper-size for each staff count I am using.
The example from the ob-lilypond page does not render correctly for me (their example PDF looks fine though). If I try to render it, it renders one lilypond example per page, instead of placing them inline. See: Lilypond Example Org File Lilypond Example PDF
Is this the expected behaviour? Am I doing something wrong? Should I try to fix ob-lilypond?