"Simons, Don" wrote:
> 
> > Rainer Dunker wrote:
> >
> > >
> >...I'd therefore suggest that M-Tx delay
> > > the \staffbotmarg change to the system break by means of \atnextline.
> >
> There is a potential difficulty with this approach.  PMX generates an
> \atnextline command in some limited circumstances related to centered
> headers.  My own coding is also at fault because I have not allowed for the
> possibility that there was an in-line \atnextline that had been entered
> prior to the PMX-generated one.  As it now stands, if M-Tx or the PMX user
> inlines an \atnextline in the PMX file, I believe it will either supersede
> the PMX-generated one or be ignored, depending on the relative locations in
> the TeX file. Is there a general approach for both M-Tx and PMX that would
> keep everyone happy?
> 
> BTW there are similar issues with \atnextbar, which PMX uses much more often
> than \atnextline.

Yes, I remember having encountered this problem when trying to set a
bar-centered \duevolte over an invisible full-bar rest. IMHO the easiest
solution would be a minor change to PMX: Each time it utilizes
\atnextbar, let it write

  \let\atnextbarsav\atnextbar \def\atnextbar{\atnextbarsav something}%

instead of

  \def\atnextbar{something}%

into the MusiXTeX output (same for \atnextline). Moreover, PMX should
stick to issuing these commands immediately before \bar (or \alaligne
etc.) so that no user-driven \def\atnextbar can interfere (perhaps not
so easy?).

If M-Tx would do something similar, even the M-Tx user could use
\atnextbar inline. A more thorough and powerful solution, however, could
consist of a "cumulative" \atnextbar counterpart directly built into
MusiXTeX. Imagine, for example, you could write

  \addtonextbar{\a}%
  \addtonextbar{\b}%
  \addtonextbar{\c}%

and at the next bar \a\b\c would be executed. An implementation could
look like this:

  \makeatletter
    \newtoks\at@nextbar
    \def\addtonextbar#1{%
      \expandafter\at@nextbar\expandafter{\the\at@nextbar #1}}
    \def\exec@nextbar{\the\at@nextbar \at@nextbar={}}
  \makeatother

To make this an add-on to the existing MusiXTeX, add two more lines
before \makeatother:

  \let\n@wbarsav\n@wbar
  \def\n@wbar{\n@wbarsav\exec@nextbar}

But, of course, this would not avoid changing PMX in some way.


Best regards,

Rainer


P.S. A PMX command for setting a \duevolte (as a variant to "rbp") would
be very nice-to-have ... :-)

Reply via email to