lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getting musical examples to an exact textwidth with a style file


From: Kevin Patrick Barry
Subject: getting musical examples to an exact textwidth with a style file
Date: Sat, 3 Aug 2013 17:32:14 +0100

Dear Lilypond users,

I am creating musical examples for a text block with a fixed width (100.8mm) and am trying to create a style file that I can use for all of the examples (there will probably be a couple of hundred).  I thought I could do this by modifying some combination of page-width, line-width, left-margin and right-margin, but I have run into two problems: braces/brackets, and bar numbers. 

If I set the line width to be the same as the text block then the piano braces increase the line width and the resulting file is too wide; to fix this I have to manually set an appropriate left margin, but this margin is different depending on whether the example begins with a brace or a bracket, and if there are bar numbers it depends on how large the numbers are (two digits vs three digits vs parenthesized bar numbers for examples that start in the middle of a bar). 

If, instead, I set the page-width to the width of the text block then it doesn't use the full width unless I manually specify the margins, which places me in the same situation as above.  I suspect I have to manually set the left margin in every example depending on what combination of elements appear to the left of the beginning of the staff.

An even better solution might be to leave the image slightly too wide and make it raggedleft/flushright, so that the bracket/bar numbers reach into the left margin of the page, but this doesn't seem to be possible in LaTeX: using \raggedleft within the figure environment has no effect.

If anyone has any thought I'd appreciate them,
Kevin.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]