Search found 983 matches

by phspaelti
2019-04-21 06:50:45
Forum: Nisus Writer Pro
Topic: Applying a template to an existing document
Replies: 3
Views: 129

Re: Applying a template to an existing document

I am sure a Nisus Writer Pro macro would solve the problem... Not sure this is the best solution, but … # Save Current File With Template $doc = Document.active $docPath = $doc.filepath $dmPath = User Property “document manager folder path” $templatePath = $dmPath.filePathByAppendingComponent "MyTe...
by phspaelti
2019-04-21 01:07:07
Forum: Nisus Writer Pro
Topic: Applying a template to an existing document
Replies: 3
Views: 129

Re: Applying a template to an existing document

It's true that you can't apply a template to an existing file. And while you can easily replace the style sheet of an existing file, you can only change the margins etc. by hand through the settings in the palette. On the other hand what you can do easily is import a document into a (template-based)...
by phspaelti
2019-04-13 19:53:37
Forum: Nisus Writer Pro
Topic: creating and inserting a word index in a completed document
Replies: 7
Views: 191

Re: creating and inserting a word index in a completed document

Hello Walt, your list should be in its own document, and it should contain a table with two columns; the first column should have the words to be indexed in your main document, and the second column should have the term under which they should be indexed. If you have created the list as lines with t...
by phspaelti
2019-04-13 18:30:34
Forum: Nisus Writer Pro
Topic: creating and inserting a word index in a completed document
Replies: 7
Views: 191

Re: creating and inserting a word index in a completed document

Hello Walt, The "two column" file you need for generating an index should be a two column table . Note that the list you use should only contain words you actually want to index. With 20,000 words it sounds like you would be indexing every single word in the document (but maybe that's what you want?...
by phspaelti
2019-04-09 04:12:10
Forum: Nisus Writer Pro
Topic: How to search for a 1 cell table
Replies: 5
Views: 205

Re: How to search for a 1 cell table

vwnisus wrote:
2019-04-09 03:19:15
The intention is to remove the text and the table.
Well in that case, use the first macro and press "delete". Though that might result in merged paragraphs. So maybe better:

Code: Select all

foreach $table in reversed $oneCellTables
  $table.enclosingText.replaceInRange $table.enclosingTextRange, "\n"
end
by phspaelti
2019-04-09 02:35:59
Forum: Nisus Writer Pro
Topic: How to search for a 1 cell table
Replies: 5
Views: 205

Re: How to search for a 1 cell table

For instance you could follow up the code above with the following: foreach $table in reversed $oneCellTables $cell = $table.cellAtRowAndColumn(0,0) $cellText = $cell.text.copy & "\n" $lineAttrsTop = $cell.lineAttributesForEdge 'top' $lineAttrsBottom = $cell.lineAttributesForEdge 'bottom' $lineAttrs...
by phspaelti
2019-04-09 02:11:25
Forum: Nisus Writer Pro
Topic: How to search for a 1 cell table
Replies: 5
Views: 205

Re: How to search for a 1 cell table

Since they all have the same text, wouldn't searching for the text work? What do you want to do with them when you find them? Macro code for finding one cell tables would be as follows: $doc = Document.active $oneCellTables = Array.new foreach $table in $doc.text.tables if ($table.rowCount == 1) && ...
by phspaelti
2019-03-01 08:21:38
Forum: Nisus Writer Pro Macros
Topic: A macro converting numbered texts to endnotes
Replies: 9
Views: 1078

Re: A macro converting numbered texts to endnotes

But then I don't understand the find pattern at the line 33: '^$0(.+$0\n)+'; if '$0' stands for the found reference number, the first one should be '^1(.+1\n)+'. But such a formula does not match any string... Martin comments for this part of the macro "# find the corresponding note text". If I und...
by phspaelti
2019-03-01 01:43:51
Forum: Nisus Writer Pro Macros
Topic: A macro converting numbered texts to endnotes
Replies: 9
Views: 1078

Re: A macro converting numbered texts to endnotes

Hello Nobumi, I'm glad you got it to work. So I guess it was worth providing more than one macro! Also it shows that with macros it's really best not just to hope someone can write one for you, but to at least have some idea how they work so you can get the result you want. I don't understand the me...
by phspaelti
2019-02-28 00:18:39
Forum: Nisus Writer Pro
Topic: how move items up / down a list?
Replies: 12
Views: 3890

Re: how move items up / down a list?

Hello Howard, I take it you understand why this happens. Your item "21" has a restart on it which is some kind of invisible "memo" on the list item itself. Unfortunately the only way to know this is to look in the "Format:Lists" submenu, where the name of the first item changes from "Restart Numberi...
by phspaelti
2019-02-26 19:28:21
Forum: Nisus Writer Pro Macros
Topic: A macro converting numbered texts to endnotes
Replies: 9
Views: 1078

Re: A macro converting numbered texts to endnotes

It also looks like Philip's macro has some errors. I tried it on Nobumi's sample text and it failed. That's probably because Philip's macro tries to be more efficient in exactly calculating all the notes upfront. That process is going to be faster, but more brittle. I did only one quick test on Nob...
by phspaelti
2019-02-26 09:28:48
Forum: Nisus Writer Pro Macros
Topic: A macro converting numbered texts to endnotes
Replies: 9
Views: 1078

Re: A macro converting numbered texts to endnotes

Hello Nobumi, The basic steps will be: Find the numbers in your text Use the information to copy the note text Create endnotes using the copied text Remove the text endnotes The exact way to do this is driven by the commands of the Nisus macro language. So to create an endnote you'll need to use the...
by phspaelti
2019-02-20 17:57:12
Forum: Nisus Writer Pro
Topic: how move items up / down a list?
Replies: 12
Views: 3890

Re: how move items up / down a list?

Hi. In what way has it not worked well? I'm not aware of anything having changed in NWP 3.0 that would affect the functioning. So if you could let me know how the outcome of the macro is different from what you expect…
by phspaelti
2019-02-20 11:24:34
Forum: Nisus Writer Pro
Topic: Different headers/Different footers
Replies: 2
Views: 411

Re: Different headers/Different footers

Hello Armando, and welcome to Nisus. You are correct. If you want to have one header run from page 1 - 20, and then a different header from page 21 - 40, then you will need to insert a section break at the bottom of page 20. This will give you a new section and those buttons will become active. A si...
by phspaelti
2019-02-16 08:27:22
Forum: Nisus Writer Pro
Topic: Column question
Replies: 2
Views: 457

Re: Column question

Insert > Column Break