|
From: | Malte Meyn |
Subject: | Re: lyluatex: inline vertical alignment of |
Date: | Fri, 11 May 2018 11:16:20 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
Am 11.05.2018 um 10:21 schrieb Malte Meyn:
Am 10.05.2018 um 15:07 schrieb Urs Liska:Hi Malte, don't know why my previous post got scrambledI don’t know either; my Thunderbird doesn’t show the text in HTML view but in plaintext view it’s fine.The problem is that in a cropped image we don't have a clue as to where the staff symbol is located vertically. However, we *can* determine these values in LilyPond, if we find out the highest and lowest Y-extent values throughout the first system (we expect single-system scores only for inline inclusion). A Scheme function could do that calculation and write it to an auxiliary file. From there we can go on towards a solution in lyluatex.It should be possible, yes. Somewhere in LilyPond there is some code which makes skylines ;)
I found a way to do this for scores but not for toplevel markups. It’s not even a complicated calculation: just let VerticalAxisGroup.after-line-breaking print it’s Y-extent. Does this already help? I don’t know how much of this should be done in LilyPond and Lua/LuaLaTeX …
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \version "2.19.81" \layout { \override Score.VerticalAxisGroup.after-line-breaking = #(lambda (grob) (let ((extent (ly:grob-property grob 'Y-extent))) (display extent) (newline))) } markupScore = #(define-scheme-function (mrkp) (markup?) #{ \score { <>-#mrkp \layout { \context { \Staff \remove Clef_engraver \remove Time_signature_engraver \remove Staff_symbol_engraver \override TextScript.Y-offset = 0 } } } #}) { f } { f' } { \clef alto g } \new RhythmicStaff c1 \markupScore "A" \markupScore \markup "A" \markupScore \markup \column { "A" "A" } \markupScore \markup \general-align #Y #DOWN \column { "A" "A" }
[Prev in Thread] | Current Thread | [Next in Thread] |