Part gripe, part feature request!
Posted: 2007-04-23 14:14:20
This whole Perl macro language thing is a real bind :evil:. It is not just that the excellent NWClassic macro language (fond memories!) has had to be ditched and a new language learned, not even that it has proved curiously difficult and time-consuming to find clear beginner's guides on the web , but Perl is apparently quite inadequate for some pretty basic things like formatting and working with accented languages . [End of gripe.] That said I do appreciate the thinking behind the new approach of NWE and NWPro. Grep is dead, long live Perl ! On to feature requests.
My main macro is a multiple search/replace tool to convert certain words or phrases (about 300 so far) from French to English as a preliminary to translating the text.
Now,
1. According to the official guide to NWPro:
"Although Nisus Writer Pro provides a way to maintain formatting when
changing text in a Perl Macro (through the option of including the RTF formatting
in the copied text) only the advanced Perl connoisseurs will be able to take
advantage of the feature. In future Nisus Writer Pro will make the Perl macros
aware of text formats."
In fact, it is easy to retain at least italics/bold/superscript and suchlike, as the next page in the guide reveals:
"#{Send Text as RTF | Send rtf | rtf | text as rtf}
If any variant of this option is present, then the text will be sent to Perl as RTF.
Anything returned from the Perl script will be treated as RTF and an attempt will
be made to convert it back into styled text before putting it into the destination."
I worked out where to put this line in my macro, so now I am an "advanced Perl connoisseur":D!? In fact I presume the formatting ignored by Perl is more sophisticated stuff, but at any rate, for my humble purpose, this is a problem solved.
However,
2. Perl does not work with accented words :evil:! If I try to search/replace, for example, après/after, the word 'après' is simply ignored by the macro. FEATURE REQUEST: Please correct this, Mr Nisus, ASAP !! Or could one write an instruction similar to "#{Send Text as RTF | Send rtf | rtf | text as rtf}"? "Send Text as accented… as French Language…"?
And also,
3. Add, please, in the Find/Replace window, the possibility of saving a particular find/replace as a macro item that can be appended to a pre-existent macro. This was an extremely useful option in NWClassic.
Voilà! My two-penn'orth for a new and exciting version of a marvellous word processor!
My main macro is a multiple search/replace tool to convert certain words or phrases (about 300 so far) from French to English as a preliminary to translating the text.
Now,
1. According to the official guide to NWPro:
"Although Nisus Writer Pro provides a way to maintain formatting when
changing text in a Perl Macro (through the option of including the RTF formatting
in the copied text) only the advanced Perl connoisseurs will be able to take
advantage of the feature. In future Nisus Writer Pro will make the Perl macros
aware of text formats."
In fact, it is easy to retain at least italics/bold/superscript and suchlike, as the next page in the guide reveals:
"#{Send Text as RTF | Send rtf | rtf | text as rtf}
If any variant of this option is present, then the text will be sent to Perl as RTF.
Anything returned from the Perl script will be treated as RTF and an attempt will
be made to convert it back into styled text before putting it into the destination."
I worked out where to put this line in my macro, so now I am an "advanced Perl connoisseur":D!? In fact I presume the formatting ignored by Perl is more sophisticated stuff, but at any rate, for my humble purpose, this is a problem solved.
However,
2. Perl does not work with accented words :evil:! If I try to search/replace, for example, après/after, the word 'après' is simply ignored by the macro. FEATURE REQUEST: Please correct this, Mr Nisus, ASAP !! Or could one write an instruction similar to "#{Send Text as RTF | Send rtf | rtf | text as rtf}"? "Send Text as accented… as French Language…"?
And also,
3. Add, please, in the Find/Replace window, the possibility of saving a particular find/replace as a macro item that can be appended to a pre-existent macro. This was an extremely useful option in NWClassic.
Voilà! My two-penn'orth for a new and exciting version of a marvellous word processor!