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

Re: XML/SGML



On 27-7-99 Nathan Sivin (on whom be peace) wrote:

> Re: XML/SGML
>
> The discussion of GML reveals another reason to get rid of the
> dread MDNM. It is an elementary exercise to jimmy the keyboard so
> that instead of, e.g., something you have
> something. That makes it immensely easier to write
> macros for various conversions.
>
> When I did revise the keyboard for this purpose, instead of just
> =bc,m,d,+,i,t,xc
> etc.,
> I decided to make the key run a little program that will insert
> the codes to turn italics on *and* off, with the cursor in
> between. On the other hand, if text is defined, it will put the
> codes before and after the text. Thus the key says
> =bc,r,u,n, ,\,x,y,\,r,\,i,t,a,l,.,p,g,m,xc
>
> and ITAL.PGM reads
>
> DX >>XP ==0>;*;
> CL CL CL CL CL CL DB ;*;
> DE CR ==1>WG ==2>SP ;*;
> ==4>WZ DO ES 
> ;; inserts markup whether or not block selected;
> ;; 82=display type, 83=0 if no block selected
>
> Where < and > stand for chevrons, and the pairs of letters
> followed by a space stand for XPL commands. The program first
> determines the display mode and whether text is defined.
> Afterward, it uses 82 to restore the display type.


I am puzzled. The default keyboard in both Xy4 DOS and XyWin (I believe I'm
using the latest versions) already does exacty what N.S. describes. The key
definition for Ctl+I reads
        23=XH,JM,(,I,t,a,l,i,c,)
which works as follows:

(a) if a block is defined, Ctl+I inserts  at the beginning of the
define, and  at the end;

(b) if no block is defined, Ctl+I *reverses* italic: i.e., it inserts
 at the cursor if italic isn't in force there, but inserts 
at the cursor if  is already in force there.

Indeed, if you start a define but don't finish it, Ctl+I performs (a) AS IF
the define had been completed at the cursor.

Am I missing something?

Cheers
Eric Van Tassel