Search found 1188 matches

by phspaelti
2021-07-18 17:19:03
Forum: Nisus Writer Pro Macros
Topic: Extract digits from a text object
Replies: 5
Views: 438

Re: Extract digits from a text object

PS: I should also mention that you can use this with more complicated Find patterns. So if you wanted to ensure that the digits are after the string "Lesson " you could do it like this:

Code: Select all

$ref.find "Lesson (?<refnum>\d+)", "E¢"
If this doesn't match anything in $ref, then $refnum will be undefined.
by phspaelti
2021-07-18 17:14:53
Forum: Nisus Writer Pro Macros
Topic: Extract digits from a text object
Replies: 5
Views: 438

Re: Extract digits from a text object

Hello Allen, This being Nisus you will be doing this with Find/Replace no matter what. To start with the solution, this will get you what you want: $ref.find "(?<refnum>d+)", "E¢" Basically, you can do Find/Replace on text objects in more or less the same way that you would do them in the app itself...
by phspaelti
2021-06-21 07:47:16
Forum: Nisus Writer Pro Macros
Topic: Citation Cross-reference problem
Replies: 4
Views: 1739

Re: Citation Cross-reference problem

You are using commands that I'm not yet familiar with (substring, deleteInRange, insertAtIndex), and I have forgotten why you always do things in reversed order. The key to such macros is the thing NWP calls a TextSelection object. This isn't really a difficult concept. A TextSelection—I'll just ca...
by phspaelti
2021-06-20 09:36:26
Forum: Nisus Writer Pro
Topic: Underline to Bold
Replies: 3
Views: 1236

Re: Underline to Bold

Hello gemboy, If you want to find the underlines in your text you should be able to do this by placing the cursor in a text with an underline and clicking on the " a " in the status bar at the bottom of the window, and choose "Select all in Font". You can then switch them all to Bold easily. If you ...
by phspaelti
2021-06-20 02:57:18
Forum: Nisus Writer Pro Macros
Topic: Citation Cross-reference problem
Replies: 4
Views: 1739

Re: Citation Cross-reference problem

So after a short break. 1. Find the references in the text. I am going to assume that we want to find all numbers in brackets that are not at the beginning of the paragraph. Basically: Find All '(?<=.\[)\d+(?:=\])', 'Ea' As mentioned before, however we also need to allow for other formats. One could...
by phspaelti
2021-06-20 01:43:33
Forum: Nisus Writer Pro Macros
Topic: Citation Cross-reference problem
Replies: 4
Views: 1739

Citation Cross-reference problem

In the thread http://www.nisus.com/forum/viewtopic.php?f=18&t=11866 Þorvarður asks about how to do build an automatic citation using the AIAA Citation Style. Using the referenced style guide as input I have created the following test file: Xref Citations Test.rtf Using this style I will discuss how ...
by phspaelti
2021-06-20 00:59:34
Forum: Nisus Writer Pro
Topic: hyperlink reference to bibliography
Replies: 8
Views: 2408

Re: hyperlink reference to bibliography

Hi Þorvarður, David, I will post the approach to this problem over in the Macro thread. You have since fixed the other issue, but I still wanted to point out one thing about Find/Replace: You seem to be fond of "Shortest 1+", but in fact this is really not necessary for such cases, and is in fact li...
by phspaelti
2021-06-20 00:51:18
Forum: Nisus Writer Pro
Topic: List Styles
Replies: 6
Views: 4761

Re: List Styles

Hello Al, There is several ways you could do this. The way you have this set up right now, you will have to increase the line height of the paragraphs to get more space between the "item"s. The space between the blocks of (List-item-item-item) can be changed separately using "Space after" for the pa...
by phspaelti
2021-06-11 22:33:26
Forum: Nisus Writer Pro
Topic: Continued footnotes
Replies: 4
Views: 1932

Re: Continued footnotes

I can manually put in the [continued....] symbol. But can you have two footnote 5 references? You could use a cross-reference to the actual footnote reference. When you first brought up this request I wondered if one could use a macro to insert (cont.). Unfortunately macros don't seem to have any a...
by phspaelti
2021-06-08 17:39:52
Forum: Nisus Writer Pro
Topic: Teeny Feature Request
Replies: 2
Views: 1477

Re: Teeny Feature Request

While the cursor doesn't change in Nisus, you can do the same. If you move to the margin, click and hold, you can select lines of text. Is the feature in MS Word different in other ways?
by phspaelti
2021-06-08 09:17:13
Forum: Nisus Writer Pro
Topic: Shading Fail in Big Sur
Replies: 5
Views: 2131

Re: Shading Fail in Big Sur

Hi Hatchmo, I can reproduce what happens to you, and what you describe is obviously a bug, and needs to be fixed. I hope Nisus can fix this, and that this is not something that depends on Apple. The way I work around it—and the reason I in fact often fail to notice the problem—is that I use the two ...
by phspaelti
2021-06-08 00:45:51
Forum: Nisus Writer Pro
Topic: Shading Fail in Big Sur
Replies: 5
Views: 2131

Re: Shading Fail in Big Sur

I think I know what you mean. You have to set the pattern to some blend (say 15%, etc.) first or you cannot set the foreground and background color indepedently.
by phspaelti
2021-06-02 16:36:19
Forum: Nisus Writer Pro Macros
Topic: Macro for French typography?
Replies: 7
Views: 2422

Re: Macro for French typography?

And further on the original point. The "two-step" of inserting the non-breaking space and then looking for and simplifying "simple space + non-breaking space" isn't really necessary. You can do this in one step: Find and Replace ' *(?=[;:?!]»)', ' ', 'Ea' Again, with the appropriate space characters...
by phspaelti
2021-06-02 15:58:45
Forum: Nisus Writer Pro Macros
Topic: Macro for French typography?
Replies: 7
Views: 2422

Re: Macro for French typography?

Out of curiosity, if power users read this: the fix for the "p." (pages) before page numbers is not good. I might end up with words ending with a "p" and followed by a non-breakable space. I would need to find all occurrences of "p. " which are just before any number and just replace the with p.+no...
by phspaelti
2021-05-30 07:28:49
Forum: Nisus Writer Pro Macros
Topic: Incremental margin numbers in legal texts / Randnummern
Replies: 5
Views: 2154

Re: Incremental margin numbers in legal texts / Randnummern

Sure you can do all kinds of things. This was more intended as a proof of concept than a worked out solution. If you look in the macro you can see that the biggest part is taken up by working out a list of paragraphs for where to insert. I wasn't going to spend too much time on this stuff. Obviously...