Macro language changes
Posted: 2008-11-12 01:22:42
I noticed a couple of changes in macro language that are not advertised in the Nisus Macro Reference file (that I know of).
I used this pattern in some of my macros:
Now, in version 1.2, I get an error in the parsing phase (the while command expected an end). So I had to change the pattern as follows:
Looks like Nisus macro language got stricter. Or, did I miss something?
...
Here is another, pretty simple, macro. I used this to superscript ordinals like 1st, 62nd 34th and so on in an imported file, since FixIt only works when one is typing. The original macro was:
Where \2 was superscript (just selected and applied a baseline:superscript style).
It worked OK until version 1.1. With version 1.2 font attributes are applied entirely. That is, captured text is converted to Monaco 12pt etc., which is my macro style. Then I had to change the macro as follows:
Now it does work finely.
Greetings, Henry.
I used this pattern in some of my macros:
Code: Select all
while Find 'sometext', 'E'
if condition 1
do this
elseif condition 2
do something else
end
Code: Select all
while Find 'sometext', 'E'
if condition 1
do this
elseif condition 2
do something else
end
end
...
Here is another, pretty simple, macro. I used this to superscript ordinals like 1st, 62nd 34th and so on in an imported file, since FixIt only works when one is typing. The original macro was:
Code: Select all
Find '(\d)(st|nd|rd|th)', '\1\2', 'EaU'
It worked OK until version 1.1. With version 1.2 font attributes are applied entirely. That is, captured text is converted to Monaco 12pt etc., which is my macro style. Then I had to change the macro as follows:
Code: Select all
Find '(?<=[0-9])(th|nd|rd|st)\>', 'aE'
Format:Baseline:Superscript
Greetings, Henry.