Search found 899 matches

by phspaelti
2018-08-07 00:29:37
Forum: Nisus Writer Pro
Topic: basic knowledge of Nisus templates
Replies: 5
Views: 186

Re: basic knowledge of Nisus templates

Hello Yohanan, nice to hear that you chose to work with NIsus Writer. I redefined the Nisus New File.dot as well as the Normal document.dot in the Templates file, within the file: "Nisus Project" and just created a new document from these (tried both after the following failure). It just kept to tak...
by phspaelti
2018-07-20 19:12:44
Forum: Nisus Writer Pro Macros
Topic: Move Comments to Marked Text (in one swell foop)—Solved
Replies: 21
Views: 9110

Re: Move Comments to Marked Text (in one swell foop)—Solved

In short: arrayByMakingValuesDoCommand is "Map" in other languages. I wonder: is there an equivalent to "Filter" and "Reduce?" I see. So JavaScript has this kind of thing. Nisus arrayByMakingValuesDoCommand is a bit more limited than map, since you can only use it for maps of arrays of objects usin...
by phspaelti
2018-07-20 18:11:08
Forum: Nisus Writer Pro Macros
Topic: Applying style to paragraphs below found text until next style
Replies: 13
Views: 445

Re: Applying style to paragraphs below found text until next style

I insert the page breaks with the insertion point at the end of the line of the paragraph previous to the one that is to be the heading on the next page. Oddly enough, this inserts a blank paragraph above the heading on the next page (which I remove with a forward delete). This method shows a parag...
by phspaelti
2018-07-20 00:44:58
Forum: Nisus Writer Pro Macros
Topic: Applying style to paragraphs below found text until next style
Replies: 13
Views: 445

Re: Applying style to paragraphs below found text until next style

So in the end I would really recommend the 'holistic' method, though that too would require some adjustments for handling multiple Heading styles. Anyhow here is the macro for that. The heading paragraph text selections are gathered one style at a time for each of the heading styles, and then all c...
by phspaelti
2018-07-19 19:33:14
Forum: Nisus Writer Pro
Topic: "Save As" bug?
Replies: 3
Views: 236

Re: "Save As" bug?

No, this is not a bug. If you want to create a new file from an existing one, keeping the original, I recommend getting in the habit of doing the "Save As" before you start editing. It may be possible to use "Undo" to restore the original—if you don't have too many edits, and you haven't closed the ...
by phspaelti
2018-07-19 19:05:10
Forum: Nisus Writer Pro Macros
Topic: Applying style to paragraphs below found text until next style
Replies: 13
Views: 445

Re: Applying style to paragraphs below found text until next style

Think I am seeing a bug here... not in your Macro but in NWP. I think this is a "feature", not a bug :wink: Page breaks are treated as text characters, and are not counted as start of paragraphs, though they allow different paragraph styles on either side. It's a bit weird, but, I believe, a result...
by phspaelti
2018-07-19 08:09:04
Forum: Nisus Writer Pro Macros
Topic: Applying style to paragraphs below found text until next style
Replies: 13
Views: 445

Re: Applying style to paragraphs below found text until next style

Addendum: I just remembered, Nisus does have a command to access paragraphs by number: Select Paragraph 5 I rarely ever use or even look at those selection commands, but they do exist. The main problem with addressing paragraphs by number is that there is no real way to know the number of any given ...
by phspaelti
2018-07-19 07:11:48
Forum: Nisus Writer Pro Macros
Topic: Applying style to paragraphs below found text until next style
Replies: 13
Views: 445

Re: Applying style to paragraphs below found text until next style

It appears this is one very granular language. I am really surprised there is no simple function or property to return the lines of a document, but I see what your doing. It actually is putting range descriptors in the array. I guess you're right in the sense that Nisus does not have any direct acc...
by phspaelti
2018-07-18 23:19:03
Forum: Nisus Writer Pro Macros
Topic: Move Comments to Marked Text (in one swell foop)—Solved
Replies: 21
Views: 9110

Re: Move Comments to Marked Text (in one swell foop)—Solved

I wondered why $listDoc = is in the final line $listDoc = Document.newWithText $commentList.join("\n") … Then I deleted the part that mystified me ( $listDoc = ), and I discovered that it isn’t necessary. My guess now is that it was used to do two things at once: to create a new Document and also t...
by phspaelti
2018-07-18 22:43:09
Forum: Nisus Writer Pro Macros
Topic: Applying style to paragraphs below found text until next style
Replies: 13
Views: 445

Re: Applying style to paragraphs below found text until next style

Ok, and now for the 'holistic' version. This time we can just find the stuff we are actually looking for: $doc = Document.active $text = $doc.text $h2Style = $doc.styleWithName 'Heading 2' $resultCodeSels = $text.findAll '^.*Result Codes.*\n', 'Ea' $h2Sels = $text.findAll $h2Style So this gives us t...
by phspaelti
2018-07-18 21:59:56
Forum: Nisus Writer Pro Macros
Topic: Applying style to paragraphs below found text until next style
Replies: 13
Views: 445

Re: Applying style to paragraphs below found text until next style

So let's try the procedural approach. In this approach you could apply the style 'as you go', but I recommend against it. Instead you should create a selection that selects all the result sections at the same time. Then you can apply style as you want. If your document has any kind of size this will...
by phspaelti
2018-07-18 21:42:20
Forum: Nisus Writer Pro Macros
Topic: Applying style to paragraphs below found text until next style
Replies: 13
Views: 445

Re: Applying style to paragraphs below found text until next style

Hello Scott, let me see if I understand what you are trying to do. Your document has the structure: Heading 2 stuff Result codes result result Heading 2 stuff … And I'm guessing that there is at most one paragraph with the string "Result Codes" per Heading-2 section. You want to apply a style to the...
by phspaelti
2018-07-08 19:14:34
Forum: Nisus Writer Pro Macros
Topic: Move Comments to Marked Text (in one swell foop)—Solved
Replies: 21
Views: 9110

Re: Move Comments to Marked Text (in one swell foop)—Solved

Hi jb. That's clever! Just use Nisus built in default output for the Comment object.
Here is a slightly modified version of your macro, that directly gives you the list without needing to use Find/Replace to clean it up.
by phspaelti
2018-06-29 23:56:06
Forum: Nisus Writer Pro
Topic: a very useful function in the tables
Replies: 12
Views: 3046

Re: a very useful function in the tables

Hello jd, you may want to check your blood pressure. I'm really sorry that this issue is causing you so much distress. I'm also pretty sure that my macro works fine, but it is a kludge , and it obviously will not help if your needs include exchanging files with MSWord users. Sorry! Also remember tha...
by phspaelti
2018-06-27 15:54:01
Forum: Nisus Writer Pro
Topic: Importing from Word and Numbered lists
Replies: 7
Views: 479

Re: Importing from Word and Numbered lists

Wait a minute. What do you mean "it does not work for me"? It doesn't (seem to) do anything at all it stops and gives me an error it does something, but not the thing that I want Anyhow here first a new version of the earlier macro, which fixes the problem mentioned by Þorvarður. Reduce Extraneous L...