The \fill-line command: Difference between revisions
Appearance
Import snippet from LSR |
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series |
||
| Line 17: | Line 17: | ||
<br /> | <br /> | ||
<lilypond version="2.24 | <lilypond version="2.24"> | ||
%% http://lsr.di.unimi.it/LSR/Item?id=244 | %% http://lsr.di.unimi.it/LSR/Item?id=244 | ||
Revision as of 18:51, 16 November 2025
The \fill-line command aligns and justifies markup text by setting as many columns as required, in a given space.
In this snippet we use numbers to (beautifully) show how the command works; but when using text beware to use quotes if you want your words to stay together:
\fill-line {The quick brown fox}
results in something like:
The quick brown fox
\fill-line {"The quick brown fox"}
results in something like:
The quick brown fox
\version "2.24"
%% http://lsr.di.unimi.it/LSR/Item?id=244
\paper {
line-width = 15\cm
bookTitleMarkup = \markup {
\column {
\fill-line {
1
}
\fill-line {
1
2
}
\fill-line {
1
2
3
}
\fill-line {
1
2
3
4
}
\fill-line {
1
2
3
4
5
}
\fill-line {
1
2
3
4
5
6
}
\fill-line {
1
2
3
4
5
6
7
}
\fill-line {
1
2
3
4
5
6
7
8
}
\fill-line {
1
2
3
4
5
6
7
8
9
}
\fill-line {
1
2
3
4
5
6
7
8
9
10
}
\fill-line {
1
2
3
4
5
6
7
8
9
10
11
}
\fill-line {
1
2
3
4
5
6
7
8
9
10
11
12
}
\fill-line {
1
2
3
4
5
6
7
8
9
10
11
12
13
}
\fill-line {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
}
}
}
}
\score {
\new Staff \relative c'' {
\repeat unfold 4 c1
}
}