lilypond-devel
[Top][All Lists]
Advanced

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

Fw: problem with LSR snippet #602


From: Werner LEMBERG
Subject: Fw: problem with LSR snippet #602
Date: Mon, 23 Jan 2023 08:36:03 +0000 (UTC)


Any idea what could be done?  The manual compilation includes the EPS
snippet, LSR doesn't...  (The different line lengths in the images
below are not relevant.)


    Werner

--- Begin Message --- Subject: Re: problem with LSR snippet #602 Date: Sun, 22 Jan 2023 08:49:32 +0100

> On 21 Jan 2023, at 19:36, Werner LEMBERG <wl@gnu.org> wrote:
> 
> 
> Sebastiano,
> 
> 
> please have a look at
> 
>  https://gitlab.com/lilypond/lilypond/-/merge_requests/1817#note_1248084959
> 
> Can you explain why the LSR displays this snippet differently than a
> manual compilation?  Attached is what I get if I compile this with
> 
> ```
> lilypond clip-systems.ly
> ```
> 

It is highly pathological. Lilypond invokes gs even with -dbackend=eps, so 
lilypond dies during compilation (because of the cage) and never emits 
clip-system.eps. So UpdateImages uses clips-system-1.eps, which is emitted 
first and which contains only the first part.

With -dbackend=eps, gs must not be invoked. This is something to be fixed by 
the lilypond developers.

Ciao,

                                                         seba


--- End Message ---
%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Snippet Repository
%% (http://lsr.di.unimi.it).
%%
%% Make any changes in the LSR itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.25.1"

\header {
  lsrtags = "paper-and-layout"

  texidoc = "
This code shows how to clip (extract) snippets from a full score.

This file needs to be run separately with @code{-dclip-systems}; the
snippets page may not adequately show the results. The result will be
files named
@samp{@emph{base}-from-@emph{start}-to-@emph{end}[-@emph{count}].eps}.

If system starts and ends are included, they include extents of the
System grob, e.g., instrument names.

Grace notes at the end point of the region are not included.

Regions can span multiple systems.  In this case, multiple EPS files
are generated.
"

  doctitle = "Clip systems"
} % begin verbatim


#(ly:set-option 'clip-systems)
#(ly:set-option 'separate-page-formats 'ps)
#(define output-suffix "1")

origScore = \score {
  \relative c' {
    \new Staff \with { instrumentName = "Instrument" }
    c1
    d1
    \grace c16 e1
    \key d \major
    f1 \break
    \clef bass
    g,1
    fis1
  }
}

\book {
  \score {
    \origScore
    \layout {
      % Each clip-region is a (START . END) pair
      % where both are rhythmic-locations.

      % (make-rhythmic-locations BAR-NUMBER NUM DEN)
      % means NUM/DEN whole-notes into bar numbered BAR-NUMBER

      clip-regions = #(list
      (cons
       (make-rhythmic-location 2 0 1)
       (make-rhythmic-location 4 0 1))

      (cons
       (make-rhythmic-location 0 0 1)
       (make-rhythmic-location 4 0 1))

      (cons
       (make-rhythmic-location 0 0 1)
       (make-rhythmic-location 6 0 1))
      )
    }
  }
}

#(ly:set-option 'clip-systems #f)
#(ly:set-option 'separate-page-formats #f)
#(define output-suffix #f)

\book {
  \score { \origScore }
  \markup { \bold \fontsize #6 clips }
  \score {
    \lyrics {
      \markup { from-2.0.1-to-4.0.1-clip.eps }
      \markup {
        \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps"
                            (ly:parser-output-name)) }
    }
  }
}

PNG image

PNG image


reply via email to

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