2011/11/8 Bob Tennent <[email protected]>: > In one movement of a Boyce trio sonata, there is a key signature of one > sharp for one part and no sharps/flats for the others (it's a strict > canon); I can typeset that OK. But in the next movement, he uses a key > signature with one *natural* on the m line for the relevant part. Is there > a way to typeset that in musixtex? The natural has to be placed between the > clef and the time signature. > The short answer is yes. Of course. You can always do anything in MusiXTeX that you could do in TeX itself.
---- file nat1.mtx
Style: Solo
Flats: 4
V: a2 b4 c d e f g a0
----
---- file nat1.mod
\makeatletter
% The following modification makes all
% key signatures print naturals
\let\oldC@sig\C@sig
\def\printnaturals{\def\C@sig##1{\n@iii##1%
\advance\n@iii\ut@ref \advance\n@iii\ut@ref
\ifnum\ut@ref=\si@ \advance\n@iii-\fourt@@n%
\else \ifnum\ut@ref>\z@ \advance\n@iii-\s@v@n \fi\fi
\ifnum\n@iii<\@ne \global\advance\n@iii\s@v@n \fi
\ifnum\n@iii<\@ne \global\advance\n@iii\s@v@n \fi
\ifnum\n@iii>\@l@v@n \advance\n@iii-\s@v@n \fi
\ifnum\n@iii>\@l@v@n \advance\n@iii-\s@v@n \fi
\advance\n@iii-\tw@ \raise\n@iii\internote
\hbox\@to\tw@\internote{\hss\keychar54\hss}}}
\def\printsharpsorflats{\let\C@sig\oldC@sig}
\makeatother
\printnaturals
----
This is a horrible hack. The natural sign (\keychar54) is hardcoded
into the replacement macro. MusixTeX still thinks the piece has four
flats. An internal key change will probably require some more
hacking: just restoring the macro as above will not suffice.
Dirk
.
nat1.pdf
Description: Adobe PDF document
------------------------------- [email protected] mailing list If you want to unsubscribe or look at the archives, go to http://tug.org/mailman/listinfo/tex-music

