Re: How to fix markup horizontal position relative to edge of page
I think this solution will work best for my purposes. My first thought about making the procedure only calculate the indent was "Why didn't I think of that?" Thanks for working through this with me. Jean, I like your solution, the only problem is that the right-margin applies to the markup as well, and I want the markup to extend all the way across the page. Thanks to everyone for their ideas. Ѫѯ 2023-04-11 Ѩё 14:40, juergen.gr...@xyz.de ѮѴё: > Ok. Wasn't aware of that. Still learning too... > I changed the procedure so it is just calculating the indent and not > creating a layout block... (more code in the layout block necessary) > > > > %% > \version "2.24.0" > > > #(define (get-indent lw) > (let* ( > (pw (ly:output-def-lookup $defaultpaper 'paper-width)) > (lmd (ly:output-def-lookup $defaultpaper 'left-margin-default)) > (rmd (ly:output-def-lookup $defaultpaper 'right-margin-default))) > ; calculate indent for use in layout blocks > (/ (- pw lmd rmd lw) 2))) > > > \score { > \layout { > lineWidth = 120 > ind = #(get-indent lineWidth) > line-width = #(+ lineWidth ind) > indent = \ind > short-indent = \ind > > > % some other stuff... > } > \repeat unfold 20 \relative c { c' d e f g a b } > } > > > \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua > incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. > Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto > leberkas." > %% > > > Not sure what is best practice here > > > > Juergen. > > > > >> -ursprüngliche Nachricht- >> Von: benja...@koine.gr >> Gesendet: 11.04.2023 16:59 Uhr >> An: juergen.gr...@xyz.de, lilypond-user@gnu.org >> Betreff: Re: How to fix markup horizontal position relative to edge of page > > > > >> I did try that, but in the output the the score appears twice since there >> are two layout blocks. Is there no way to merge them? >> >> Ѫѯ 2023-04-11 Ѩё 08:36, juergen.gr...@xyz.de ѮѴё: >> > This >> >> #{ >> >> line-width = #(+ lw ind) >> >> indent = #ind >> >> short-indent = #ind >> >> #} >> > is part of the scheme procedure. You can use lilypond syntax - put into >> > #{ ...#} - in scheme procedures. I create a new layout-block in the >> > procedure. You can not nest layout blocks but you can have parallel >> > layout-blocks. So copy the procedure-call into your score but not into >> > your own layout block: >> > >> > >> > \version "2.24.0" >> > >> > #(define (set-score-width lw) >> > (let* ( >> > (pw (ly:output-def-lookup $defaultpaper 'paper-width)) >> > (lmd (ly:output-def-lookup $defaultpaper 'left-margin-default)) >> > (rmd (ly:output-def-lookup $defaultpaper 'right-margin-default)) >> > (ind (/ (- pw lmd rmd lw) 2))) >> > >> > #{ \layout { >> > line-width = #(+ lw ind) >> > indent = #ind >> > short-indent = #ind >> > } #} )) % end of scheme code >> > >> > \score { >> > procedure call >> > #(set-score-width 120) >> > >> > your own layout block >> > \layout { >> > % do something >> > } >> > \repeat unfold 20 \relative c { c' d e f g a b } >> > } >> > \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua >> > incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. >> > Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto >> > leberkas." >> > >> > >> > >> > >> > >> > HTH, Juergen. >> > >> > >> > >> > >> > >> > >> > >> > >> >> -ursprüngliche Nachricht- >> >> Von: benja...@koine.gr >> >> Gesendet: 11.04.2023 16:14 Uhr >> >> An: juergen.gr...@xyz.de, lilypond-user@gnu.org >> >> Betreff: Re: How to fix markup horizontal position relative to edge of >> >> page >> > >> > >> >> Quick question, in the scores I am working on I already have a \layout >> >> block with several other settings within it. How can I insert just the >> >> line-width, indent, and short-indent settings into the already-existent >> >> \layout block without creating another one? If I try just >> >> >> >> #{ >> >> line-width = #(+ lw ind) >> >> indent = #ind >> >> short-indent = #ind >> >> #} >> >> >> >> for my LilyPond code block, it gives me the error "not a note name: >> >> line-width". >> >> Thanks for your Scheme expertise :) >> >> >> >> Ѫѯ 2023-04-11 Ѩё 07:38, Benjamin Bruce ѮѴё: >> >> > This is exactly what I needed. I figured it could be done with some >> >> > Scheme code, but that's beyond my knowledge. Thanks so much for your >> >> > help! >> >> > >> >> > Ѫѯ 2023-04-11 Ѩё 03:55, juergen.gr...@xyz.de ѮѴё: >> >> >> OK, this was not correct. There is a left-margin-default set and the >> >> >> indent does not shift the line but makes it shorter(?) Here is another >> >> >> approach: >> >> >> >> >> >> >> >> >> >> >> >> \version "2.24.0" >> >> >> >> >> >> #(define (set-score-width lw)
Re: How to fix markup horizontal position relative to edge of page
Le mercredi 12 avril 2023 à 11:31 -0700, Aaron Hill a écrit : > One option I did not see mentioned was putting the score into a markup > to horizontally center it: > > > asdf = \score { > \relative { c'4 d e f \break g a b c } > \layout { line-width = 4\in } > } > > \markup \fill-line { \null \score { \asdf } \null } > That is elegant indeed. Note, though, that it has other effects: for example, it will force all systems from the score to be on the same page (could be fixed using `\markuplist` and `\score-lines`), and it will make the spacing between systems governed by `markup-markup-spacing` rather than `system-system-spacing` (can't really be fixed AFAIK). signature.asc Description: This is a digitally signed message part
Re: How to fix markup horizontal position relative to edge of page
Hello all, I am trying to layout some documents where the score is centered on the page, and underneath it is some markup text that is aligned left, relative to the edge of the page. In some documents the score will be wider, in some it will be narrower, but the text below it should always be in the same horizontal position relative to the page. One option I did not see mentioned was putting the score into a markup to horizontally center it: asdf = \score { \relative { c'4 d e f \break g a b c } \layout { line-width = 4\in } } \markup \fill-line { \null \score { \asdf } \null } -- Aaron Hill
Re: How to fix markup horizontal position relative to edge of page
Le lundi 10 avril 2023 à 15:25 -0600, Benjamin Bruce a écrit : > Hello all, > I am trying to layout some documents where the score is centered on the page, > and underneath it is some markup text that is aligned left, relative to the > edge of the page. In some documents the score will be wider, in some it will > be narrower, but the text below it should always be in the same horizontal > position relative to the page. > > If I set line-width in the \paper block, it will be applied to everything, > and the markup will be aligned relative to the line-width. If I set > line-width in the \layout block, the markup is independent, but the score is > now left-aligned, not centered. > > I am attaching my (somewhat) tiny example in case this doesn't make sense. Is > there a way to accomplish what I'm trying to do, even if it's hacky? Thanks > for your help! How about this? ``` \version "2.24.1" markupLeftMargin = 10 musicLineWidth = 100 firstSystemIndent = 10 \paper { left-margin = #markupLeftMargin right-margin = #(* 1/2 (- paper-width musicLineWidth)) short-indent = #(- right-margin left-margin) indent = #(+ short-indent firstSystemIndent) } { c' \break c' } \markup "abc" ``` Essentially, the trick is not to use `line-width` at all, instead increasing `indent` and `short-indent` to compensate. Best, Jean signature.asc Description: This is a digitally signed message part
RE: Re: How to fix markup horizontal position relative to edge of page
Ok. Wasn't aware of that. Still learning too... I changed the procedure so it is just calculating the indent and not creating a layout block... (more code in the layout block necessary) %% \version "2.24.0" #(define (get-indent lw) (let* ( (pw (ly:output-def-lookup $defaultpaper 'paper-width)) (lmd (ly:output-def-lookup $defaultpaper 'left-margin-default)) (rmd (ly:output-def-lookup $defaultpaper 'right-margin-default))) ; calculate indent for use in layout blocks (/ (- pw lmd rmd lw) 2))) \score { \layout { lineWidth = 120 ind = #(get-indent lineWidth) line-width = #(+ lineWidth ind) indent = \ind short-indent = \ind % some other stuff... } \repeat unfold 20 \relative c { c' d e f g a b } } \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto leberkas." %% Not sure what is best practice here Juergen. -ursprüngliche Nachricht- Von: benja...@koine.gr Gesendet: 11.04.2023 16:59 Uhr An: juergen.gr...@xyz.de, lilypond-user@gnu.org Betreff: Re: How to fix markup horizontal position relative to edge of page I did try that, but in the output the the score appears twice since there are two layout blocks. Is there no way to merge them? Ѫѯ 2023-04-11 Ѩё 08:36, juergen.gr...@xyz.de ѮѴё: > This >> #{ >> line-width = #(+ lw ind) >> indent = #ind >> short-indent = #ind >> #} > is part of the scheme procedure. You can use lilypond syntax - put into > #{ ...#} - in scheme procedures. I create a new layout-block in the > procedure. You can not nest layout blocks but you can have parallel > layout-blocks. So copy the procedure-call into your score but not into > your own layout block: > > > \version "2.24.0" > > #(define (set-score-width lw) > (let* ( > (pw (ly:output-def-lookup $defaultpaper 'paper-width)) > (lmd (ly:output-def-lookup $defaultpaper 'left-margin-default)) > (rmd (ly:output-def-lookup $defaultpaper 'right-margin-default)) > (ind (/ (- pw lmd rmd lw) 2))) > > #{ \layout { > line-width = #(+ lw ind) > indent = #ind > short-indent = #ind > } #} )) % end of scheme code > > \score { > procedure call > #(set-score-width 120) > > your own layout block > \layout { > % do something > } > \repeat unfold 20 \relative c { c' d e f g a b } > } > \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua > incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. > Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto > leberkas." > > > > > > HTH, Juergen. > > > > > > > > >> -ursprüngliche Nachricht- >> Von: benja...@koine.gr >> Gesendet: 11.04.2023 16:14 Uhr >> An: juergen.gr...@xyz.de, lilypond-user@gnu.org >> Betreff: Re: How to fix markup horizontal position relative to edge of page > > >> Quick question, in the scores I am working on I already have a \layout block with several other settings within it. How can I insert just the line-width, indent, and short-indent settings into the already-existent \layout block without creating another one? If I try just >> >> #{ >> line-width = #(+ lw ind) >> indent = #ind >> short-indent = #ind >> #} >> >> for my LilyPond code block, it gives me the error "not a note name: line-width". >> Thanks for your Scheme expertise :) >> >> Ѫѯ 2023-04-11 Ѩё 07:38, Benjamin Bruce ѮѴё: >> > This is exactly what I needed. I figured it could be done with some >> > Scheme code, but that's beyond my knowledge. Thanks so much for your >> > help! >> > >> > Ѫѯ 2023-04-11 Ѩё 03:55, juergen.gr...@xyz.de ѮѴё: >> >> OK, this was not correct. There is a left-margin-default set and the >> >> indent does not shift the line but makes it shorter(?) Here is another >> >> approach: >> >> >> >> >> >> >> >> \version "2.24.0" >> >> >> >> #(define (set-score-width lw) >> >> (let* ( >> >> (pw (ly:output-def-lookup $defaultpaper 'paper-width)) >> >> (lmd (ly:output-def-lookup $defaultpaper 'left-margin-default)) >> >> (rmd (ly:output-def-lookup $defaultpaper 'right-margin-default)) >> >> (ind (/ (- pw lmd rmd lw) 2))) >> >> >> >> #{ \layout { >> >> line-width = #(+ lw ind) >> >> indent = #ind >> >> short-indent = #ind >> >> } #} )) >> >> >> >> \score { >> >> #(set-score-width 120) >> >> \repeat unfold 20 \relative c { c' d e f g a b } >> >> } >> >> >> >> \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua >> >> incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. >> >> Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto >> >> leberkas." >> >> >> >> >> >> >> >> Juergen. >> > > >> -ursprüngliche Nachricht Ende- -ursprüngliche
Re: How to fix markup horizontal position relative to edge of page
I did try that, but in the output the the score appears twice since there are two layout blocks. Is there no way to merge them? Ѫѯ 2023-04-11 Ѩё 08:36, juergen.gr...@xyz.de ѮѴё: > This >> #{ >> line-width = #(+ lw ind) >> indent = #ind >> short-indent = #ind >> #} > is part of the scheme procedure. You can use lilypond syntax - put into > #{ ...#} - in scheme procedures. I create a new layout-block in the > procedure. You can not nest layout blocks but you can have parallel > layout-blocks. So copy the procedure-call into your score but not into > your own layout block: > > > \version "2.24.0" > > #(define (set-score-width lw) > (let* ( > (pw (ly:output-def-lookup $defaultpaper 'paper-width)) > (lmd (ly:output-def-lookup $defaultpaper 'left-margin-default)) > (rmd (ly:output-def-lookup $defaultpaper 'right-margin-default)) > (ind (/ (- pw lmd rmd lw) 2))) > > #{ \layout { > line-width = #(+ lw ind) > indent = #ind > short-indent = #ind > } #} )) % end of scheme code > > \score { > procedure call > #(set-score-width 120) > > your own layout block > \layout { > % do something > } > \repeat unfold 20 \relative c { c' d e f g a b } > } > \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua > incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. > Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto > leberkas." > > > > > > HTH, Juergen. > > > > > > > > >> -ursprüngliche Nachricht- >> Von: benja...@koine.gr >> Gesendet: 11.04.2023 16:14 Uhr >> An: juergen.gr...@xyz.de, lilypond-user@gnu.org >> Betreff: Re: How to fix markup horizontal position relative to edge of page > > >> Quick question, in the scores I am working on I already have a \layout block >> with several other settings within it. How can I insert just the line-width, >> indent, and short-indent settings into the already-existent \layout block >> without creating another one? If I try just >> >> #{ >> line-width = #(+ lw ind) >> indent = #ind >> short-indent = #ind >> #} >> >> for my LilyPond code block, it gives me the error "not a note name: >> line-width". >> Thanks for your Scheme expertise :) >> >> Ѫѯ 2023-04-11 Ѩё 07:38, Benjamin Bruce ѮѴё: >> > This is exactly what I needed. I figured it could be done with some >> > Scheme code, but that's beyond my knowledge. Thanks so much for your >> > help! >> > >> > Ѫѯ 2023-04-11 Ѩё 03:55, juergen.gr...@xyz.de ѮѴё: >> >> OK, this was not correct. There is a left-margin-default set and the >> >> indent does not shift the line but makes it shorter(?) Here is another >> >> approach: >> >> >> >> >> >> >> >> \version "2.24.0" >> >> >> >> #(define (set-score-width lw) >> >> (let* ( >> >> (pw (ly:output-def-lookup $defaultpaper 'paper-width)) >> >> (lmd (ly:output-def-lookup $defaultpaper 'left-margin-default)) >> >> (rmd (ly:output-def-lookup $defaultpaper 'right-margin-default)) >> >> (ind (/ (- pw lmd rmd lw) 2))) >> >> >> >> #{ \layout { >> >> line-width = #(+ lw ind) >> >> indent = #ind >> >> short-indent = #ind >> >> } #} )) >> >> >> >> \score { >> >> #(set-score-width 120) >> >> \repeat unfold 20 \relative c { c' d e f g a b } >> >> } >> >> >> >> \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua >> >> incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. >> >> Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto >> >> leberkas." >> >> >> >> >> >> >> >> Juergen. >> > > >> -ursprüngliche Nachricht Ende-
RE: Re: How to fix markup horizontal position relative to edge of page
This #{ line-width = #(+ lw ind) indent = #ind short-indent = #ind #} is part of the scheme procedure. You can use lilypond syntax - put into #{ ...#} - in scheme procedures. I create a new layout-block in the procedure. You can not nest layout blocks but you can have parallel layout-blocks. So copy the procedure-call into your score but not into your own layout block: \version "2.24.0" #(define (set-score-width lw) (let* ( (pw (ly:output-def-lookup $defaultpaper 'paper-width)) (lmd (ly:output-def-lookup $defaultpaper 'left-margin-default)) (rmd (ly:output-def-lookup $defaultpaper 'right-margin-default)) (ind (/ (- pw lmd rmd lw) 2))) #{ \layout { line-width = #(+ lw ind) indent = #ind short-indent = #ind } #} )) % end of scheme code \score { procedure call #(set-score-width 120) your own layout block \layout { % do something } \repeat unfold 20 \relative c { c' d e f g a b } } \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto leberkas." HTH, Juergen. -ursprüngliche Nachricht- Von: benja...@koine.gr Gesendet: 11.04.2023 16:14 Uhr An: juergen.gr...@xyz.de, lilypond-user@gnu.org Betreff: Re: How to fix markup horizontal position relative to edge of page Quick question, in the scores I am working on I already have a \layout block with several other settings within it. How can I insert just the line-width, indent, and short-indent settings into the already-existent \layout block without creating another one? If I try just #{ line-width = #(+ lw ind) indent = #ind short-indent = #ind #} for my LilyPond code block, it gives me the error "not a note name: line-width". Thanks for your Scheme expertise :) Ѫѯ 2023-04-11 Ѩё 07:38, Benjamin Bruce ѮѴё: > This is exactly what I needed. I figured it could be done with some > Scheme code, but that's beyond my knowledge. Thanks so much for your > help! > > Ѫѯ 2023-04-11 Ѩё 03:55, juergen.gr...@xyz.de ѮѴё: >> OK, this was not correct. There is a left-margin-default set and the >> indent does not shift the line but makes it shorter(?) Here is another >> approach: >> >> >> >> \version "2.24.0" >> >> #(define (set-score-width lw) >> (let* ( >> (pw (ly:output-def-lookup $defaultpaper 'paper-width)) >> (lmd (ly:output-def-lookup $defaultpaper 'left-margin-default)) >> (rmd (ly:output-def-lookup $defaultpaper 'right-margin-default)) >> (ind (/ (- pw lmd rmd lw) 2))) >> >> #{ \layout { >> line-width = #(+ lw ind) >> indent = #ind >> short-indent = #ind >> } #} )) >> >> \score { >> #(set-score-width 120) >> \repeat unfold 20 \relative c { c' d e f g a b } >> } >> >> \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua >> incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. >> Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto >> leberkas." >> >> >> >> Juergen. -ursprüngliche Nachricht Ende-
Re: How to fix markup horizontal position relative to edge of page
Quick question, in the scores I am working on I already have a \layout block with several other settings within it. How can I insert just the line-width, indent, and short-indent settings into the already-existent \layout block without creating another one? If I try just #{ line-width = #(+ lw ind) indent = #ind short-indent = #ind #} for my LilyPond code block, it gives me the error "not a note name: line-width". Thanks for your Scheme expertise :) Ѫѯ 2023-04-11 Ѩё 07:38, Benjamin Bruce ѮѴё: > This is exactly what I needed. I figured it could be done with some > Scheme code, but that's beyond my knowledge. Thanks so much for your > help! > > Ѫѯ 2023-04-11 Ѩё 03:55, juergen.gr...@xyz.de ѮѴё: >> OK, this was not correct. There is a left-margin-default set and the >> indent does not shift the line but makes it shorter(?) Here is another >> approach: >> >> >> >> \version "2.24.0" >> >> #(define (set-score-width lw) >>(let* ( >>(pw (ly:output-def-lookup $defaultpaper 'paper-width)) >>(lmd (ly:output-def-lookup $defaultpaper 'left-margin-default)) >>(rmd (ly:output-def-lookup $defaultpaper 'right-margin-default)) >>(ind (/ (- pw lmd rmd lw) 2))) >> >> #{ \layout { >>line-width = #(+ lw ind) >>indent = #ind >>short-indent = #ind >> } #} )) >> >> \score { >> #(set-score-width 120) >> \repeat unfold 20 \relative c { c' d e f g a b } >> } >> >> \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua >> incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. >> Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto >> leberkas." >> >> >> >> Juergen.
Re: How to fix markup horizontal position relative to edge of page
This is exactly what I needed. I figured it could be done with some Scheme code, but that's beyond my knowledge. Thanks so much for your help! Ѫѯ 2023-04-11 Ѩё 03:55, juergen.gr...@xyz.de ѮѴё: > OK, this was not correct. There is a left-margin-default set and the > indent does not shift the line but makes it shorter(?) Here is another > approach: > > > > \version "2.24.0" > > #(define (set-score-width lw) >(let* ( >(pw (ly:output-def-lookup $defaultpaper 'paper-width)) >(lmd (ly:output-def-lookup $defaultpaper 'left-margin-default)) >(rmd (ly:output-def-lookup $defaultpaper 'right-margin-default)) >(ind (/ (- pw lmd rmd lw) 2))) > > #{ \layout { >line-width = #(+ lw ind) >indent = #ind >short-indent = #ind > } #} )) > > \score { > #(set-score-width 120) > \repeat unfold 20 \relative c { c' d e f g a b } > } > > \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua > incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. > Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto > leberkas." > > > > Juergen.
RE: How to fix markup horizontal position relative to edge of page
Hello, maybe % \version "2.24.0" paperWidth = 180.0 lineWidth = 140 ind = #(/ (- paperWidth lineWidth) 2) \paper { paper-width = \paperWidth } \score { \layout { line-width = \lineWidth indent = \ind short-indent = \ind } \repeat unfold 20 \relative c { c' d e f g a b } } \markup \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto leberkas." btw: make a tiny example even more tiny with ' \repeat unfold #n' ;-) Juergen. -ursprüngliche Nachricht- Von: benja...@koine.gr Gesendet: 10.04.2023 23:25 Uhr An: lilypond-user@gnu.org Betreff: How to fix markup horizontal position relative to edge of page Hello all, I am trying to layout some documents where the score is centered on the page, and underneath it is some markup text that is aligned left, relative to the edge of the page. In some documents the score will be wider, in some it will be narrower, but the text below it should always be in the same horizontal position relative to the page. If I set line-width in the \paper block, it will be applied to everything, and the markup will be aligned relative to the line-width. If I set line-width in the \layout block, the markup is independent, but the score is now left-aligned, not centered. I am attaching my (somewhat) tiny example in case this doesn't make sense. Is there a way to accomplish what I'm trying to do, even if it's hacky? Thanks for your help! -ursprüngliche Nachricht Ende-
Re: How to fix markup horizontal position relative to edge of page
I tried that, but the markup position is still set relative to the paper line-width, so if I change the paper line-width, the markup moves with it. Ѫѯ 2023-04-10 Ѩё 15:35, Ya Gloops ѮѴё: > Hello > > Maybe > > \version "2.24.1" > \paper { > line-width = 180 > indent = 0 > } > \score { > \layout { > line-width = 125 % score is always left-aligned if this is set > } > \relative c { c' d e f g a b c, d e f g a b c, d e f g a b c, d e f g > a b c, d e f g a b c, d e f g a b c, d e f g a b c, d e f g a b } > } > \markup \override #'(line-width . 74) \wordwrap-string "Bacon ipsum > dolor amet hamburger aliqua incididunt sunt in. Excepteur consequat ad > laboris anim flank jowl. Irure drumstick shoulder dolor. Cupim tri-tip > meatloaf prosciutto leberkas." > > > > > > > > > Le lundi 10 avril 2023 à 23:27:11 UTC+2, Benjamin Bruce > a écrit : > > > > > > Hello all, > I am trying to layout some documents where the score is centered on the > page, and underneath it is some markup text that is aligned left, > relative to the edge of the page. In some documents the score will be > wider, in some it will be narrower, but the text below it should always > be in the same horizontal position relative to the page. > > If I set line-width in the \paper block, it will be applied to > everything, and the markup will be aligned relative to the line-width. > If I set line-width in the \layout block, the markup is independent, > but the score is now left-aligned, not centered. > > I am attaching my (somewhat) tiny example in case this doesn't make > sense. Is there a way to accomplish what I'm trying to do, even if it's > hacky? Thanks for your help!
Re: How to fix markup horizontal position relative to edge of page
On 2023-04-10 2:35 pm, Ya Gloops wrote: ...Bacon ipsum... Ah, I see you are an individual of culture. :) -- Aaron Hill
Re: How to fix markup horizontal position relative to edge of page
Hello Maybe \version "2.24.1" \paper { line-width = 180 indent = 0 } \score { \layout { line-width = 125 % score is always left-aligned if this is set } \relative c { c' d e f g a b c, d e f g a b c, d e f g a b c, d e f g a b c, d e f g a b c, d e f g a b c, d e f g a b c, d e f g a b } } \markup \override #'(line-width . 74) \wordwrap-string "Bacon ipsum dolor amet hamburger aliqua incididunt sunt in. Excepteur consequat ad laboris anim flank jowl. Irure drumstick shoulder dolor. Cupim tri-tip meatloaf prosciutto leberkas." Le lundi 10 avril 2023 à 23:27:11 UTC+2, Benjamin Bruce a écrit : Hello all, I am trying to layout some documents where the score is centered on the page, and underneath it is some markup text that is aligned left, relative to the edge of the page. In some documents the score will be wider, in some it will be narrower, but the text below it should always be in the same horizontal position relative to the page. If I set line-width in the \paper block, it will be applied to everything, and the markup will be aligned relative to the line-width. If I set line-width in the \layout block, the markup is independent, but the score is now left-aligned, not centered. I am attaching my (somewhat) tiny example in case this doesn't make sense. Is there a way to accomplish what I'm trying to do, even if it's hacky? Thanks for your help!