Re: Centering Systems
Le 15/08/2022 à 18:28, josh a écrit : 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. OK, I've opened a bug report about this: https://gitlab.com/lilypond/lilypond/-/issues/6407 And I suggest a completely different solution to center the systems, sidestepping the issue: \version "2.22.2" \paper { ragged-right = ##t indent = 0 short-indent = 0 } \layout { \context { \Score %% Can't use a callback for line-break-system-details because it is sometimes %% read before line breaking, for alignment-distances. Even after-line-breaking %% can be too early for the System's X-extent due to things like system start %% delimiters which trigger page layout prematurely. \override NonMusicalPaperColumn.stencil = #(lambda (grob) (let* ((sys (ly:grob-system grob)) (ext (ly:grob-extent sys sys X)) (len (interval-length ext)) (layout (ly:grob-layout grob)) (width (ly:output-def-lookup layout 'paper-width)) (left-margin (ly:output-def-lookup layout 'left-margin)) (off (- (* 1/2 (- width len)) left-margin)) (det (ly:grob-property grob 'line-break-system-details))) (ly:grob-set-property! grob 'line-break-system-details (acons 'extra-offset (cons off 0) det))) #f) } } { #@(map (lambda (i) #{ \repeat unfold #i { c'1 \noBreak } \break #}) (cdr (iota 15))) } I tested it on the score you sent me privately and it seems to work. Best, Jean
Re: Centering Systems
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
Re: Centering Systems
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. On 8/14/2022 2:29, Hans Aikema wrote: On 14 Aug 2022, at 04:58, josh wrote: Hello. ... It worked great. I use it for a very specific circumstance for some of the music I engrave. Since that time, I have moved to using ANSI C paper size (11" x 17") and now the systems do not fill to the bottom of the page. The problem is, I have never gotten the hang of scripts and I don't quite know what I am looking at. Which values in the script should I update to allow the systems to vertically fill the new page size? You did set the appropriate paper size (lilypond defaults to A4)? Or did you only move to using it as the goal for the printouts? Changing paper size is documented at https://lilypond.org/doc/v2.22/Documentation/notation/paper-size-and-automatic-scaling#setting-the-paper-size Besides the paper-size there are variables that might influence the vertical layout of your score when used. https://lilypond.org/doc/v2.22/Documentation/notation/fixed-vertical-spacing-paper-variables https://lilypond.org/doc/v2.22/Documentation/notation/flexible-vertical-spacing-paper-variables If you have 1-page scores and it happened to vertically fit you previous page size you might need to set the ragged-last-bottom to false (it's true by default)
Re: Centering Systems
> On 14 Aug 2022, at 04:58, josh wrote: > > Hello. > > ... > It worked great. I use it for a very specific circumstance for some of the > music I engrave. Since that time, I have moved to using ANSI C paper size > (11" x 17") and now the systems do not fill to the bottom of the page. The > problem is, I have never gotten the hang of scripts and I don't quite know > what I am looking at. Which values in the script should I update to allow the > systems to vertically fill the new page size? You did set the appropriate paper size (lilypond defaults to A4)? Or did you only move to using it as the goal for the printouts? Changing paper size is documented at https://lilypond.org/doc/v2.22/Documentation/notation/paper-size-and-automatic-scaling#setting-the-paper-size Besides the paper-size there are variables that might influence the vertical layout of your score when used. https://lilypond.org/doc/v2.22/Documentation/notation/fixed-vertical-spacing-paper-variables https://lilypond.org/doc/v2.22/Documentation/notation/flexible-vertical-spacing-paper-variables If you have 1-page scores and it happened to vertically fit you previous page size you might need to set the ragged-last-bottom to false (it's true by default)