Hi All
I am a chemist, and as such have to type in chemical formulas with loads of subscripts. To convert each regular text character to a subscript is a pain, especially as I like to use non standard formating (not so small, or so far down as a normal subscript.)
In other word processors, I have normally written macros to insert the whole word. I am new to NWE and would like to know if that is possible. The documentation seems to indicate this would be possible, but adds the following: (from the Users Guide, 2.6)
"Although Nisus Writer Express 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 Express will make the Perl macros aware of text formats. "
That, unfortunately, does not include me.
If anyone could give me a generic model of such a macro, I could certainly modify it by typing in my chemical names.
I could also do this with search and replace, if replace was character format aware. As far as I can tell it's not. Is this true or did I miss something.
thanks
macro to insert words with subscripts
Subscript/Superscript styles & shortcuts
I agree that the default subscript and superscript attributes make the size too small and shift the baseline too much.
My solution is to define a Subscript character style with the baseline shift and font size (e.g., two points smaller than your normal font) you prefer. The character style can include a keyboard shortcut.
Also define a Plain character style with your normal font size and no baseline shift. By giving it a keyboard shortcut, you can quickly toggle between the two character styles.
To subscript only one character at a time with a single keystroke (i.e., to eliminate the need for a second keystroke to return to the Plain style), I wrote an AppleScript. It uses Apple's very lengthy & geeky GUI scripting syntax because Nisus provides no other way to manipulate the cursor or the selection. If anyone's interested, I'll post the AppleScript.
My solution is to define a Subscript character style with the baseline shift and font size (e.g., two points smaller than your normal font) you prefer. The character style can include a keyboard shortcut.
Also define a Plain character style with your normal font size and no baseline shift. By giving it a keyboard shortcut, you can quickly toggle between the two character styles.
To subscript only one character at a time with a single keystroke (i.e., to eliminate the need for a second keystroke to return to the Plain style), I wrote an AppleScript. It uses Apple's very lengthy & geeky GUI scripting syntax because Nisus provides no other way to manipulate the cursor or the selection. If anyone's interested, I'll post the AppleScript.