Search found 986 matches

by phspaelti
2019-06-10 20:17:17
Forum: Nisus Writer Pro
Topic: Find / Copy all hyperlinks in document
Replies: 2
Views: 476

Re: Find / Copy all hyperlinks in document

Hamid, what a quaint macro :wink:

Here is something that should do what Sccardais actually asked for.
(Note: Working with links is surprisingly cumbersome.)
by phspaelti
2019-05-24 23:45:06
Forum: Nisus Writer Pro
Topic: Pages inside a Document
Replies: 10
Views: 1554

Re: Pages inside a Document

Do you want to be able to see inside the pdf while viewing the Nisus document? Otherwise you could just put links to the pdfs into the file. Clicking on them will open them in the pdf viewer (e.g. Preview). If you really need the first option you could put images of pdf pages into the Nisus document...
by phspaelti
2019-04-28 10:43:51
Forum: Nisus Writer Pro
Topic: Changing selected fonts
Replies: 2
Views: 1186

Re: Changing selected fonts

Apply the font :?
by phspaelti
2019-04-21 06:50:45
Forum: Nisus Writer Pro
Topic: Applying a template to an existing document
Replies: 4
Views: 1239

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: 4
Views: 1239

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: 1521

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: 1521

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: 1304

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: 1304

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: 1304

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: 1891

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: 1891

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: 4723

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: 1891

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: 1891

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...