// -*- ASCII:EDT -*- // allwords.edt // produces a file %n.index, // containing a list of all words // (useful for indexing) // (schlicht 20010304) ///////////////////////// // If nothing's selected, take the whole file. GetSel(1,0); StartWorking("allwords..."); LetRegNum(2,0); LetReg(4,""); // I don't remove preceding "\", "[" or "{", so that you can easily spot and remove LaTeX commands; // Take this line instead if you don't want this: // FindInString("%!0","+{$Alpha${@{[-']+$Alpha$}}}",1,2,1001,%!2);> // // Hyphens and apostroph are part of the word Loop(!`> SetOK(1);> FindInString("%!0","{@\\}{@\{}{@\[}+{$Alpha${@{[-']+$Alpha$}}}",1,2,1001,%!2);> IfOK(!"> ExtractByIndex(3,'%!0',%!1,%!2);> LetReg(4,'%!4%\%!3');> LetRegNum(2,%!2+1);",> "Stop;");> `); StopWorking; //Prompt("%!4"); //End; OpenOutput("%p\%n.index"); WrL("%!4"); CloseOutput; Open("%p\%n.index"); End; // You can select text before running the macro. // Otherwise it will take the whole file. // // You can now sort this list using // WinEdt's Sort tool, that can // remove multiple appearances of a word. // // R Schlicht w.m.l@gmx.net /////////////////////////////////////// $Id: allwords.edt,v 1.6 2001-11-13 19:02:24+01 standard Exp standard $