[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Making mode commands symmetrical (or should I say complementary?)



Reply to note from Wolfgang Bechstein  Thu,
14 Feb 2008 14:38:45 +1100

> Currently, when I for example bold something in XyWrite 4 by
> using the key assigned to "m2" in my keyboard file, I get
> ≪MDBO≫ at the beginning and ≪MDNM≫ at the end of the bolded
> string. The same applies for underline etc. I want to change
> this behavior so that I always get ≪MD+BO≫ at the beginning
> and ≪MD-BO≫ at the end of the string. How can I achieve this?

Replace M2 with BXm,d, ,b,o,Q2 or, if you load U2, with
NOJM2,.,m,d,+,B,O,Q2 . (The differences|advantages of the U2 frame
versus the native command are identified in the Help frame, summoned
with HELP MD.) The downside of MD is that you lose M2's
ability to set the prevailing mode to BOld; MD, of course, only
embeds the MoDe command in text. You could, however, write a little
program that branches to func M2 if no text is DeFined, and assign
it to a key (delete the internal carriage return below):

nn=NOJM2,.,P,r,s,K,b,d,A,r,g,Q2x,m, ,D,Z,[,I,F,[,V,A,$,D,E,],
<,1,],COM,2,[,E,X,],[,E,I,],COJ,M,2,.,m,d,+,b,o,Q,2,NO

The program can be used for other MoDes by editing "COM,2" and
"b,o". For example, for underlining, change "COM,2" to "COM,3" and
"b,o" to "u,l".

--
Carl Distefano
cld@xxxxxxxx