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

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

Reply via email to