Hi,
a quick solution could be:
Create a tmcommand "increment \i":
Input: selection or document Ouptut: replace selected text Command: #!/usr/bin/perl -w
$cnt=1; $inc=1;
while(<>) { if(m/^\i((\d+)\s*,\s*(\d+))$/) { $cnt=$1; $inc=$2; next; } while(s/\i/$cnt/) {$cnt+=$inc;} print; }
then record a macro: 1. command: Find as regexp: (<a) (class="([^"]*)") Replace all with: $1 id="_\i" $2 2. command: Call "increment \i"
and save that macro.
Then you can specify at the begin of your doc a line for setting up the \i \i(2,5)
and run the new macro.
--Hans