Hello,
I did some more thinking about this enhancement question and this is what I came up with:
Vedit allows me to multiply the content of a Numeric register by a signed integer. In fact, I tried out multiplication by the number (-1) and it worked fine. So, under special circumstances it should be possible to enhace the Num_Eval macro to handle negative numbers. Since I am in the middle of renumbering my equations, I did not try to write such an enhanced macro. Here is the pseudo code:
----------
I have a bunch of equation numbers of the form;
eq:-d; d=-5,-4,-3,-2,-1
and I wish to add 10 to each of them.
Find eq:-5 with the
Search("-[0-9]", reg_exp, advance))
command. Then move the cursor to the "number 5" with the Char(1) command. Set 5 into Numeric Register, say #11, with
#11=Num_Eval .
Then multiply #11 by (-1) with
#12=(-1)#11.
Then #13=#12+10.
--------------------------
I do not know whether this can be generalized to other problems involving signed integers. Since my simple pseudo macro seems to cover my equation renumbering I shall not think about such an enhancement. At the same time I hope that experts will have a reaction to this enhancement question.
I also hope that Fritz will have another colleague whose manuscript has pagination problem with negative page numbers. So, Fritz will have to adapt his original solution.
Thanks,
-peter.
|
|