My file consists of 17k entries formatted as follows:
\lx abc [lexical entry]
\mr xyx [morphology]
\ge pqr [gloss]
...
My macro copies the \lx line, inserts it under the \lx line and replaces \lx with \ph, so that the wanted output is:
\lx abc [lexical entry]
\ph abc [phonology]
\mr xyz [morphology]
\ge pqr [gloss]
...
I want to either run the macro until \lx is not found, or more modestly, to run it as many times as I know there are \lx lines--about 17 thousand.
I appreciate your help.
| Edit: Changed subject, was Run a macro a specific number of times Make your post understandable by others -- MrProgrammer, forum moderator |