ly:one-line-breaking
.To have your score print on a single sheet that adjusts to the length of the score, use the following code:
For example, here are the first two pages from a 3-page score in "normal paper" mode:\paper { page-breaking = #ly:one-line-breaking }
And here's how it looks when we use the
one-line-breaking
algorithm (cropped slightly):That's it! Now, there are some things to remember about using this mode (from the official docs):
- Each score gets its own line, but everything is on a single page.
- All text in the
\header
block is NOT typeset, which is fine since this is really more of a preview mode anyway. - The width of the page will be adjusted so the longest score fits on one page.
- Some variables in the
\paper
block will be ignored (likepaper-width
,indent
,line-width
) while others will be honored (likeleft-margin
,right-margin
, etc.). - The height of the page is un-changed, but honored to whatever you set it to be.
Personally, I wish the height of the page automatically fit to the scores, but oh-well.
Do you miss this mode? Do you find it useful? Let me know in the comments!
What happens if you use that together with the -dpreview command line option? Wouldn't that make the page height fit the score, at least when you have only one score in the file?
ReplyDeleteInteresting idea! I tried it out and it works nicely (except it's a PNG file) a PDF would be nice. Actually, I just tried it again and discovered it can export to BOTH at the same time as long as you have the -dpreview and --pdf command line options. Very cool! Thanks for sharing!
ReplyDelete