Le mercredi 29 mars 2023 à 22:56 -0600, Jeff Olson a écrit : > I've got to generate a thousand+ cropped SVG files with specified file names > from one lilypond compilation, so I'm wrapping each score in a \book with > its own \bookOutputName as in this MWE: > > \version "2.24.1" > #(ly:set-option 'backend 'cairo) > #(ly:set-option 'separate-page-formats 'svg) > #(ly:set-option 'use-paper-size-for-page #f) > #(ly:set-option 'point-and-click #f) > \book { > \bookOutputName "Foo" > { f' } > } > \book { > \bookOutputName "Abc" > { a' } > } > \book { > \bookOutputName "Bar" > { b' } > } > > But the SVG files all have the extra -1 suffix as though there were > additional > files from the same book that would collide: > > 32 -rwxrwxrwx+ 1 J None 32199 Mar 29 22:25 Foo-1.svg* > 32 -rwxrwxrwx+ 1 J None 32190 Mar 29 22:25 Abc-1.svg* > 32 -rwxrwxrwx+ 1 J None 32231 Mar 29 22:25 Bar-1.svg* > > My MIDI files don't have this problem since they only add a suffix on > **subsequent** files with the same base name, and there's only one per book. > > These "-1" suffices are messing with my URLs for the SVG files, > so I'd appreciate any ideas on how to get rid of them. Thx.
They are there for good reason. If any of your `\book`s got output on multiple pages, there would indeed be multiple files output. If you never want separate pages, you should not use `separate-page-formats` but `tall-page-formats`. By the way, in addition to simplifying automation (like lilypond-book), having `-1.svg` even on the first page makes it possible to use both `separate-page-formats` and `tall-page-formats` at the same time. Jean
signature.asc
Description: This is a digitally signed message part