[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Convert staff-spaces to mm on the fly?
From: |
Timothy Lanfear |
Subject: |
Re: Convert staff-spaces to mm on the fly? |
Date: |
Sun, 29 Dec 2024 16:14:12 +0000 |
User-agent: |
Mozilla Thunderbird |
On 29/12/2024 12:57, Richard Shann
wrote:
Is there a way of writing
\override #'(line-width . 100)
so that the value is interpreted as mm rather than staff-spacings?
Richard
Recent 2.25 releases have the scheme function to-staff-space, Otherwise you can get the conversion factor from the paper.
\version "2.25.22"
staffspaceinmm = #(ly:output-def-lookup $defaultpaper 'staff-space)
lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
\layout { indent = 0 }
{
c'1^\markup { \override #`(line-width . ,(/ 100 staffspaceinmm)) \wordwrap-string { \lorem } }
\break
c'1^\markup { \override #`(line-width . ,(to-staff-space 100 'mm)) \wordwrap-string { \lorem } }
}
--
Timothy Lanfear, Bristol, UK.