> Yes, but this has nothing to do with \expandafter. \expandafter takes
> the second-next token and replaces its occurrence in the input stream
> by its expansion before the next token is read and evaluated; in the
> \tab macro, this second-next token is just the '{' after \tabbox
> which is not expandable; therefore, \expandafter's effect in the \tab
> macro is void.
So it should do the same thing if I remove the \expandafter. I tried it, and
it gave me the same results. Still, why then did he put it in? (Ron himself
may not by now remember.)
> Well - to my eyes, using something like \sk or \l(r)offset appears to
> be the right idea. Perhaps you should provide an example, precisely
> revealing what you have tried to achieve and what the result is; then
> we can go ahead and see what it does and why.
Okay, I defined the following and placed them in mytabdefs.tex. I've tested
them in hammer.pmx--both are attached. Note that I've commented out the
\special commands so that one can see at least the hammer in a dvi file. The
problem with this definition is that \loffset doesn't record the space, with
the result that the hammer marking often overlaps with adjacent objects. We
should find a way to do it more like a grace note, where (I think) some
extra space on the beams is calculated.
Relevant commands (also in mytabdefs.tex):
\def\htabbox#1#2{\setbox0=\hbox{\tabfnt #2h}%
% \special{ps: 1 setgray}%
% \loffset{1}{\ccharnote{#1}{\vrule height \ht0 width \wd0 depth \dp0}}%
% \special{ps: 0 setgray}%
\loffset{1}{\ccharnote{#1}{\box0}}%
}
\def\hmr#1#2{%
\ifcase\tabreverse
\expandafter\htabbox{\ifcase#1\or n\or l\or j\or h\or f\or
d\fi}{#2}\relax%
\or
\expandafter\htabbox{\ifcase#1\or d\or f\or h\or j\or l\or
n\fi}{#2}\relax%
\fi
}
hammer.pmx
mytabdefs.tex