Terrence Enger wrote

>...pmx copies a (one-backslash)
>inline TeX instruction to the output only if it is followed by a note
>(or, for all I know, something else) in the same measure.  

Not quite. Try this example:

====================
1 1 4 4 4 4 0 0
1 1 20 0

t
.\
c4 c c c \zcharnote{10}{Hello}\ | c c c c /
c4 c c c | c c c c \zcharnote{10}{Hello}\ /
c4 c c c /
====================

The first one is copied, but not the 2nd. Clearly, the command is ignored if
it's the last thing before the end of an input block, 

One solution to this shortcoming is like what the doctor said to the patient
who complained "It hurts when I do this," the solution being "Well, don't do
that."

The basic reason has to do with ambiguity about where the TeX command should
go if it comes at the end of an input block. My basic rule for type 1, for
better or worse (and 'til death do us part), is as stated in the PMX manual:
it "will appear in the .tex file right before the TEX command for the next
note or rest in the .pmx file.". But if you put it at the end of an input
block, all sorts of things could happen between there and the next note, and
besides if you really wanted it right before the next note (which is now in
the next input block), then put it in the next input block. On the other
hand, if for example you really need the command \blabla after the last note
of a normal bar but before the bar symbol, a workaround is to redefine \xbar
BEFORE entering the last note of the bar:

...c44 \let\xbart\xbar\def\xbar{\blabla\xbart\let\xbar\xbart}\ c44 | ...

Similar constructs could be used for "abnormal" bars, like a repeat sign or
the last bar of the piece,  but you might have to look at the TeX file first
to see what the "abnormal" bar command is, so you know what command to
redefine.

This sort of redefinition, including the last step which reverses the
redefinition, is a standard trick useful in lots of situations. 

--Don


-------------------------------
[email protected] mailing list
If you want to unsubscribe or look at the archives, go to 
http://tug.org/mailman/listinfo/tex-music

Reply via email to