Search found 1167 matches

by phspaelti
2021-01-25 01:06:47
Forum: Nisus Writer Pro
Topic: How to replace png image with PDF version and keep size and spacing?
Replies: 10
Views: 3359

Re: How to replace png image with PDF version and keep size and spacing?

Actually I'm not quite sure. I'm using a Nisus macro language feature called ".barefilename". So my prediction would be that it will look for either [Foo1.pdf] or [Foo1.pdf.pdf]. It will definitely strip the ".png" I just checked and it seems it would use [Foo1.pdf.pdf]. But I will try to make it a...
by phspaelti
2021-01-25 00:48:18
Forum: Nisus Writer Pro
Topic: How to replace png image with PDF version and keep size and spacing?
Replies: 10
Views: 3359

Re: How to replace png image with PDF version and keep size and spacing?

Thanks for the effort phspaelti. I've actually done them all by hand in a new draft of this current file already, but I will try it out in a test of the earlier problem file in case I need it in future work (which I might, if the same problem crops up). However I need to clarify a couple things bef...
by phspaelti
2021-01-24 18:12:31
Forum: Nisus Writer Pro
Topic: How to replace png image with PDF version and keep size and spacing?
Replies: 10
Views: 3359

Re: How to replace png image with PDF version and keep size and spacing?

The behavior you describe sounds strange to me, but I'm not really confident about these things myself. As I said, worst comes to worst, you should be able to accomplish what you want with a macro. Here is one you could try (on a copy of your document, please). The macro will prompt you for a folder...
by phspaelti
2021-01-24 08:07:02
Forum: Nisus Writer Pro
Topic: How to replace png image with PDF version and keep size and spacing?
Replies: 10
Views: 3359

Re: How to replace png image with PDF version and keep size and spacing?

If you select an image and use "Insert Image" does the replacing image not maintain the size?

If you do need to replace the images and maintain the size it shouldn't be too hard to write a macro to do that, at least as long the filenames can be correctly deduced.
by phspaelti
2021-01-24 07:37:53
Forum: Nisus Writer Pro Macros
Topic: Split Document into Pages
Replies: 3
Views: 1852

Re: Split Document into Pages

Hello Adrian, I haven't tried to write a whole macro for this, but here would be my starting point. $doc = Document.active $text = $doc.text $pageRanges = Array.new $x = 0 while $x < $text.length $range = $text.rangeOfPageAtIndex $x $pageRanges.push $range $x = $range.bound end With this approach yo...
by phspaelti
2021-01-18 20:09:37
Forum: Nisus Writer Pro
Topic: Finding superscript ordinal numbers
Replies: 14
Views: 4685

Re: Finding superscript ordinal numbers

I am having no luck trying to follow your suggestions--probably something I am doing wrong.When I follow your instructions, I get the "Found no occurrences" message from NW. So I am guessing that I am doing something wrong in the Find box. Here is a screen shot. Can you see anything I have done wro...
by phspaelti
2021-01-16 05:00:38
Forum: Nisus Writer Pro
Topic: Finding superscript ordinal numbers
Replies: 14
Views: 4685

Re: Finding superscript ordinal numbers

It would be easier if we could delete an instance directly in the "Find Results" window (e.g. with a command in the contextual menu). The "Find Results" window is great to see/navigate/copy results but would be much powerful if it could operate on the underlying multi-part selection. Did you know t...
by phspaelti
2021-01-15 22:51:13
Forum: Nisus Writer Pro
Topic: Finding superscript ordinal numbers
Replies: 14
Views: 4685

Re: Finding superscript ordinal numbers

Which is why I wrote "probably".
The method I recommend in general is to use "Replace All" less, and "Find All" more. Look at the number of hits and use "Show list of matches" to see what you get. Regular expressions are famously tricky, so it's best not to try to outthink the regexp engine :)
by phspaelti
2021-01-15 16:13:21
Forum: Nisus Writer Pro
Topic: Finding superscript ordinal numbers
Replies: 14
Views: 4685

Re: Finding superscript ordinal numbers

Using PowerFind Pro, put the following expression in the Find field: (\d)(st|nd|rd|th) Select the second parenthesized expression and superscript it by choosing Format > Baseline > Superscript. Also tick the Formatting Sensitive checkbox there. As a slight variant of this approach, I would recommen...
by phspaelti
2021-01-08 16:44:23
Forum: Nisus Writer Pro
Topic: Is "Find Next" possible by attribute (text colour)
Replies: 12
Views: 4569

Re: Is "Find Next" possible by attribute (text colour)

To do an attribute sensitive search in Nisus using regular Find do the following Make sure you are set to Powerfind or Powerfind Pro "Clean out" the find box (i.e. make sure it has no residual attributes) Insert the Wild Card "Any" Select and apply the attribute—or combination of attributes—you want...
by phspaelti
2021-01-03 21:03:50
Forum: Nisus Writer Pro Macros
Topic: Anchors and anchored text
Replies: 4
Views: 3003

Re: Anchors and anchored text

Hello lellius, and happy new year! The macro does work well, except it doesn't find and delete a void anchor. The reason is that I put in a condition which restricts processing to text boxes. I did it that way so it wouldn't delete any floating images. I'm not sure what the "void" anchors would turn...
by phspaelti
2020-12-30 00:01:02
Forum: Nisus Writer Pro Macros
Topic: Anchors and anchored text
Replies: 4
Views: 3003

Re: Anchors and anchored text

Something like this?

Code: Select all

$doc = Document.active
foreach $float in $doc.allFloatingContents
  if $float.isTextBox
    $float.anchorText.insertAtIndex $float.anchorTextRange.location, '[' & $float.text & ']'
    $float.removeFromDocument
  end
end
by phspaelti
2020-12-12 01:57:36
Forum: Nisus Writer Pro
Topic: Powerfind ninja needed for search question
Replies: 11
Views: 4416

Re: Powerfind ninja needed for search question

I had noted the PowerFind Pro expression, but I confess I don't quite understand why it doesn't just begin with the caret. Enlightenment is sought. You mean why the expression is wrapped with '(?: … )'? This creates a non-capturing unit for the paragraph. But now that I think about it, I'm having a...
by phspaelti
2020-12-11 18:45:28
Forum: Nisus Writer Pro
Topic: Powerfind ninja needed for search question
Replies: 11
Views: 4416

Re: Powerfind ninja needed for search question

"Paragraph" as used here is a term of art. If you look "under the hood", you can see that it amounts to any repetition of 'text' characters, i.e., characters excluding the return/newline. So it puts no conditions on punctuation. Paragraph in this sense is what computer types usually call "line", exc...
by phspaelti
2020-12-10 16:18:26
Forum: Nisus Writer Pro
Topic: Powerfind ninja needed for search question
Replies: 11
Views: 4416

Re: Powerfind ninja needed for search question

Also one other approach you can use in similar cases: Select the styled paragraphs Replace the selected text with—or just insert—a special marker of some kind Find the paragraph followed by the special marker This method can be useful when the styled paragraph does not have some otherwise recognizab...