lilypond-user
[Top][All Lists]
Advanced

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

Re: PDF file gets "-1" appended


From: Valentin Petzel
Subject: Re: PDF file gets "-1" appended
Date: Tue, 27 Jun 2023 11:33:46 +0200

Hello Knute,

I do not think this behaviour is particularly weird, rather the input is 
weird.

Using \book is telling Lilypond you want to generate a new PDF. So there 
should be no reason to enclose scores that only produce MIDI into a \book 
clause. And if you do I  think it should not be unexpected for Lilypond to act 
the way we ask it to. One might argue that Lilypond should be intelligent 
enough to filter out such cases, but this is a non trivial matter which would 
increase the complexity of the code in question significantly.

As this requires effort and will increase the probability of bugs (and at the 
same time make resolving them harder) and as this would not really have any 
benefit I do not think this is something we should go for.

The behaviour in question can even be triggered by including an empty \book { 
} clause, and doing something like this

\score { c' } % <- count 3
\book { } % <- count 0
\book { } % <- count 1
\book {
  \score { d' }
} % <- count 2

will affect the count of the resulting PDF.

Cheers,
Valentin

Am Dienstag, 27. Juni 2023, 01:39:01 CEST schrieb Knute Snortum:
> I've run into some odd behavior in LilyPond.  If your PDF-only is a score
> but your MIDI-only is a separate  book, the PDF file gets "-1" appended to
> the file name.  So for instance, with this code:
> 
> File name: test.ly
> 
> %%%
> \version "2.25.6"
> 
> theNotes = { c'4 4 4 4 }
> 
> \score {
>   \new Staff \theNotes
>   \layout {}
> }
> 
> \book {
>   \score {
>     \new Staff \theNotes
>     \midi {}
>   }
> }
> %%%
> 
> ...you get two files, one called "test-1.pdf" and another called
> "test.midi".  The work-around is to use \bookoutputName and name one of the
> files something other than "test", but ideally I would want "test.pdf" and
> "test.midi" as file names.
> 
> --
> Knute Snortum

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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