// -*-ASCII:EDT-*- // // This file: index.edt // // Small routine to help with inserting index markers. // // Select the words(s) to be indexed // and then run the macro (it is best put on to a key). // // By default there is support for the LaTeX *index* // (or *multind*) package, which enables multiple indexes // with the syntax *\index{indexname}{indexstring}*. // This can be shut off by following the directions in // the macro. // // After inserting the *indexname* part of the marker, // the macro offers you the selected string // so that you can alter it --- for example, if you are using // a number of levels in your index, or indexing by concept // rather than literally. The markup will be inserted immediately // before the selection, regardless of the position of the cursor. // // David Chadd (d.chadd@uea.ac.uk) // Monday, March 5, 2001 // IfSel(0,"=","CMD('Select Word');"); BeginGroup;> GetSel(0,9);> // Use Windows Clipboard because it helps later: CopyToClipboard('%!9',0);> CopyFromClipboard(1);> // // To disable multiple index support, comment out the next // four lines and uncomment the two lines which follow them: GetString('Which index?','Index name');> Ins('\index{%!?}');> EnterReg(1,'Change if you wish','String to index');> Ins('{%!1}%!9');> //EnterReg(1,'Change if you wish','String to index'); //Ins('\index{%!1}%!9'); EndGroup; // Clean up and quit: LetReg(9,""); LetReg(1,""); End;