lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bookOutputName still gets "-1" suffix added to SVG file names


From: Jeff Olson
Subject: Re: bookOutputName still gets "-1" suffix added to SVG file names
Date: Thu, 30 Mar 2023 23:09:58 -0600
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1

On 3/30/2023 7:05 PM, Jean Abou Samra wrote:
I don't understand the problem you're having. Is my suggestion of
using -dtall-page-formats not sufficient for your use case?

If you expect a 1-to-1 mapping between SVG files and MIDI files,
you can just put each piece into its own \book, with the
\bookOutputName of your choice, and compile it with
-dtall-page-formats=svg, and that should give you your desired
output files without suffixes.

Thanks, Jean.

That indeed does produce 1-to-1 mappings without suffices:

\version "2.24.1"
#(ly:set-option 'backend 'cairo)
#(ly:set-option 'tall-page-formats 'png,svg)
#(ly:set-option 'use-paper-size-for-page #f)
#(ly:set-option 'point-and-click #f)
\header { tagline = ##f }
\book {
  \bookOutputName  "Foo"
  \score { { f' } \layout { } \midi { } }
}
\book {
  \bookOutputName  "Abc"
  \score { { a' } \layout { } \midi { } }
}
\book {
  \bookOutputName  "Bar"
  \score { { b' } \layout { } \midi { } }
}

Each book has a layout and a midi, with the layout rendered both
as png and svg, properly cropped and with no -1 suffix in any file names:

-rwxrwxrwx+ 1 J None     451 Mar 30 21:37  MWE-SVG-tall.ly
-rwxrwxrwx+ 1 J None     119 Mar 30 21:37  Foo.mid
-rwxrwxrwx+ 1 J None    6498 Mar 30 21:37  Foo.svg
-rwxrwxrwx+ 1 J None    2421 Mar 30 21:37  Foo.png
-rwxrwxrwx+ 1 J None     119 Mar 30 21:37  Abc.mid
-rwxrwxrwx+ 1 J None    6490 Mar 30 21:37  Abc.svg
-rwxrwxrwx+ 1 J None    2401 Mar 30 21:37  Abc.png
-rwxrwxrwx+ 1 J None     119 Mar 30 21:37  Bar.mid
-rwxrwxrwx+ 1 J None    6530 Mar 30 21:37  Bar.svg
-rwxrwxrwx+ 1 J None    2377 Mar 30 21:37  Bar.png

Here is Bar.svg

Bar.svg

and Bar.png (at default low resolution of 101)

Bar.png

Both are properly cropped, as opposed to whole (tall?) pages.


I think what threw me off using tall-page-formats were conclusions on

https://lists.gnu.org/archive/html/lilypond-user/2023-03/msg00029.html
https://lists.gnu.org/archive/html/lilypond-user/2023-02/msg00070.html
https://gitlab.com/lilypond/lilypond/-/issues/6235

saying "this combination of options appears to produce cropped output"
   #(ly:set-option 'separate-page-formats 'eps,png,pdf)
   #(ly:set-option 'use-paper-size-for-page #f)

Going back to the manuals didn't help explain tall-page-formats:

The 2.24 usage manual defines tall-page-formats as
   "Comma-separated list of formats (svg, pdf, png, or eps)
   to use for the ‘tall page’ image in lilypond-book."

But I couldn't find "tall page" in the usage pages for lilypond-book
nor in the LilyPond index for either the usage manual or NR.

I did find this oblique mention near the end of the 2.24 Changes doc
(in the Miscellaneous Improvements section) regarding "the default of
the aux-files program option changed to #f" (I never use that option):

   "The formats for lilypond-book images can be set separately for
   the tall page image (typically PNG for HTML output) and per-system
   images (typically, EPS or PDF for printed output) with the -d
   sub-options -dtall-page-formats and -dseparate-page-formats respectively."

Based on these limited descriptions and discussions, and my requirement
for properly cropped multi-system scores in separate image files, as
opposed to un-cropped whole pages (tall pages?), I'd still think
separate-page-formats should work.

Maybe the documentation of separate- and tall-page-formats
should elaborate more.

Or am I still missing the one place where that explanation is provided?

Thanks for your patience!

Jeff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]