On Fri, 20 Mar 2020 at 23:04, Timothy Lanfear <timo...@lanfear.me> wrote:
> On 20/03/2020 16:17, Peter Crighton wrote: > > I haven’t run LilyPond with scripts before. If there’s any > > documentation or code examples I should look at, I’d appreciate being > > pointed in the right direction. > > > > IOW, use a scripting language to script, and LP to typeset music. > > > > > > Sound advice. > > On the other hand, does an approach like this help? > > \version "2.20.0" > > basicdistance = #(define-scheme-function (n) (integer?) > #{ \paper { system-system-spacing.basic-distance = #n } #}) > > linewidth = #(define-scheme-function (n) (integer?) > #{ \paper { line-width = #(ly:cm n) } #}) > > \paper { > indent = 0 > } > > \linewidth 10 > \basicdistance 30 > \new Staff { > \relative c' { > c1 \break > c1 > } > } > Actually, what Kevin wrote earlier works for me, contrary to what I thought at first. On Thu, 19 Mar 2020 at 22:29, Kevin Barry <barr...@gmail.com> wrote: > I accomplish something similar by putting paper definitions into > various .ily files. Then just include the ones I want with \include. > It seems it's OK to have multiple \paper blocks as a result of many > \includes. Have you tried that? I think when I first tried it, in the included files I still had variables defined as a paper block and not _just_ the paper block inside them. Something like this works well: \book { \score { … } \include "paperI.ily" \include "paperII.ily" \include "paperIII.ily" } Where the included paper files are just a paper block: \paper { … } So, thanks all around! I still probably will look into the script thing in the future, that seems handy for producing several PDFs from the same source. -- Peter Crighton | Musician & Music Engraver based in Mainz, Germany http://www.petercrighton.de