lilypond-user
[Top][All Lists]
Advanced

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

Re: Centering Systems


From: josh
Subject: Re: Centering Systems
Date: Mon, 15 Aug 2022 12:28:32 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0

Thanks for helping me out. I've attached some examples of what I am working with so far.

The ANSIAsuccessful files have the code that works correctly (minus all of the vertical collision, which I can deal with). What it shows best is that there is one system per page and the systems vertically fill the pages.

The ANSICunccessful files show that there are multiple systems per page with and the systems are all bunched together.

The finishedexample pdf shows what I have been able to achieve in the past using the ANSI A page size. I am moving to ANSI C page size for better spacing in general.

I hope all of this makes sense.


On 8/14/2022 20:00, Jean Abou Samra wrote:


Le 15/08/2022 à 01:41, josh a écrit :
I did set the paper size in the paper block using

#(set-paper-size "ansi c" 'landscape )

The only difference between previous, successful uses of this script and now is that I am using the ansi c page size instead of ansi a.



I don't see a problem on this example:

\version "2.23.12"

\paper {
  ragged-right = ##t
}

\paper {
  #(set-paper-size "ansi c" 'landscape)
}

#(define-markup-list-command (center-column-list-args layout props args)
  (markup-list?)
  #:properties ((baseline-skip))
  (let ((stils (interpret-markup-list layout props args))
        (line-width (ly:output-def-lookup layout 'line-width)))
  (space-lines baseline-skip
    (map
      (lambda (arg)
        (ly:stencil-translate-axis
          arg
          (/ (- line-width (interval-length (ly:stencil-extent arg X))) 2)
          X))
      stils))))

\markuplist \center-column-list-args \score-lines {
  \repeat unfold 100 { c'1 \break }
}




The issue must be somewhere else. Please post a minimal working example
so that we can diagnose the problem. See https://lilypond.org/tiny-examples.html
about how to create it.

By the way, this snippet can be simplified a lot:

\version "2.22.2"

#(define-markup-command (page-center layout props arg) (markup?)
   (interpret-markup layout props #{ \markup \fill-line { #arg } #}))

\markuplist
%\override #'(baseline-skip . 20)
\column-lines \page-center \score-lines {
  \repeat unfold 100 { c'1 \break }
  \layout { ragged-right = ##t }
}


Best,
Jean

Attachment: ansiasuccessful.ly
Description: Text Data

Attachment: ansiasuccessful.pdf
Description: Adobe PDF document

Attachment: ansicunsuccessful.ly
Description: Text Data

Attachment: ansicunsuccessful.pdf
Description: Adobe PDF document

Attachment: finishedexample.pdf
Description: Adobe PDF document


reply via email to

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