openlilylib / analysis

Graphical highlighting of musical analysis with GNU LilyPond
GNU General Public License v3.0
5 stars 3 forks source link

Caption property for frames #2

Closed uliska closed 9 months ago

uliska commented 7 years ago

It would be cool to have an automatically formatted caption for frames.

\genericFrame \with {
  caption = "Inversion"
}

This will print an additional frame (settings to be discussed: will it be the same as the main frame, use only the colors, can it be styled independently?) that is automatically aligned to the main frame. By default it should be at the top left, but others should be settable with an option caption-align = top|bottom (or more options?)

|--------------|
| Caption text |
|--------------------------|
|                          |
|                          |
|                          |
|                          |
|--------------------------|

It will have to determine the proper width, and it will be more complex if the aligned side of the main frame isn't horizontal.

KlausBlum commented 5 years ago

A first attempt can be viewed in the "caption" branch. Still need to find a solution for a problem with ascenders and descenders.

As always, I'm open to feedback and suggestions.

FrameCaptionTest.pdf

KlausBlum commented 9 months ago

Done.
Merged 21.06.2020

New properties, see example document:
caption (#f) caption-color (#f) caption-halign (-1) caption-align-bottom (#f) caption-padding (0.25) caption-radius (0.25) caption-translate-x (0) caption-keep-y (#f)