Sorry--once again, now _with_ the promised attachment ... Am 18.08.2011 schrieb Rainer Dunker: > Hello Dirk! > > Am 16.08.2011 schrieb Dirk Laurie: > > On Tue, Aug 16, 2011 at 03:55:06PM +0200, Rainer Dunker wrote: > > > [...] > > > \\\def\atnextline{\mtxLyricsAdjust{1}{-9}}\ a4 } a a a | > > > > Ouch! This is definitely the sort of thing that M-Tx was designed > > to avoid. Would it in other situations also be right to do that, > > or only in this one? > > I'd say it would be wrong to do that always. See the "Winter ade" > example in the musixlyr documentation: There, a double-line lyrics > section is continued with a single lyrics line in mid-system; you can't > delay the vertical shift up to the system end in this case. > > > If not so, can one identify the situation > > automatically so that M-Tx itself puts this in when needed? > > On the one hand, yes: If the vertical lyrics shift occurs after the last > note of the pending system, it should be synchonized with the system > break. But, as far as I unterstand, M-Tx doesn't know where the system > break will happen--PMX is the earliest processing stage where this > information is available. Therefore, the M-Tx processor itself has no > chance to detect the situation. (Right?) > > But maybe the \mtxLyricsAdjust command could be "empowered" to detect > its own calling context. This TeX macro, inserted by M-Tx into the > output literally, is executed by TeX _after_ PMX has decided about the > system breaks. Maybe, with a bit of luck, it could grasp this > information somehow and use it for a proper vertical lyrics shift. > > I had a look in the .tex file resulting from Simon's problem example and > noticed that both \mtxLyricsAdjust calls (generated by M-Tx) occur right > before the \alaligne calls (generated by PMX). Assumed that this is > always the case, \mtxLyricsAdjust could "look ahead" for the TeX command > directly following it (using TeX's \futurelet command), and if it finds > \alaligne, it knows that the lyrics shift occurs at a system break, > otherwise not. > > Although this appears to be a really dirty and fragile solution, at > least I managed to put it all together into a working example > (attached to this message). But I'm far from sure whether this would > work in every case and would not raise unwanted side effects > (especially due to the uncumulative use of \atnextline). > > Could you please have a look at it and evaluate whether it is generally > feasible? If you conclude that it's not, I may dig into musixlyr again > to see whether it can be made more aware of such vertical shifts and to > react properly itself, but I guess this would be so intricate that a > workaround for those rare problematic cases would still be more > appropriate. > > Best regards, > > Rainer
Systems: 2 Style: Singer %%\let\mtxLyricsAdjustOrig\mtxLyricsAdjust %%\def\mtxLyricsAdjust#1#2{% %% \def\mtxLyricsAdjustArgOne{#1}% %% \def\mtxLyricsAdjustArgTwo{#2}% %% \futurelet\mtxLyricsAdjustNextToken\mtxLyricsAdjustInternal %%} %%\def\mtxLyricsAdjustInternal{% %% \ifx\mtxLyricsAdjustNextToken\alaligne %% \def\atnextline{% %% \mtxLyricsAdjustOrig\mtxLyricsAdjustArgOne\mtxLyricsAdjustArgTwo}% %% \else %% \mtxLyricsAdjustOrig\mtxLyricsAdjustArgOne\mtxLyricsAdjustArgTwo% %% \fi %%}
@-2 g g g g | g @+4 g g g | @-4 g g g g | g g g g L: bla bla bla bla bla bla bla bla-bla bla bla bla bla bla bla bla
------------------------------- TeX-music@tug.org mailing list If you want to unsubscribe or look at the archives, go to http://tug.org/mailman/listinfo/tex-music