Search found 988 matches

by phspaelti
2009-04-05 09:01:03
Forum: Nisus Writer Pro
Topic: Fixed line spacing is hiding in-line equations.
Replies: 5
Views: 5445

Re: Fixed line spacing is hiding in-line equations.

I don't use MathEq myself, but the equation is basically a graphic, isn't it? And the graphic is inline, isn't it? so you are trying to put a graphic that is too large on a line of fixed height. Obviously it isn't going to fit so what do you want Nisus to do? Overwrite the line above? Something is g...
by phspaelti
2009-03-30 07:34:21
Forum: Nisus Writer Pro Macros
Topic: Sort lines and kill duplicates
Replies: 10
Views: 9818

Re: Sort lines and kill duplicates

Kino wrote: By making plain text the text object.

Code: Select all

…
	$textcopy = Cast to String $sel.subtext
…
In the non-styled-text mode, it runs 100 times faster (!) on my test file of 22000 lines.
So that does it.
That's a nice trick. It works like a charn. Thanks!
by phspaelti
2009-03-29 19:40:33
Forum: Nisus Writer Pro Macros
Topic: Sort lines and kill duplicates
Replies: 10
Views: 9818

Re: Sort lines and kill duplicates

You can make it far faster if you don't take care of style attributes at all. Actually I was wondering about this too. But what part of the macro takes care of the style attributes? The slow part of the macro is the loop which assembles the $output string. Timing individual bits of the macro, the "...
by phspaelti
2009-03-29 19:08:31
Forum: Nisus Writer Pro Macros
Topic: Sort lines and kill duplicates
Replies: 10
Views: 9818

Re: Sort lines and kill duplicates

Err... if we were competing in a car race... Actually my point is that if we were competing we (apparently) shouldn't bother with all this hash business. The "bullet count" version I posted earlier is much faster. Your version timed to 292 seconds on my machine on the 6000 line file. The "bullet co...
by phspaelti
2009-03-29 09:49:50
Forum: Nisus Writer Pro Macros
Topic: Sort lines and kill duplicates
Replies: 10
Views: 9818

Re: Sort lines and kill duplicates

Now I see it. Of course the keys of the hash are an array. So they can be sorted.
You're version does have some improvements over the version that I was experimenting with. But testing it on a file with a bit less than 6000 lines, this approach is markedly slower than the Find and Replace version.
by phspaelti
2009-03-29 06:47:57
Forum: Nisus Writer Pro Macros
Topic: Sort lines and kill duplicates
Replies: 10
Views: 9818

Re: Sort lines and kill duplicates

Kino's approach is the one that I would have used too, but there is one important difference between js's macro and Kino's. js's macro counts the number of lines as well. Here is one way to extend Kino's approach to counting lines. Select All :Edit:Sort Paragraphs:Ascending (A-Z) Find and Replace ‘^...
by phspaelti
2009-03-25 07:54:40
Forum: Nisus Writer Pro Macros
Topic: Table Selection
Replies: 3
Views: 5021

Re: Table Selection

Thanks Martin, Kino, for the comments. I deduced that this was the behavior, but now I have peace of mind as well! As far as the description goes, since it is a technical reference I think precision trumps verbosity, but if you're worried about verbosity you could drop the either making it: If range...
by phspaelti
2009-03-20 07:40:29
Forum: Nisus Writer Pro Macros
Topic: Table Selection
Replies: 3
Views: 5021

Table Selection

The macro reference says the following: TableSelection.new tableObject, [rowRangeObject], [columnRangeObject] v1.1 Returns a new selection describing a cell region within the given table. Both Range objects must be in-bounds for the table or an error will be displayed. If either range is not provide...
by phspaelti
2008-01-21 00:12:04
Forum: Nisus Writer Pro
Topic: switch to chosen keyboard doesn't work for me
Replies: 2
Views: 3272

Yes, this seems to be broken under Leopard. The switching seems to work only for each "script". So Roman forms one group (English, German, French, …) Unicode one group (Hebrew, Greek, etc.), and there are other groups.
by phspaelti
2007-07-08 03:44:20
Forum: Nisus Writer Pro
Topic: Capitalization
Replies: 28
Views: 17888

Nisus Classic did not have automatic capitalization. However Nisus Classic spell checker did give you the option to flag words which were not capitalized.
by phspaelti
2007-07-06 05:17:16
Forum: Nisus Writer Pro Macros
Topic: average column macro
Replies: 1
Views: 5842

average column macro

The macro to average columns states that "empty cells are not counted so they do not affect the average, but cells with a zero in them are counted and they do affect the average". My tests show me that if the cell contains contains "0." or "0 " the behavior is as specified (i.e., the 0 is included) ...
by phspaelti
2007-04-30 06:36:07
Forum: Nisus Writer Pro Macros
Topic: Entering formated text into a Find Replace macro
Replies: 2
Views: 6855

Re: Entering formated text into a Find Replace macro

With an open file I would like to use a macro to find any text in Courier (if there is any) and replace it with Times. This seems simple and the Macro Find language has the u and U for considering attributes. But how can I enter ".+" with font attributes into Find and Replace? (You can of course us...
by phspaelti
2007-04-13 08:53:52
Forum: Nisus Writer Pro Macros
Topic: list of discontinuous selections
Replies: 3
Views: 7837

You can collect all the selected bits on the clipboard. Is that what you want?
Assuming you want the bits separated by returns the following will work:

Find and Replace '.+', '\0\n', 'aEs'
Copy
Undo