Search found 50 matches

by waltzmn
2023-03-18 03:07:22
Forum: Nisus Writer Pro
Topic: Finding SHORTEST Text
Replies: 2
Views: 811

Re: Finding SHORTEST Text

phspaelti wrote: "+" gives a 'greedy' repetition "+?" gives the shortest. Thank you! PS: If you use the Find box, the menus have these repeaters listed :wink: Actually, I did use the Find box; I can't remember that "[^\n\f]" part. :) But I didn't know what I should be l...
by waltzmn
2023-03-17 14:46:30
Forum: Nisus Writer Pro
Topic: Finding SHORTEST Text
Replies: 2
Views: 811

Finding SHORTEST Text

I feel as if I ought to know this, but I just can't make it work. I have a list of bibliographic references that I need to clean up. Every entry has an abbreviation at the beginning, followed by a colon and space, then the actual entry. Here are three example lines: Chambers: E. K. Chambers, _Englis...
by waltzmn
2020-08-16 15:13:45
Forum: Nisus Writer Pro Macros
Topic: Turning styled text into tagged text
Replies: 2
Views: 7295

Re: Turning styled text into tagged text

phspaelti wrote: In current NWP language you will need to use the formatting attributes. You can get the attributes for any location in the text of a document like so: {etc.] Amazingly impressive. I wasn't even sure there was a way, and you gave me two! Thank you again for all your knowledge and all...
by waltzmn
2020-08-16 08:39:52
Forum: Nisus Writer Pro Macros
Topic: Turning styled text into tagged text
Replies: 2
Views: 7295

Turning styled text into tagged text

This one takes me back a long, long way.... Back in the NisusWriter Classic days, I created a macro that would convert a formatted document into a markup language (in this case, Quark XPress tags). The most important part of this process, and the one I don't know how to recreate, was reading the rul...
by waltzmn
2020-07-31 07:56:24
Forum: Nisus Writer Pro
Topic: nisus/word issues (including Hebrew)
Replies: 8
Views: 11920

Re: nisus/word issues (including Hebrew)

It was many years ago. It certainly wasn't NWP 3.x; it might even have preceded 2.x. Long enough that I'm not sure. :-) And it was only a few words of Hebrew. I should have caught it myself, but the book editor was so hard to deal with that I never looked at the finished product until after it was p...
by waltzmn
2020-07-31 05:49:47
Forum: Nisus Writer Pro
Topic: nisus/word issues (including Hebrew)
Replies: 8
Views: 11920

Re: nisus/word issues (including Hebrew)

I doubt I can help with this, except to confirm your issue #2 -- when one of my NWP files was opened in Word, it reversed the Hebrew. (And no one noticed, so the book was published with the Hebrew backward. Ouch.) But I have a question that might help others: Is your document ALL Hebrew, or does it ...
by waltzmn
2020-06-26 11:48:47
Forum: Nisus Writer Pro
Topic: NW for iPad?
Replies: 112
Views: 252820

Re: NW for iPad?

I agree with those who would like to give Nisus Software money, because I want to keep the company and their software around. But I find myself wondering. Obviously the new Macs, and Catalyst, should make it easier to bring NisusWriter to the iPad. But porting a program requires more than just re-co...
by waltzmn
2020-02-24 15:47:37
Forum: Nisus Writer Pro Macros
Topic: Variable Typing
Replies: 5
Views: 12217

Re: Variable Typing

martin wrote: That's always a good idea! I'll see about adding some cross-references between the topics you've discussed. Thanks :) Thank you. I can think of some cases where not casting types is useful, but they're mostly for debugging. (Real debugging, not joke code such as I used in this thread.)...
by waltzmn
2020-02-23 17:10:28
Forum: Nisus Writer Pro Macros
Topic: Variable Typing
Replies: 5
Views: 12217

Re: Variable Typing

Thanks for your reply. Both your knowledge and your willingness to share are amazing. phspaelti wrote: I think this stuff is explained reasonably well in the Macro Language reference in appropriate places. I'm not sure that there is a simple answer, probably because the underlying implementation is ...
by waltzmn
2020-02-23 08:14:01
Forum: Nisus Writer Pro Macros
Topic: Variable Typing
Replies: 5
Views: 12217

Variable Typing

Nisusy folks: I'm intermittently teaching someone about programming with NWP macros. I was recently trying to explain the concept of variable typing. I wrote a tiny piece of example code: $Name = 'George' $Number = 3 $FullName = $Name + $Number My goal, quite frankly, was to have this fail with a ty...
by waltzmn
2020-02-10 10:55:43
Forum: Nisus Writer Pro
Topic: removing page break mid-paragraph
Replies: 18
Views: 21894

Re: removing page break mid-paragraph

This is only a wild thought, but I notice that your document is fairly long -- and has curious page numbering. The page number in your screen shot is 21, yet the bar at the bottom says you're on page 3 of 16. This raises two thoughts: 1. Long documents take time -- a lot of time -- to repaginate, an...
by waltzmn
2019-12-30 06:39:19
Forum: Nisus Writer Pro Macros
Topic: Foreach Command and Variable Scope
Replies: 2
Views: 7684

Re: Foreach Command and Variable Scope

phspaelti wrote: Note that the foreach loop has a variant that allows you to get the index of the current value: foreach $i, $value in $values $values[$i] = … end That did it! Thank you again. At this point, pending field testing, the macro seems to be done, so maybe you'll be through with me for a ...
by waltzmn
2019-12-29 10:04:47
Forum: Nisus Writer Pro Macros
Topic: Foreach Command and Variable Scope
Replies: 2
Views: 7684

Foreach Command and Variable Scope

Hello again, kind people. Apologies again for being apparently the only user asking questions here. At least I'm giving you something to read -- and I'm definitely learning things! I'm still working on this CSV macro, and am having a problem, I think, with variable scope. What I need to do is take a...
by waltzmn
2019-12-28 07:00:23
Forum: Nisus Writer Pro Macros
Topic: Boolean Operation Evaluation
Replies: 3
Views: 9337

Re: Boolean Operation Evaluation

In reply to: phspaelti » 2019-12-27 22:34:43 Hello Bob, Have you tried them? :wink: Yes, I had tried them -- that's how I knew that an invalid test halted the macro instead of, say, reporting an error and asking to continue. :-) But I didn't know if there was a general rule. If it's in the manual, I...
by waltzmn
2019-12-27 17:15:27
Forum: Nisus Writer Pro Macros
Topic: Boolean Operation Evaluation
Replies: 3
Views: 9337

Boolean Operation Evaluation

Boolean Operation Evaluation Good People -- I seem to be the only person asking questions these days. :-) Apologies twice for taking so much of your time, because I'm going to start with a lecture. NisusWriter macros allow two binary Boolean operators, AND (&&) and OR (||). AND is true if bo...