On Mon, Oct 01, 2001 at 11:00:04AM +0200, M. Chapman wrote:
> When I first joined this list last year I wanted to work on how to set
> guitar tablature and soon discovered that Ronald Gelten had written macros
> for just such a task for use with MusiXTeX. Before long I was able to set
> tab on a 6-line guitar staff below the main staff in a somewhat limited way.
> This works the same as a regular staff, except that one leaves out stems and
> uses numbers in place of note heads.
> [...]
> \def\tab#1#2{%
> \ifcase\tabreverse
> \expandafter\tabbox{\ifcase#1\or n\or l\or j\or h\or f\or d\fi}{#2}\sk%
> \or
> \expandafter\tabbox{\ifcase#1\or d\or f\or h\or j\or l\or n\fi}{#2}\sk%
> \fi
> }
>
> [...] I don't quite get how the \expandafter works (I've read
> descriptions but don't quite grasp the token/expand terminology--I'll have
> to read the TeXbook more closely), but I believe that the basic idea is that
> \tabbox sets the text and then \sk skips to the next note position for a
> future note.
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.
> As Daniel Taupin warns in ?2.8 of the MusiXTeX manual, I should avoid the
> temptation to use \kern or \hskip, because I need to record the space for
> correct handling of beams, line-breaking, etc. My idea is to manipulate
> existing spacing commands from MusiXTeX in the definitions of commands
> similar \tabbox and \tab (for example, \htabbox supports \hmr as a
> hammer-positioning command). I've tried fooling around with \loffset to no
> avail (not that it's not useful, I just don't know how to go about it
> properly).
>
> Does anyone have ideas? [...]
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.
Regards,
Rainer
_______________________________________________
TeX-music mailing list
[EMAIL PROTECTED]
http://sunsite.dk/mailman/listinfo/tex-music