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

ital.pgm (was: Re: XML/SGML)



On 27-7-99 Nathan Sivin introduced his ITAL.PGM; on 29-9-77 I objected that
it seemed to duplicate Ctl+I [which translates as "XH,JM,(,I,t,a,l,i,c,)"]
in the default XyWin and Xy4 keyboards; but on 30-7-99 Sivin pointed out
some shortcomings in this and analogous default menu-based routines:

>1. In expanded mode, they don't work with defined text at all. I
>often work in expanded mode. I have one friend who uses nothing
>else.
>
>2. In expanded mode, after text preceded by MD+IT they just put
>in another MD+IT.
>
>3. Less important, if there is no defined text, what I want the
>key to do is insert BOTH MD+IT and MD-IT deltas with the cursor
>in between.

I'm convinced, and I'll almost certainly insert ITAL.PGM and its analogues
in my .KBD files in place of Ctl+I etc. (For the benefit of colleagues who
had deleted N.S.'s posting, I repeat ITAL.PGM below.) I've always just
accepted the irritating features N.S. identifies, rather than figuring out
how to evade them. (Obviously I should use "VA$.." in my XPLs a lot more
often than I do.)

Now, though, I'd like to re-create a couple of time-saving features that
the default Ctl+I [etc.] routines do offer and that ITAL.PGM doesn't --
viz.

(a) 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;
(b) if you've start a define but haven't finished it, Ctl+I does its intended
  job *as if* the define had been completed at the cursor.

While (b) may seem merely a minor time-saver, I find (a) extremely
efficient; and if I thereby sacrificed N.S.'s procedure (inserting
 together, and then putting the cursor between them) I'm
willing to invest the two extra keystrokes I now need to achieve it (Ctl+I,
Ctl+I, left-arrow).

I'll bet my copy of XyWrite Revealed that ITAL.PGM can be modified to do at
least (a) and possibly (b), but I don't immediately see how. I'll try to do
the work myself, if I have to, but has anyone out there already invented
this particular wheel?

Cheers
Eric Van Tassel



> 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.