Hi all,
Werner suggested that I post the solution to the colon problem to the
list, so here goes.
The problem was that the [right][left]repeat colons are not vertically
centered when a staff has six lines (like in guitar tabulature). I took
the following steps to solve it.
(1) the tabulature staff is treated as an instrument, termed tabinstrument.
(2) define a counter which holds the number of the tabinstrument. This
number is set when the macro \settab$n$ is called:
\newcount\tabinstrument
\def\settab#1{%
\tabinstrument=#1%
\setlines#1 6%
\setclefsymbol#1\tabclef%
}
(3) the macro \writ@colons from musixtex.tex normally calls another
macro, \w@coli, which writes the repeat-colon (\writ@colons loops over
all instrumens, \w@coli loops over all staffs of each instrument). I
redefined \writ@colons, so that it calls \tabcoli for the tabinstrument,
but keeps using \w@coli for all other instruments:
\makeatletter % enables redefinition of "@" containing macros
\def\writ@colons{\n@loop{\ifnum\noinstrum@nt=\tabinstrument\tabcoli%
\else\w@coli\fi}\repeat%
}
the \ifnum ... \else is added in comparison with the original
\writ@colons.
(4) define the macro \tabcoli, which is almost the same as \w@coli. The
difference is that \w@coli puts one character (the colon \keychar55),
whereas \tabcoli puts two separate dots:
\newskip\tabcolskip % define a horizontal skip, which is then
\tabcolskip1.2\internote % tuned to give an acceptable spacing
\def\tabcoli{\p@loop\raise\altportee%
\hbox{%
\raise5\internote\rlap{\kernm\tabcolskip\hbox{\keychar24}}%
\raise1\internote\rlap{\kernm\tabcolskip\hbox{\keychar24}}%
}\count@portee\repeat%
}
\makeatother % close the previously called \makeatletter
The central \hbox is the only difference between tabcoli and \w@coli.
And this works nicely. A small problem: my dots are thinner than the
"normal" repeat colon, but that seems solvable.
As always, suggestions are welcome. I'm not a TeXpert at all, so more
efficient coding is probably possible.
Cheers,
Ronald
--
Eindhoven University of Technology | tel: +31 40 2473575
e-mail: [EMAIL PROTECTED] | fax: +31 40 2455054
http://www.tak.chem.tue.nl/personal/rgelten/
"Trust me, I'm a doctor!" - S.P. Bates, Ph.D.
--
Eindhoven University of Technology | tel: +31 40 2473575
e-mail: [EMAIL PROTECTED] | fax: +31 40 2455054
http://www.tak.chem.tue.nl/personal/rgelten/
"Trust me, I'm a doctor!" - S.P. Bates, Ph.D.